TPaveText -> How to add mean value/RMS?

Hi,

since i’m pretty new to ROOT i’d like to ask,
is it possible to create a TPaveText table with two entries, displaying for example the mean value and rms of the 2 variables i’ve already plotted before?
i’d like to have something like this in a table;

m1=… RMS1=…
m2=… RMS2=…

i have a script generating random numbers (eg. my variable 1 comes form a gaussian distribution)

thanks in advance :wink:
Emma

Here is an idea:

void pavetext1(){
   TCanvas *c = new TCanvas("c");
   TPaveText *pt = new TPaveText(.05,.1,.95,.8);
   Double_t m1 = 10.;
   Double_t RMS1 = 3.14;
   Double_t m2 = 10.987;
   Double_t RMS2 = 3.14159;

   pt->AddText(Form("m1 = %g RMS1 = %g",m1,RMS1));
   pt->AddText(Form("m2 = %g RMS2 = %g",m2,RMS2));

   pt->Draw();

}

that worked, thanks a lot !