[Rivet] Plotting defaults

Andy Buckley andy.buckley at ed.ac.uk
Mon Mar 22 22:31:46 GMT 2010


Hi Frank,

They all sound fine to me. I know it's orthogonal to the 1.2.1 release,
but since my efforts to use the GCC __attribute__((unused)) feature have
broken the Hudson builds I'm not going to release tonight after all. May
as well get these changes in if there's agreement (or at least no
opposition)!

Andy


On 22/03/10 17:10, Frank Siegert wrote:
> Hi guys,
> 
> I have a couple of simple local changes in the plotting scripts,
> which I would like to discuss as defaults:
> 
> 1. compare-histos: Use experiment name in legend, i.e. "data" -> "CDF data"
> Index: bin/compare-histos
> ===================================================================
> --- bin/compare-histos  (revision 2352)
> +++ bin/compare-histos  (working copy)
> @@ -329,7 +329,7 @@
>              if HISTOS[hfile][name].isdata:
>                  histstr += "ErrorBars=1\n"
>                  histstr += "PolyMarker=*\n"
> -                histstr += "Title=%s\n" % LABELS["REF"]
> +                histstr += "Title=%s data\n" % HISTOS[hfile][name].histoPath()[1:HISTOS[hfile][name].histoPath().find("_")]
>              else:
>                  color, style = STYLES[i % len(STYLES)]
>                  if opts.MC_ERRS:
> 
> 
> 
> 2. compare-histos: Data to appear first in the plot legend.
> Index: bin/compare-histos
> ===================================================================
> --- bin/compare-histos  (revision 2352)
> +++ bin/compare-histos  (working copy)
> @@ -256,7 +256,7 @@
> 
>          ## Identify contributing data files for this histo
>          activefiles = []
> -        for f in FILES + ["REF"]:
> +        for f in ["REF"] + FILES:
>              if HISTOS.has_key(f):
>                  d = HISTOS[f]
>                  if d.has_key(name):
> 
> 
> 3. make-plots: Enable ticks on all four axes (forcing a slightly modified LegendYPos)
> Index: bin/make-plots
> ===================================================================
> --- bin/make-plots      (revision 2352)
> +++ bin/make-plots      (working copy)
> @@ -662,7 +662,7 @@
>          if self.description.has_key('LegendYPos'):
>              return self.description['LegendYPos']
>          else:
> -            return '0.98'
> +            return '0.92'
> 
> 
> 
> @@ -1331,9 +1331,9 @@
> 
>  class XTicks(Ticks):
>      def draw(self, customticks=[], custommajortickmarks=-1, customminortickmarks=-1,drawlabels=True):
> -        twosided = False
> -        if self.description.has_key('XTwosidedTicks') and self.description['XTwosidedTicks']=='1':
> -            twosided = True
> +        twosided = True
> +        if self.description.has_key('XTwosidedTicks') and self.description['XTwosidedTicks']=='0':
> +            twosided = False
>          out = ""
>          out += ('\n%\n% X-Ticks\n%\n')
>          out += ('\\def\\majortickmarkx{\\psline[linewidth='+self.majorticklinewidth+'](0,0)(0,'+self.majorticklength+')}%\n')
> @@ -1370,9 +1370,9 @@
> 
>  class YTicks(Ticks):
>      def draw(self, customticks=[], custommajortickmarks=-1, customminortickmarks=-1):
> -        twosided = False
> -        if self.description.has_key('YTwosidedTicks') and self.description['YTwosidedTicks']=='1':
> -            twosided = True
> +        twosided = True
> +        if self.description.has_key('YTwosidedTicks') and self.description['YTwosidedTicks']=='0':
> +            twosided = False
>          out = ""
>          out += ('\n%\n% Y-Ticks\n%\n')
>          out += ('\\def\\majortickmarky{\\psline[linewidth='+self.majorticklinewidth+'](0,0)('+self.majorticklength+',0)}%\n')
> 
> 
> 
> Do you think some or all of those could become Rivet defaults? I believe
> they would improve plot quality.
> 
> Cheers,
> Frank
> 
> PS: This is completely independent of the 1.2.1 release.
> _______________________________________________
> Rivet mailing list
> Rivet at projects.hepforge.org
> http://www.hepforge.org/lists/listinfo/rivet
> 


-- 
Dr Andy Buckley
SUPA Advanced Research Fellow
Particle Physics Experiment Group, University of Edinburgh


More information about the Rivet mailing list