|
[Rivet-svn] rivet: Tweak plot and subplot sizing defaults in make-plots so t...Rivet Mercurial rivet at projects.hepforge.orgThu Nov 12 01:15:01 GMT 2015
details: https://rivet.hepforge.org/hg/rivet/rev/135635b2c65f branches: release-2-4-x changeset: 4924:135635b2c65f user: Andy Buckley <andy at insectnation.org> date: Thu Nov 12 01:05:08 2015 +0000 description: Tweak plot and subplot sizing defaults in make-plots so the total canvas is always the same size by default diffs (truncated from 58 to 50 lines): --- a/ChangeLog Tue Nov 10 15:55:03 2015 +0000 +++ b/ChangeLog Thu Nov 12 01:05:08 2015 +0000 @@ -1,3 +1,8 @@ +2015-11-12 Andy Buckley <andy.buckley at cern.ch> + + * Tweak plot and subplot sizing defaults in make-plots so the + total canvas is always the same size by default. + 2015-11-10 Andy Buckley <andy.buckley at cern.ch> * Handle 2D histograms better in rivet-cmphistos (since they can't be overlaid) --- a/bin/make-plots Tue Nov 10 15:55:03 2015 +0000 +++ b/bin/make-plots Thu Nov 12 01:05:08 2015 +0000 @@ -108,28 +108,32 @@ self.apply_config_files(opts.CONFIGFILES) - self.description['PlotSizeX'] = 10. + + ## Plot (and subplot) sizing + self.description.setdefault('PlotSizeX', 10.) if self.description['is2dim']: self.description['PlotSizeX'] -= 1.5 - self.description['PlotSizeY'] = 6. + self.description['MainPlot'] = '1' + self.description['RatioPlot'] = '0' + if self.description.has_key('PlotSize') and self.description['PlotSize']!='': plotsizex,plotsizey = self.description['PlotSize'].split(',') self.description['PlotSizeX'] = float(plotsizex) self.description['PlotSizeY'] = float(plotsizey) del self.description['PlotSize'] - self.description['RatioPlotSizeY'] = 0. - if self.description.has_key('MainPlot') and self.description['MainPlot']=='0': - self.description['RatioPlot'] = '1' + if self.description.get('MainPlot', '1') == '0': + self.description['RatioPlot'] = '1' #< don't allow both to be zero! 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']) + self.description.setdefault('RatioPlotSizeY', 9.) + else: + if self.description.get('RatioPlot', '0') == '1': + self.description.setdefault('PlotSizeY', 6.) + self.description.setdefault('RatioPlotSizeY', self.description.get('RatioPlotYSize', 3.)) else: - if self.description.has_key('MainPlot') and self.description['MainPlot']=='0': - self.description['RatioPlotSizeY'] = 6.
More information about the Rivet-svn mailing list |