How to change the title font size of the graph

The code I tried to use is gStyle->GetTitleFontSize()->SetTitleFontSize(0.6),but it didn’t work out.I just found the solution to histogram.Could you help me?Thanks a million.

ROOT Version: Not Provided
Platform: Not Provided
Compiler: Not Provided

Before drawing the graph, try: gStyle->SetTitleFontSize(0.6);

Thank you for your reply!I tried. Only a similar text box around the title got bigger, but the font didn’t

Try to add: gStyle->SetTitleFont(62, ""); // set the pad title font

I’m sorry this doesn’t work.But it can be modified in the Graphical User Interface. I have to draw a lot of pictures, so I can’t do this every time.

Please accept my best thanks.

Once you modified it using the GUI, save the pad as a .C file and you will see which commands are needed.

1 Like

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