RooPlot: how do I set a font size of stat box?

Hi,

for my plot I use paramOn() call. It produces the parameters box, but I am not happy with the font size. How can I change it? I did not find any methods like SetFontSize()…

Thanks in advance,
Alexander

It Would be SetTextSize() … you are talking about the Stat Box ? do you have a tiny example showing what you speak about ?

Hi,

You can change the text attributes as follows

myPdf->paramOn(frame) ;
frame->getAttText()->SetTextSize() ;

If you want to change the size or location of the box, do e.g.

myPdf->paramOn(frame,Layout(xmin,ymin,ymax)) ;

where xmin,ymin and ymax are fractions w.rt.t the plot frame size.

                                                                     Wouter

(You need to do a ‘using namespace RooFIt’ first to be able to use
the Layout() function. For compiled code you additionally need
to include “RooGlobalFunc.h”)

Line spaces are automatically reduced?
In my case, they did not change.

Can you send a small running example showing what you are talking about ?

Dear couet,

Thank you for answer.

I added line 63 to rf106_plotdecoration.C

62 gauss.paramOn(frame,Layout(0.55)) ;
63 frame->getAttText()->SetTextSize(0.01);

However, just text size become small.
I wanted to let line spaces narrow, also.

Best regards,
K. Sakai

I meant a small macro we can run to see what you are talking about.
Can you send one ?

Thank you for correction to my lazy style question.
I added .C file (it is not my original).
root.cern.ch/root/html/tutorials … ion.C.html

In this .C, frame->getAttText()->SetTextSize(0.01); works correctly.
I want to change line space also.

Best regards,
K. Sakai
rf106_plotdecoration.C (2.83 KB)

This is a question specific to RooPlot (RooFit) and Wouter Verkerke (the RooFit author and mantainer) will answer to you.

Lorenzo