|
[Rivet] make-plots - possibility to have LogY also for ratio plotsAntonin Maire (CERN) antonin.maire at cern.chMon Mar 5 18:50:36 GMT 2018
Hi Andy (all), just to reiterate on this : I am not a Python coder but, in case, the single line I introduced in bin/make-plots (see below) was enough to get the thing works. In other words, I only introduced a new flag ("RatioPlotLogY") to activate the logY mode for the ratio plot. Cheers, Antonin Le 05/03/2018 à 18:54, Andy Buckley a écrit : > Hi Antonin, all, > > Apologies for the delayed response! > > I've been thinking for a while that a log y-axis in the ratio plot > would be a nice option. Unfortunately manpower is particualrly short > on the plotting tools and so I can't promise anything concrete -- any > chance that you could take a look and propose a patch? (I don't > remember how much common functionality there is between the MainPlot > and RatioPlot classes, but I think both use a YAxis drawing object, so > maybe we just need to provide a config flag to activate the log mode...) > > Thanks, > Andy > > *Dr Andy Buckley, Lecturer / Royal Society University Research Fellow* > Particle Physics Experiment Group, University of Glasgow > > > > On Feb 14 2018, at 9:25 am, Antonin Maire (CERN) > <antonin.maire at cern.ch> wrote: > > > Good morning Rivet authors, > > I am currently working with Rivet 2.5.1 (ALICE central installation > on Grid) but my personal demand seems to be still valid in version 3.0 > alpha. > > Would it be possible to introduce the possibility to have LogY option > also for ratio plots ? > > To do that, I have tampered with bin/make-plots python code by having > the following change : > > In v2.5.1 > @@ -208,6 +212,7 @@ class InputData(Described): > self.description['LogX'] = self.description.has_key('LogX') > and self.description['LogX']=='1' > self.description['LogY'] = self.description.has_key('LogY') > and self.description['LogY']=='1' > self.description['LogZ'] = self.description.has_key('LogZ') > and self.description['LogZ']=='1' > + self.description['RatioPlotLogY'] = > self.description.has_key('RatioPlotLogY') and > self.description['RatioPlotLogY']=='1' > if self.description.has_key('Rebin'): > for i in self.histos: > self.histos[i].description['Rebin'] = > self.description['Rebin'] > > The same lines are around l.135 in v3.0.0alpha1 > > I am not a Python coder so my solution may not be the best (you > may have > better to propose...), but at least having instructions like > 'RatioPlotLogY=1' into .plot files seems to produce the expected > result. > > Regards, > Antonin > > _______________________________________________ > Rivet mailing list > Rivet at projects.hepforge.org > https://www.hepforge.org/lists/listinfo/rivet > -------------- next part -------------- An HTML attachment was scrubbed... URL: <https://www.hepforge.org/lists-archive/rivet/attachments/20180305/08376e25/attachment.html>
More information about the Rivet mailing list |