2D THStack, Lego, log, Range Change

Hi,
I’m trying to stack TH2F s in a lego style, so am using THStack. I set the pad to get a logz axis, but this always falls short of the detail I want to display. How do I change the log limis on the z axis in a 2 dimensional stacked histogram?

I have tried to use the hstack.C example then when it has drawn, change the log scale ranges by hand, and then save the canves as a C file; but on reloading the C file, the range of the z axis revert back to the settings that were there in the first place.

Cheers,
Toby Davies

To set the min/max along z of a TH2* h2, do

h2->SetMaximum(maxz); h2->SetMinimum(minz);
Rene

Hi,
I tried this method, but it does not seem to work for me; attatched is a modified version of hstack.C which uses the SetMinimum, but does not create the desired effect on the canvas.

Cheers,
Toby
hstack.C (2.05 KB)

You must apply the minimum to the stack, ie
replace the statement

h2a->SetMinimum(2.5e-4); by

a->SetMinimum(2.5e-4);

Rene

Hi,

this worked- thanks! I realize that I've posted in the wrong place.. sorry about that.

Cheers,
Toby