Title, axis label size

how to change title and axis labeling of plot. i tried all commands in macro but it give me no affect? what should i do? kindly answer me some one urgently. thanks in advance

In the canvas, click on -> view -> editor, you will see an editing panel on the left side, then click on the title, axis whatever you want to change on the canvas/histogram, you can change those things from the left panel.

If you want to work on macro coding, then you need to get what you would like to change, e.g.
histogram_name->GetXaxis()->SetTitle(“years”);
it will name the x axis as years. For more details, you can check histogram TH1F, Th2D etc classes …

I am not an expert but hope it works!!!

Once you have done interactive editing on the canvas you can then save it as a .C file and you will see the corresponding command to be used in a macro.

1 Like

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