Re: [ROOT] Histograms with markers

From: Rene Brun (Rene.Brun@cern.ch)
Date: Fri Aug 09 2002 - 10:59:30 MEST


Hi Markus,

Interesting pathological example.
By default, Root switches automatically to the "so-called" low-resolution
mode in case the number of bins is greater than the number of pixels in
the pad. However, the low-resolution mode is clearly not good in
cases like yours. Detecting this case automatically is non trivial.
I have implemented an option "9" to force drawing in high resolution mode.
With the new version in CVS, if you h1->Draw("p9"), you will get
the correct picture.

Thanks for reporting this simple example.

Rene Brun

On Thu, 8 Aug 2002, Markus Brehm wrote:

> Hi!
> If I try to draw a histogram (with option "P")  where the bin contents
> varies a lot (small in one bin and high in the neighbouring bin) I get a
> strange behaviour.
> If the canvas is big enough or I zoom in, I get what I expect (two
> "lines") if I zoom out or make the canvas smaller, the histogram is filled
> in black, no matter which marker color I have selected before.
> I am using root  3.03/07 on Suse 7.3
> The behaviour can be reproduced by the following macro:
> {
>   TH1F* h1=new TH1F("hist","hist",2048,0,2047);
>   for(int i=0; i<1024;i++){
> 	 h1->SetBinContent(i*2,i);
> 	 h1->SetBinContent(i*2+1,5);
>   }
>   h1->SetMarkerColor(2);
>   h1->SetMarkerStyle(1);
>   h1->Draw("P");
> }
> Thanks for your answers,
> regards,
> 	Markus
> 
> ======================================
> Markus Brehm
> Physikalisches Institut der Universitaet Heidelberg
> Philosophenweg 12
> D-69120 Heidelberg
> Tel. +49 6221 54 9345
> Fax  +49 6221 475733
> brehm@physi.uni-heidelberg.de
> 



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:51:03 MET