Same color palette range for several TH3 drawn with glcolz

Hi

I have several TH3F histograms which I am drawing with “glcolz”. I was wondering if it is possible to use the same colors for all of them, so all to be drawn showing the same (0 - 30) rang on the color palette, even if the actual maximum bin content is below 30 for most of them. I have attached a figure to illustrate what I have at the moment.

Thank you,

Cristian


I think you should specify the same maximum and minimum for all the histograms.

Hello,

Thank you for your reply.

Specifying

hist_power_1->SetMinimum(0.);
hist_power_1->SetMaximum(30.);
hist_power_2->SetMinimum(0.);
hist_power_2->SetMaximum(30.);
etc

before drawing, for all histograms, does not change the results. It is not that I want the color palette to not exceed a certain maximum, I actually want the color palette to go above the maximum bin content, and this way have the same color palette for all histograms for a direct comparisson.

Best regards,

Cristian

Indeed, the maximum on a histogram is not used

I once applied a “brutal fix” to such a problem.
I modified all relevant histograms destroying two bins:
MyHisto->SetBinContent(1, 1, MyMinimum);
MyHisto->SetBinContent(MyHisto->GetNbinsX(), MyHisto->GetNbinsY(), MyMaximum);

I think we will have to modify the code to take care of the minimum and maximum like for TH2

I have exactly the same problem.
Is this actually solved by now? So, can you access the color axis and set its range in TH3 histograms?

Thanks a lot in advance!
:slight_smile:

Nothing has change here. May be post a Jira ticket.