This question is about an addition to the Draw option ‘colz’ which maybe could be implemented (or which maybe is there already and I just missed it, I would be grateful if someone could point me to that)-
As far as I know the Draw method with the ‘colz’ option, when applied to a TH2F histogram, takes the minimum and maximum of the histogram, divides the number space in between in equal steps and assigns a color from a palette to each step. So in case the palette(1) is called, e.g. the bin with the maximum content would be drawn red, and the bin with the minimum content would be blue.
I now can think of applications where one, e.g., wants to compare theory predictions to experimental data, for different sets of theory parameters. If the difference (theory-experiment) is drawn on some TH2, it would be very convenient to have the colors of colz ‘affixed’ to an ‘absolute’ value scale of this difference. E.g., if say the theory, for one set of parameters, always overshoots the experiment, it would be handy to have the corresponding TH2 drawn only in the ‘upper’ colors of palette(1) ‘colz’, so only red gradients. Whereas if the theory, for a different set of parameters, always underestimates the experiment, the corresponding TH2 could only be drawn in the ‘lower’ colors of palette(1), only in blue gradients. I think with just calling Draw(‘colz’), all of the upper histograms would feature blue AND red gradients (min to max of each single histogram), and it would be hard to quickly compare them to each other because the number scale of the colz-axis and so also the color coding is different for each histogram.
So what I would be looking for is like a function ::SetColzRange(valuelow,valuehigh), where one could ‘hard-wire’ the scale of the color segment assignment of ‘colz’ from ‘valuelow’ to ‘valuehigh’. This function could be implemented so that if a TH2 is drawn with ‘colz’ after the above function has been called, the interval [valuelow,valuehigh] would be split into equal steps, and a color of a palette would be assigned to each step. If a bin in the histogram has a content lower than ‘valuelow’, it would just be given the color assigned to the ‘lowest’ segment, in the palette(1) case just plain blue. On the opposite end, if a bin in the histogram had a content higher than ‘valuehigh’, it would be assigned the ‘highest’ segment color, for palette(1) plain red.
If one knows a little bit of the scale to be expected when comparing two things, e.g. by a ratio, then I could think that this additional function would allow for quick and efficient 2d comparing. For instance ::SetColzRange(0.9,1.1) for an expected at most 10% difference of say the ratio of the abundancy of particles with different charges- everything smaller than one would be drawn in blue shades, even in the case that there might be nothing > 1.0 in the histogram.).
thanks for reading & cheers,