Hiya,
I want to plot a 2D histogram with the colz option using my own palette.
The range of the the histogram is [-10;50]. I’d like to have the negative values in black and the positive ones below and above my threshold (30 ADC counts) respectively in blue and white.
But using negative values mess everything up. A shift appears and the colors get not really respect (e.g. the border between blue and white is not 30 but a bit less). This does not happen whilst using positive value (but the result is pointless: Cf pictures attached). Here’s my code:
Hi Rene,
Thanks for having answered so fast.
So here we go I did the same thing on a 16*16 matrix.
I’m using Root 4.00/04 (30 April 2004) and CINT 5.15.133
(18 April 2004).
Cheers, Zesp
You have a mismatch between the number of colors in your palette and the default number of contours.
Simply add the following statement just before Drawing the histogram:
h_mimo5->SetContour(6);