|
[Rivet] Ahistogram with two variables one on the y-axis and one on the x-axisAndy Buckley andy.buckley at cern.chTue Nov 28 11:57:17 GMT 2017
Hi Shayma, You are calling a Scatter2D constructor that pre-populates with 50 "bin-like" data points, all with y-value = 0. In this case you need to set your y-values on the existing points, rather than adding new ones. Or create a scatter with no points to begin with, e.g. bookScatter2D("charged_eta_Vs_Pt", false, "title","x-axis","y-axis"); This code will produce a *huge* scatter plot, though -- presumably one point per event? I suspect you really want a Histo2D. Andy On 16 November 2017 at 14:57, Shayma Wahdan <shayma.wahdan at cern.ch> wrote: > Hello, > > I am attaching my code. > > Many thanks > > Regards, > Shayma > ________________________________________ > From: David Grellscheid [david.grellscheid at durham.ac.uk] > Sent: 16 November 2017 11:09 > To: Shayma Wahdan > Cc: Rivet > Subject: Re: [Rivet] Ahistogram with two variables one on the y-axis and one on the x-axis > > Hi, > > it's hard to tell what's going on without seeing your whole code. Can > you please send a copy? > > Thanks, > > David > > > > > On 15/11/17 17:21, Shayma Wahdan wrote: >> Prof. Grellscheid, >> >> Many thanks for your reply, I am trying to use the scatter2D plot >> >> Exactly I put in my code >> >> Scatter2DPtr _h_charged_eta_Pt_top; >> _h_charged_eta_Pt_top = bookScatter2D("charged_eta_Vs_Pt", 50, 0, 150,"title","x-axis","y-axis"); >> _h_charged_eta_Pt_top->addPoint(FourMom.pT()/GeV,FourMom.eta(),0.0,0.0); >> >> and what the resulted plot are attached, I want to have the eta on the y-axis, the pt on the x-axis. >> The axis titles in the attached plot are not correct >> The plots look unreasonable, >> >> sorry for being annoying >> >> Best Regards, >> Shayma' Wahdan >> ________________________________________ >> From: David Grellscheid [david.grellscheid at durham.ac.uk] >> Sent: 15 November 2017 12:28 >> To: Shayma Wahdan; rivet at projects.hepforge.org >> Subject: Re: [Rivet] Ahistogram with two variables one on the y-axis and one on the x-axis >> >> Dear Shayma, >> >> If you want to see a scatter plot of points in the pT/rap plane, use >> Scatter2D and addPoint(x,y,xerr,yerr). For a binned filling of the >> pT/rap plane that e.g. could be turned into a lego plot, use Histo2D and >> fill(x,y) >> >> See you, >> >> David >> >> On 14/11/2017 20:32, Shayma Wahdan wrote: >>> Dear Revit community, >>> >>> I am a new Rivet user, can I get help to know how can I generate a plot with revit with forexample the pt on the y-axis and the rapidity on the x-axis, with bookHisto1D I always get the bin sum on the y-axis >>> >>> also Histo2D, and Profile1D !! >>> >>> Best Regards, >>> Shayma >>> >>> >>> >>> _______________________________________________ >>> Rivet mailing list >>> Rivet at projects.hepforge.org >>> https://www.hepforge.org/lists/listinfo/rivet >>> > > _______________________________________________ > Rivet mailing list > Rivet at projects.hepforge.org > https://www.hepforge.org/lists/listinfo/rivet -- Dr Andy Buckley, Lecturer / Royal Society University Research Fellow Particle Physics Expt Group, University of Glasgow
More information about the Rivet mailing list |