Thanks Olivier.
I should check with the FAQ before posting to the list.
Regards,
Xinchun
On Thu, Jun 16, 2011 at 1:26 AM, Olivier Couet <Olivier.Couet_at_cern.ch>wrote:
> See http://root.cern.ch/drupal/faq#n562
>
> Olivier
>
> Le 16 juin 2011 à 04:50, "Xinchun Tian" <tianxc_at_gmail.com> a écrit :
>
> > Hi ROOTers,
> >
> > The histogram plotted using the following script does not fill h_QE
> correctly in the output ps file, but looks ok in interactive mode.
> > Any suggestions?
> >
> > ROOT 5.28/00a, Scientific Linux SLF release 5.4 (Lederman)
> >
> > Thanks,
> > Xinchun
> >
> >
> > #!/usr/bin/env python
> >
> > from ROOT import *
> >
> > f = TFile('histos.root')
> > c1 = TCanvas("c1","c1",10,10,800,600)
> > gPad.SetLeftMargin(0.15)
> > c1.Clear()
> > gStyle.SetPalette(1)
> > gStyle.SetOptStat(000)
> > gStyle.SetFillColor(10)
> > h_QE = f.Get("mcchkDetsimAna/fFLS_Ybj_QE")
> > h_DIS = f.Get("mcchkDetsimAna/fFLS_Ybj_DIS")
> > h_QE.SetLineColor(kBlue)
> > h_QE.SetFillColor(kBlue)
> > h_QE.SetFillStyle(3004)
> > h_QE.GetXaxis().SetTitle("Y_{bj}")
> > h_QE.GetYaxis().SetTitle("Events")
> > h_QE.Draw()
> > h_DIS.SetLineColor(kOrange)
> > h_DIS.Draw("same")
> > legend = TLegend(0.6,0.65,0.85,0.85,"")
> > legend.AddEntry(h_QE,"QE","f")
> > legend.AddEntry(h_DIS,"DIS","l")
> > legend.Draw()
> >
> > c1.Print("Ybj-GENIE.ps")
> >
>
Received on Thu Jun 16 2011 - 16:12:31 CEST
This archive was generated by hypermail 2.2.0 : Thu Jun 16 2011 - 23:50:02 CEST