THStack Axis Font Issues

I need to enlarge the font on my axis labels for my presentations. Up until now I have been using Inkscape to adjust these sizes, but that is getting cumbersome now. I did the following perscription…

1: Generate the histos

2: Add them to a THStack

3: Create a canvas and then draw them (to get internals right)

4: Use THStack::GetHistogram() to get the histo and the axis

5: Use TH1::GetXaxis() and TAxis::SetTitleSize() to set the size

6: Draw again and then save to a file

The issue is when I draw it again in step 6 the axis title is cut off. I was under the impression that ROOT would resize the plot area to fit all the contents. Is there something I can do to make it not cut off the axis title’s? Thanks for any info.

Justace

You should use TAxis::SetLabelSize (not SetTitleSize) to set the size of the axis labels.
You can change the default by calling gStyle->SetLabelSize(size,“xyz”).
You can change the pad marging via
mypad->SetLeftMargin
You can change the position of the title via
TAxis::SetTitleOffset

The best way to learn the various actions is to perform changes on a picture by invoking the graphics editor (select the graphics editor fromn the canvas “view” menu) , make all the relevant changes with the mouse (UI should be obvious) and then generate
the C++ script corresponding to the canvas.

Rene