Modifying the interval on the logarithmic scale


ROOT Version: 5.34/30
Platform: Ubuntu 16.04LTS


Hi everyone,

I was drawing several histograms on ROOT, all of than with Y log scale. But one of than came with a different kind o scale. I just wanna to set it like the others.

This is the different one:
image

I want to set it like:
image

Can anybody help me?

Thanks!

0 is invalid in case of log scale. Some improvements were done after 5:34. Try to define a minimum positive (an epsilon).

Hi @couet, thanks for the answer

Actually that zero is from the X axis. The first one have not a cut along the axis, the second in 20 (this is the reason the second image do not shows the 20, one time it goes from 50 to 50). ROOT just adjusted the scale automatic and i want all to be the same.

I tried to use
“hs->GetYaxis()->SetLimits(1, pow(10,4));”
where hs is the stack histogram, but it did not work for Y, only for X.

My code are attached
met_transposition.cpp (2.4 KB)

hs->SetMinimum(1.); hs->SetMaximum(1.e4);

1 Like

It worked! Thanks @Wile_E_Coyote

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