TPaveText - autosize?

Hi all,

I want to put two labels in my plot. I tried to do with two TPaveTexts, Both labels have a different number of lines, and I have other plots where there is even a fourth line in the first label). TPaveText does all sorts of automatic adjustments to the spacing, depending on the size of the TPaveText. This makes it difficult to let both lables look alike.

Any suggestions?

  • Mo

1 Like

The size of the PaveStats is defined and then the text size is computed to fit in this box. If you need to change the pave size you can have a look at or $ROOTSYS/tutorials/hist/transpad.C
To make sure the text size is the same in two separated box I guess you can define the Y size proportional to the number of lines (same proportion in both boxes), it should work.

I suggest using font size in pixels, eg

pave.SetTextFont(53); pave.SetTextSize(12); //fonts will be 12 pixels

Yes sure … I always forget that … :-))) …