Axis at the right side of a histogram

Hi Rooters,

I would like to draw a TH1 in its private TPad for overlaying. Its Y axis should appear on the right side instead of the left. Of course, one could draw the histogram without an axis and add one manually. But is there really no way of telling either the pad or the histogram where the axis should be drawn?

Thanks,

Moritz

I will look at this. There is no simple way right now to do that. New option in hist->Draw() might be the best way.

I have implemented two new drawing options:

“X+” to paint the X axis on top of the plot (default is bottom)
“Y+” to paint the Y axis on right of the plot (default is left).

So to paint a histogram (or graph) with the Y axis on right just do:

h->Draw(“Y+”);

as any drawing option it can be concatenated with other drawing options.

1 Like