Histogram Title size


I need to increase the size of a histogram title for readability.

What is a straightforward way of implementing this?

I am thinking of something like: Make the title width as wide as the canvas for a particular font.

Or: Break the title into two lines with a font covering the width of the canvas.

Thanks, iMi



I tried with


and I get the same size of letters but a lower positioning of the title within the histogram.

Why could that be?

Can you post a small reproducer ?

I tried


This worked, it was related to the long title.

you can also change the heigh:


The title is in box. The size of the box is defined with gStyle->SetTitleW and gStyle->SetTitleH

Do the titles of the axes also sit in boxes?

So, I set the axis title like this:

imgFull [iev]-> GetXaxis()->SetTitle(“size [mm]”);

How do I manipulate them?

No, you simply specify the text size:
Note the 2nd parameter (option) specifying the axis.

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