[Rivet-svn] rivet: Add white backgrounds to make-plots main and ratio plot f...

Rivet Mercurial rivet at projects.hepforge.org
Sun Sep 10 22:45:02 BST 2017


details:   https://rivet.hepforge.org/hg/rivet/rev/9304f87f61f4
branches:  
changeset: 6010:9304f87f61f4
user:      Andy Buckley <andy at insectnation.org>
date:      Sun Sep 10 11:55:10 2017 +0100
description:
Add white backgrounds to make-plots main and ratio plot frames

diffs (truncated from 89 to 50 lines):

--- a/ChangeLog	Tue Sep 05 17:53:23 2017 +0100
+++ b/ChangeLog	Sun Sep 10 11:55:10 2017 +0100
@@ -1,3 +1,7 @@
+2017-09-10  Andy Buckley  <andy.buckley at cern.ch>
+
+	* Add white backgrounds to make-plots main and ratio plot frames.
+
 2017-09-05  Andy Buckley  <andy.buckley at cern.ch>
 
 	* Add CMS_2016_PAS_TOP_15_006 jet multiplicity in lepton+jets ttbar at 8 TeV analysis.
--- a/bin/make-plots	Tue Sep 05 17:53:23 2017 +0100
+++ b/bin/make-plots	Sun Sep 10 11:55:10 2017 +0100
@@ -695,6 +695,12 @@
     def _draw(self, inputdata):
         out = ""
 
+        ## Draw a white background first
+        # TODO: Allow specifying in-frame bg color
+        out += '\n'
+        out += '\\psframe[linewidth=0pt,linestyle=none,fillstyle=solid,fillcolor=white,dimen=middle](0,0)(1,1)\n'
+        out += '\n'
+
         # TODO: do this more compactly, e.g. by assigning sorting keys!
         if inputdata.attr_bool('DrawSpecialFirst', False):
             for s in inputdata.special.values():
@@ -726,9 +732,11 @@
         if inputdata.attr_bool('Legend', False):
             legend = Legend(inputdata.description,inputdata.histos,inputdata.functions)
             out += legend.draw()
+
         if inputdata.description['is2dim']:
             colorscale = ColorScale(inputdata.description, self.coors)
             out += colorscale.draw()
+
         frame = Frame()
         out += frame.draw(inputdata)
 
@@ -943,6 +951,13 @@
 
     def _draw(self, inputdata):
         out = ""
+
+        ## Draw a white background first
+        # TODO: Allow specifying in-frame bg color
+        out += '\n'
+        out += '\\psframe[linewidth=0pt,linestyle=none,fillstyle=solid,fillcolor=white,dimen=middle](0,0)(1,1)\n'
+        out += '\n'
+
         for i in inputdata.description['DrawOnly']:
             if inputdata.description.has_key('RatioPlotMode') and inputdata.description['RatioPlotMode'] == 'datamc':


More information about the Rivet-svn mailing list