One color per tick mark COLZ option


Is there a way to set one color per tick mark in a TH2D histogram plotted with the COLZ option? In the attached figure, I like each color to cover only one tick mark. I have defined a palette with 13 colors, since there are 13 tick marks on the COLZ scale, but can’t figure out how to this.
I also like to number label more tick marks on the COLZ scale. By default, only order of magnitude markers are labeled on a log scale. Is there a way to override the default and put number labels on more tick marks?



Increase the number of contours as shown here: … or-palette


Hello couet,

Thanks for your replay.
I had try that example before and I’m trying it again. Here is the code I have used so far:

	UInt_t Number = 6;
	Double_t Red[Number]    = { 1.00, 0.00, 0.00, 0.00, 1.00, 1.00};
	Double_t Green[Number]  = { 1.00, 1.00, 1.00, 0.00, 0.00, 0.00};
	Double_t Blue[Number]   = { 0.00, 0.00, 1.00, 1.00, 1.00, 0.00};
	Double_t Stops[Number] = { 0.00, 0.45, 0.55, 0.60, 0.80, 1.00};
	Int_t nb=6;

The resulting plot is attached.
As shown in the plot, the color divisions does not match the stop settings. Is there a way to, for example, force a color to be plotted between 1 and 2 or 0.5 and 1 in the COLZ axis?

Thanks in advance for your help,


Here is the plot.

In the example I was referring to there is also:


I do not see such call in your code.


I am not plotting a function here, I am plotting data points which I read in from a text file.


I think I getting it to work by calling SetContour(nb).

Thanks again,