[Rivet] RatioPlotYSize or RatioPlotSizeY?

Andy Buckley andy.buckley at cern.ch
Tue Apr 3 12:34:11 BST 2018


Hi Jon,

Thanks for looking at this -- much appreciated. It's been a long time since I had a chance to do significant work on make-plots: there's still a "fast" version & branch in the works, and of course we've had several attempts to rewrite it with matplotlib but none yet whose output looks good enough... and they are not fast.
If I remember correctly, and from glancing through the code, the preference is for ...SizeY etc. rather than ...YSize. The latter reads more naturally as English, but the former alphabetically sorts together with the X version and the raw (Ratio)PlotSize: a bit nicer in a configuration interface. So I think we should fix the documentation to only use ...SizeX/Y.
I didn't find your quoted code in the live branches, though. The closest I see is this, where the ...YSize is only used as a fallback before the hard-coded default, should no ...SizeY be found:
if self.description.get('MainPlot', '1') == '0':
## Ratio, no main
self.description['RatioPlot'] = '1' #< don't allow both to be zero!
self.description['PlotSizeY'] = 0.
self.description.setdefault('RatioPlotSizeY', 9.)
else:
if self.description.get('RatioPlot', '0') == '1':
## Main and ratio
self.description.setdefault('PlotSizeY', 6.)
self.description.setdefault('RatioPlotSizeY', self.description.get('RatioPlotYSize', 3.))

Which version are you working from?
Thanks,
Andy

Dr Andy Buckley, Lecturer / Royal Society University Research Fellow
Particle Physics Experiment Group, University of Glasgow

On Apr 3 2018, at 12:20 pm, Jonathan Butterworth <J.Butterworth at ucl.ac.uk> wrote:
>
> Hi all,
> There seems to be some confusion in make-plots between these two
> attributes. The documentation says RatioPlotYSize but only
> RatioPlotSizeY actually works for me. Looking at the code, both appear,
> in a way which looks buggy to me (see below), but which is confusing
> enough that I am not 100% sure.
>
> I changed the documentation to say RatioPlotSizeY since that works for
> me, but having looked at the source code I hesistate to change that in
> case there are reasons I haven't appreciated...
>
> Should I change it all to RatioPlotSizeY ?
> Cheers,
> Jon
>
>
> self.description['RatioPlotSizeY'] = 0.
> if self.description.has_key('MainPlot') and
> self.description['MainPlot']=='0':
> self.description['RatioPlot'] = '1'
> self.description['PlotSizeY'] = 0.
> if self.description.has_key('RatioPlot') and
> self.description['RatioPlot']=='1':
> if self.description.has_key('RatioPlotYSize') and
> self.description['RatioPlotYSize']!='':
> self.description['RatioPlotSizeY'] =
> float(self.description['RatioPlotYSize'])
> else:
> if self.description.has_key('MainPlot') and
> self.description['MainPlot']=='0':
> self.description['RatioPlotSizeY'] = 6.
> else:
> self.description['RatioPlotSizeY'] = 3.
>
> --
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Prof. Jonathan Butterworth, http://www.hep.ucl.ac.uk/~jmb/
> Head, Physics and Astronomy Department Tel: +44 20 7679 3444
> University College London Gower St, London WC1E 6BT, UK
> ATLAS, CERN Tel: +41 22 76 72340
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> _______________________________________________
> 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/20180403/2b34e5cf/attachment.html>


More information about the Rivet mailing list