[Rivet-svn] r3375 - in trunk: . bin doc

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Mon Sep 19 16:28:16 BST 2011


Author: hoeth
Date: Mon Sep 19 16:28:16 2011
New Revision: 3375

Log:
Adding FrameColor option to make-plots

Modified:
   trunk/ChangeLog
   trunk/bin/make-plots
   trunk/doc/make-plots.txt

Modified: trunk/ChangeLog
==============================================================================
--- trunk/ChangeLog	Mon Sep 19 15:27:24 2011	(r3374)
+++ trunk/ChangeLog	Mon Sep 19 16:28:16 2011	(r3375)
@@ -1,6 +1,7 @@
 2011-09-19  Hendrik Hoeth <hendrik.hoeth at cern.ch>
 
-	* make-plots: Fixing regex for \physicscoor
+	* make-plots: Fixing regex for \physicscoor. Adding "FrameColor"
+	option.
 
 2011-09-17  Andy Buckley  <andy at insectnation.org>
 

Modified: trunk/bin/make-plots
==============================================================================
--- trunk/bin/make-plots	Mon Sep 19 15:27:24 2011	(r3374)
+++ trunk/bin/make-plots	Mon Sep 19 16:28:16 2011	(r3375)
@@ -596,7 +596,7 @@
 
         inputdata.description.setdefault('GofLegend','0')
         inputdata.description.setdefault('GofFrame','')
-        inputdata.description['DrawGofFrame']=None
+        inputdata.description.setdefault('FrameColor',None)
 
         for i in inputdata.description['DrawOnly']:
             if i==refdata: continue
@@ -605,8 +605,8 @@
             if inputdata.description.has_key('GofType') and inputdata.description['GofType']!='chi2':
                 return
             gof = inputdata.histos[i].getChi2(inputdata.histos[refdata])
-            if i==inputdata.description['GofFrame']:
-                inputdata.description['DrawGofFrame']=pickcolor(gof)
+            if i==inputdata.description['GofFrame'] and inputdata.description['FrameColor']==None:
+                inputdata.description['FrameColor']=pickcolor(gof)
             if inputdata.histos[i].description.setdefault('Title', '')!='':
                 inputdata.histos[i].description['Title'] += ', '
             inputdata.histos[i].description['Title'] += '$\\chi^2/n={}$%1.2f' %gof
@@ -1600,10 +1600,10 @@
 
     def draw(self,inputdata):
         out = ('\n%\n% Frame\n%\n')
-        if inputdata.description.has_key('DrawGofFrame') and inputdata.description['DrawGofFrame']!=None:
-            color = inputdata.description['DrawGofFrame']
+        if inputdata.description.has_key('FrameColor') and inputdata.description['FrameColor']!=None:
+            color = inputdata.description['FrameColor']
             # We want to draw this frame only once, so set it to False for next time:
-            inputdata.description['DrawGofFrame']=None
+            inputdata.description['FrameColor']=None
 
             # Calculate how high and wide the overall plot is
             height = [0,0]

Modified: trunk/doc/make-plots.txt
==============================================================================
--- trunk/doc/make-plots.txt	Mon Sep 19 15:27:24 2011	(r3374)
+++ trunk/doc/make-plots.txt	Mon Sep 19 16:28:16 2011	(r3375)
@@ -209,6 +209,11 @@
 --------------------
 Distance between the plot and the paper edge.
 
+--------------------
+FrameColor=<color>
+--------------------
+Background color for the margin around the plot.
+
 
 Legends
 ^^^^^^^
@@ -349,7 +354,8 @@
 `GofLegend` calculates the GoF for all histograms and displays the results in
 the legend. With `GofFrame` you can specify a single histogram for which the
 GoF result will be shown in the legend and used to assign a color to the plot
-margins. You can use
+margins. Note that `FrameColor` overrides the color choice for the margin.
+You can use
 
 --------------------
 GofFrameColor=<colorthresholds>
@@ -357,7 +363,8 @@
 
 to specify the thresholds for the frame color. This option takes a list of
 `<threshold>:<color>` pairs, separated by whitespace. The default is
-`GofFrameColor=0:green 3:yellow 6:red!70`.
+`GofFrameColor=0:green 3:yellow 6:red!70`. Again, if you use `FrameColor`,
+this option is disabled.
 
 
 Color Palettes for 2-dim Plots


More information about the Rivet-svn mailing list