[Rivet-svn] r2986 - in trunk: . bin

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Sun Feb 27 14:34:15 GMT 2011


Author: hoeth
Date: Sun Feb 27 14:34:15 2011
New Revision: 2986

Log:
New command line option --style for compare-histos. Choices are default, bw and talk.

Modified:
   trunk/ChangeLog
   trunk/bin/compare-histos

Modified: trunk/ChangeLog
==============================================================================
--- trunk/ChangeLog	Sun Feb 27 14:15:56 2011	(r2985)
+++ trunk/ChangeLog	Sun Feb 27 14:34:15 2011	(r2986)
@@ -2,6 +2,9 @@
 
 	* Support LineStyle=dashdotted in make-plots
 
+	* New command line option --style for compare-histos. Options are
+	"default", "bw" and "talk".
+
 	* cleaner uninstall
 
 2011-02-26  Andy Buckley  <andy at insectnation.org>

Modified: trunk/bin/compare-histos
==============================================================================
--- trunk/bin/compare-histos	Sun Feb 27 14:15:56 2011	(r2985)
+++ trunk/bin/compare-histos	Sun Feb 27 14:34:15 2011	(r2986)
@@ -107,6 +107,7 @@
                       default=False, help="show the ratio plots scaled to the ref error")
     stygroup.add_option("--abs-ratio", action="store_false", dest="RATIO_DEVIATION",
                       default=False, help="show the ratio plots with an absolute scale")
+    stygroup.add_option("--style", dest="STYLE", default="default", help="change plotting style: default|bw|talk")
     parser.add_option_group(stygroup)
 
     selgroup = OptionGroup(parser, "Selective plotting")
@@ -158,13 +159,24 @@
 
 
     ## Line styles
-    COLORS = ('red', 'blue', '{[rgb]{0.12,0.57,0.14}}', 'magenta', 'orange')
-    LINESTYLES = ('solid', 'dashed', 'dotted')
+    HISTSTYLES = ''
+    PLOTSTYLES = ''
+    COLORS = ('red', 'blue', '{[rgb]{0.12,0.57,0.14}}', 'magenta')
+    LINESTYLES = ('solid', 'dashed', 'dashdotted', 'dotted')
     STYLES=[]
     for ls in LINESTYLES:
         for c in COLORS:
             STYLES.append( (c, ls) )
-
+    if opts.STYLE=='talk':
+        PLOTSTYLES += 'PlotSize=8,6\n'
+        HISTSTYLES += 'LineWidth=1pt\n'
+    if opts.STYLE=='bw':
+        PLOTSTYLES += 'RatioPlotErrorBandColor=black!10\n'
+        COLORS = ('black!90', 'black!50', 'black!30')
+        STYLES=[]
+        for c in COLORS:
+            for ls in LINESTYLES:
+                STYLES.append( (c, ls) )
 
     ## Get file names and labels
     FILES = []
@@ -391,6 +403,7 @@
 
 
         headstr  = "# BEGIN PLOT\n"
+        headstr += PLOTSTYLES
         for param, default in paramdefaults.iteritems():
             if param not in headers:
                 headers[param] = default
@@ -423,10 +436,12 @@
         for hfile in activefiles:
             histstr = '# BEGIN HISTOGRAM %s%s\n' % (hfile, HISTOS[hfile][name].fullPath())
             if HISTOS[hfile][name].isdata:
+                histstr += HISTSTYLES
                 histstr += "ErrorBars=1\n"
                 histstr += "PolyMarker=*\n"
                 histstr += "Title=%s\n" % LABELS[hfile][name]
             else:
+                histstr += HISTSTYLES
                 color, style = STYLES[i % len(STYLES)]
                 if opts.MC_ERRS:
                     histstr += "ErrorBars=1\n"


More information about the Rivet-svn mailing list