Palette on a TProfile2d

Dear rooters

before I had posted this, I expend a lot of time on the web and forums an practically nothing (perhaps not correct words, but I tried hard). Here is my question…

I have a set of variables (xbc,ybc,q2) read them from a root file without any problem. I produce a TProfile2D as

as you can see, the range of my Z axis (q2 as variable) is between 8 and 20 since the data from q2 do not go out of this range, in fact could a smaller range but it is just a temptative to start. I fill the TProfile2D (of course in the appropiate for loop reading the events of the root file)

and draw as normal

Now, the color palette marks the range from 0 to 14. Upper limit is ok for me, but lower limit is too low, and restricts my plot to very small gradient around one color. I understand that it is because the palette takes the empty bins as 0 and it marks the lower limit.

I would like to know if it is possible to change the range of the palette to a scale more adjusted to my data. Somewhere I read, the idea is with TH2D::SetMinimum( ) ; so I tried but doesn’t work:


(console output)

Error: Can’t call TProfile2D::SetMinimun(6) in current scope tree.c:356:
Possible candidates are…
(in TProfile2D)
(in TH2D)
(in TH2)
(in TH1)
*** Interpreter error recovered ***

Can I get some hint from experts? Thank you

h4bprof->SetAxisRange(8, 20, “Z”);
h4bprof->GetZaxis()->SetRangeUser(8, 20);
Actually, I believe this should work as well:
See also:
[url]SetAxisRange(0.0,1.0,“Y”); is ineffective
[url]Drawing a TGraphAsymmErrors

BTW. You have a typo in your “tree.c” file in line 356 … “SetMinimun” does NOT exist at all (note that the last character in this name is a “n” instead of a “m”) … I think that’s where your problem originates …

thank you very much.

Even the typo (what solves the problem as you suggested), is interesting the other code.

Thank you again.