Hi Luca,
Do something like:
{
TFile *f=TFile::Open("hsimple.root");
TTree *ntuple = (TTree*)f->Get("ntuple");
TCanvas *c1 = new TCanvas();
c1->SetLogy();
ntuple->Draw("pz:px>>h2(50,-3,3,50,1e-2,20)","","");
TH2 *h2 = (TH2*)gDirectory->Get("h2");
h2->SetMaximum(0);
h2->Draw("sames");
}
Rene Brun
Luca Grandi wrote:
> Dear all,
>
> I need to draw a scatter plot inside a fixed frame with logarithmic scale on
> y axis. I use this set of commands
>
> gPad->SetLogy();
> gPad->DrawFrame(0,0.1,1.2,1000.);
> chain->Draw("br.S2/br.S1:br.testp_070",good_signal_cut,"same");
>
> I am not able to draw in the same plot the stats box even if i use
> gStyle->SetOptStat(1). I have tried using "sames" option without any luck.
> Suggestions? At least I am interested in the number of events plotted.
>
> thanks
>
> luca
>
>
Received on Mon Oct 23 2006 - 20:55:15 MEST
This archive was generated by hypermail 2.2.0 : Mon Jan 01 2007 - 16:32:01 MET