TPaveStats

From: ³ÂÏþ»Ô <xhchen_at_ihep.ac.cn>
Date: Mon, 21 Mar 2011 17:45:00 +0800

Hi all,

i want to change the position of TPaveStats using codes as follows:

 TCanvas* c=new TCanvas();

    TH1F* hist = new TH1F("hist", "hist", 100, -5, 5);

    hist->FillRandom("gaus",10000);
    hist->Draw();
    hist->Fit("gaus", "", "", -3, 3);
    gPad->Update();

    TPaveStats *st = (TPaveStats*)hist->FindObject("stats");
    st->SetX1(2);
    st->SetY1(300);
    st->SetX2(4);
    st->SetY2(400);

    //st->UseCurrentStyle();
    gPad->Update();
    c->Modify();  

but nothing happens, could you please tell me how to set the position of TPaveStats

Thank you! Received on Mon Mar 21 2011 - 10:45:11 CET

This archive was generated by hypermail 2.2.0 : Mon Mar 21 2011 - 11:50:02 CET