Remove 0 on y axis

Dear ROOT experts,

is it possible to remove the "0" on the y axis while plotting an histogram?

Here is a very simple piece of code:

TCanvas cc("cc","",800,600) TH1F* h = new TH1F("h","",10,0,10); h->FillRandom("gaus",1000)

The Y axis starts from 0, but I would like to remove, only in the style of the axis the “0”.
I managed to bypass the problem by setting the minimum of the histogram, but I’m wondering if this is possible just from the stylistic side, without touching the amount of information provided by the histogram.


Dear Andrea,
try the following instead of yours:

h->GetYaxis()->SetLimits(0.1,maximum value);

hope it helps.

have fun


Thank you for the suggestion.
In the following way it worked (SetLimits unfortunately did not):


Thanks for the feedback, I’ve learned something new from you, you’ve learned something new from me! :smiley:

Have fun!