Palette - make 2 Histograms share the same palette

Hello,
I’m new to ROOT and I want to make 2 histograms in one canvas comparable on the first sight.
The histograms show the same thing but one ranges from let’s say 0 to 50 and one from 0 to 80.
Now in both Histograms the maximum value is red with the COLZ palette.
Is it possible to get in both histograms the same color at the same value, so red is at 80 and yellow or something in both palettes at 50?
Thank you

You can set the palette z axis same range by hist->GetZaxis()->SetRangeUser(0,80) or just by hist->SetAxisRange(0,80,“Z”)

or:

hist->SetMaximum(80.);

Both methods work fine, thank you.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.