Re: RE : [ROOT] Gradient Palette when drawing 2D histograms with "col" option

From: Olivier Couet (
Date: Fri Mar 26 2004 - 10:59:58 MET

Hi Eric,


> Yet, concerning colours, the question is : should "report nothing" be 
> "draw nothing" or "draw the colour of nothing" ... shouldn't it be the 
> user responsibility to decide the colour representation of "0's", and 
> not the quite hidden (especially for a novice) parameterization of the 
> histogram underlying TFrame Fill colour ? Or course the default palette 
> colour would be set to something "clearly empty" (like white).

Yes, the choice to not draw the empty bins was made to show clearly that 
they are empty. Having done that choice "the colour of nothing" is simply 
the background color of the frame which can be set to the first color of 
the palette if needed. You were right to say that in the case of 
histograms having negative bin contents, a bin containing 0 is not 
necessary empty. That is why I did that additional test on zmin. 

> ( and from my points of view, drawing with last available colour in 
> the palette ...)

that is what is done now. 

> In fact, in order to keep the previous behaviour as an option, 
> (One can imagine for example that somebody is using the "don't draw" 
> feature to superpose histogram ... ), I am wondering if this could be 
> some sort of option (draw/no draw "0") ("col0","col0Z"  versus 
> "col","colz" ..)

Yes, I think a new option would be the best solution because, seems to 
me, each user has his own view of what the COL option should do and all 
these different views are incompatible. The two last modifications I did 
make sense: one was clearly a bug (wrong color in some upper bins) and the 
other one was logical because if the histogram has a negative minimum , a 
bin with 0 content cannot be considered as empty. I don't think we can 
really go further with this option COL. 

 Now you suggest that the current COL becomes COL0, right ? We cannot do 
that, I guess, this will have to many side effects for users familiar with 
the current COL option behavior. If we decide to implement a new behavior 
it should be covered by a new option.

So for that "new option" what is your proposal ?
- I guess 0 should not be a special case
- what do we do if a minimum/maximum value is set by SetMinimum/SetMaximum ?
- ...

Cheers,       Olivier

This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:06 MET