cghistoplot: getting histdata values without any plotting? [message #83208] |
Mon, 18 February 2013 19:01 |
timmyb89
Messages: 4 Registered: October 2012
|
Junior Member |
|
|
Hi everyone,
I'm using cghistoplot to make a histogram with three data sets (arrays).
One problem is I'm not sure which of the sets will have the largest (tallest) histogram. That is, if I plot one set, then overplot the remaining two sets, some of the overplotted histograms might exceed the maximum y range calculated by plotting the first set.
What I would like to be able to do is call cghistoplot for each data set, but without any plotting or anything taking place, solely to to retrieve the histdata keyword. I could then find the maximum y value of all of the histograms and use this to construct the final histogram.
It would go something like this (ignoring binsize and mininput keywords etc.):
cghistoplot,a,histdata=data1
cghistoplot,b,histdata=data2
cghistoplot,c,histdata=data3
ymax=max([data1,data2,data3])
cghistoplot,a,yrange=[0,ymax]
cghistoplot,b,/oplot
cghistoplot,c,/oplot
Although in the first 3 cghistoplot calls I don't want it to do any plotting, I only need to retrieve the histdata values. Is there a clever way to do this or am I missing something? I've tried using the /nodata keyword but it doesn't help. I'm stuck wanting to do a multiplot of overplotted histograms (looping through different bin sizes etc.).
Thanks, Tim
|
|
|