Hi Thomas,
I agree that controlling the number of dots per histogram is desirable.
However, I prefer not to add yet a new data member in the histogram class.
I have implemented a new drawing option "scat=ff", eg "scat=10" means
draw a scatter plot drawing a number of dots per cell equal to
the cell content times 10. ff is a floating point. One can scale up/down,
eg scat=0.1, scat=3.14, scat=1e-5. Default is "scat=1".
The option to specify the total number of points is not very suitable
in case one wants to zoom on the scatter-plot.
The new feature is now in CVS.
Rene Brun
On Wed, 6 Mar 2002, Thomas Kluge wrote:
> Hi Rooters,
>
> in THistPainter the constant
>
> const Int_t <http://root.cern.ch/root/html/ListOfTypes.html#Int_t> kNMAX = 2000;
>
> controls how many dots will be drawn in a bin of a TH2 with scatter plot
> option.
>
> In the implementation of THistPainter::PaintScatterPlot() I found:
>
> dz = zmax - zmin;
> if (dz >= kNMAX || zmax < 1) {
> scale = (kNMAX-1)/dz;
> if (ncells > 10000) scale /= 5;
> ltest = kTRUE;
> }
>
> so the density of the points is adjusted in two steps right now.
>
> I would appreciate some means to set this behaviour by the user per
> histogram. Either one could specify the
> maximum number of points per bin or the sum for the whole histogram. (I
> would prefer the latter).
>
> Best regards,
>
> Thomas Kluge
>
> --
> ------------------------------------------------------------------
> Thomas Kluge Telephon: +49(40)8998-4551
> DESY, 1d33 Telefax: +49(40)8998-4385
> Notkestr. 85 GSM: +49(179)2243365
> D-22607 Hamburg ------------- e-mail: thomas.kluge@desy.de ---
>
>
This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:45 MET