iMi
1
Hello,
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
iMi
3
@couet
I tried with
gStyle->SetTitleH(0.5);
and I get the same size of letters but a lower positioning of the title within the histogram.
Why could that be?
1 Like
couet
4
Can you post a small reproducer ?
iMi
5
I tried
gStyle->SetTitleW(1.0);
This worked, it was related to the long title.
couet
6
you can also change the heigh:
gStyle->SetTitleH()
The title is in box. The size of the box is defined with gStyle->SetTitleW and gStyle->SetTitleH
iMi
7
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?
couet
8
No, you simply specify the text size:
https://root.cern/doc/master/classTH1.html#a10b144176bd57faf7b7fe6ec8c150556
Note the 2nd parameter (option) specifying the axis.
system
Closed
9
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.