Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to make Reference lines in histogram by trellis

I would like to make reference lines such as mean, median, mean +-3*sig etc in histogram by trellis. I can easily make reference lines in the case of histogram without trellis. But I cannot do it in the case of trellis case. Dot(mark) is also OK if possible.

4 Replies
pover
Luminary Alumni
Luminary Alumni

Reference lines ignore the dimension values so you can't do a different reference line for each dimension value.  You're probably going to have to create separate charts or create a box plot to go with the histograms.

Karl

Not applicable
Author

Thank you for your quick reply. Can you advise me the value with red mark in a new file? The red dot has some information of “aggr avg” and “min x1” for each group. My question is "the calculation way of “min x1?”. Other file case shows me "not min x1". Therefore I think there is very some chance I can plot average value as mark if I can arrange "min value" by my way.

pover
Luminary Alumni
Luminary Alumni

Good thinking about using the aggr().  It gives you the right number, but the problem is that it plots on the y-axis and not the x-axis.  This is important analysis that you are doing and I'm glad there are people doing histograms, averages and std dev.  I think it is important that you post an idea to do this type of analysis in trellis charts.

In the mean time, I've attached a solution that works for shoing the median and quartiles.  It involves changing the color of bar that are found in the median and quartile.

if(Median(total <y1> x1)=x1,red(),

          if(Fractile(total <y1> x1,.25)=x1,LightRed(),

          if(Fractile(total <y1> x1,.75)=x1,LightRed()

          )))

The problem with average and std dev is that they aren't always numbers that exist in the x-axis.

Regards, Karl

johnw
Champion III
Champion III

See attached for a solution.  It's probably the ugliest kluge I ever did kluge, but on the surface it appears to work.  I make no guarantees about performance, though, which I would expect to be horrible on large data sets.  It should be fine for small data sets, though.

I really hope there's a better answer, but some answer may be better than no answer.