[Rivet-svn] rivet: 4 new changesets

Rivet Mercurial rivet at projects.hepforge.org
Tue Mar 27 14:45:02 BST 2018


details:   https://rivet.hepforge.org/hg/rivet/rev/6f687ea170ae
branches:  release-2-6-x
changeset: 6255:6f687ea170ae
user:      Andy Buckley <andy at insectnation.org>
date:      Tue Mar 13 21:33:43 2018 +0000
description:
Tweak TeX

details:   https://rivet.hepforge.org/hg/rivet/rev/5614170e12d5
branches:  release-2-6-x
changeset: 6256:5614170e12d5
user:      Andy Buckley <andy at insectnation.org>
date:      Tue Mar 27 14:33:16 2018 +0100
description:
Add RatioPlotLogY key to make-plots. Thanks to Antonin Maire.

details:   https://rivet.hepforge.org/hg/rivet/rev/fc52c72da436
branches:  fastplot
changeset: 6257:fc52c72da436
user:      Andy Buckley <andy at insectnation.org>
date:      Tue Mar 27 14:33:39 2018 +0100
description:
Add RatioPlotLogY key to make-plots. Thanks to Antonin Maire.

details:   https://rivet.hepforge.org/hg/rivet/rev/e8d7e835a24c
branches:  fastplot
changeset: 6258:e8d7e835a24c
user:      Andy Buckley <andy at insectnation.org>
date:      Tue Mar 27 14:42:22 2018 +0100
description:
Merge from release-2-6 branch

diffs (truncated from 104 to 50 lines):

--- a/ChangeLog	Thu Mar 15 09:51:57 2018 +0000
+++ b/ChangeLog	Tue Mar 27 14:42:22 2018 +0100
@@ -1,3 +1,7 @@
+2018-03-27  Andy Buckley  <andy.buckley at cern.ch>
+
+	* Add RatioPlotLogY key to make-plots. Thanks to Antonin Maire.
+
 2018-02-22  Andy Buckley  <andy.buckley at cern.ch>
 
 	* Adding boolean operator syntactic sugar for composition of bool functors.
--- a/bin/make-plots	Thu Mar 15 09:51:57 2018 +0000
+++ b/bin/make-plots	Tue Mar 27 14:42:22 2018 +0100
@@ -217,6 +217,8 @@
         self.description['LogX'] = str(self.description.get('LogX', 0)) in ["1", "yes", "true"]
         self.description['LogY'] = str(self.description.get('LogY', 0)) in ["1", "yes", "true"]
         self.description['LogZ'] = str(self.description.get('LogZ', 0)) in ["1", "yes", "true"]
+        self.description['RatioPlotLogY'] = str(self.description.get('RatioPlotLogY', 0)) in ["1", "yes", "true"]
+
         if 'Rebin' in self.description:
             for i in self.histos:
                 self.histos[i].description['Rebin'] = self.description['Rebin']
@@ -651,6 +653,7 @@
         out += ('\\begin{document}\n')
         out += ('\\pagestyle{empty}\n')
         out += ('\\SpecialCoor\n')
+        #out += '\\begin{multipage}\n'
         out += ('\\begin{pspicture}(0,0)(0,0)\n')
         out += ('\\psset{xunit=%scm}\n' %(inputdata.description['PlotSizeX']))
         if inputdata.description['is2dim']:
@@ -665,6 +668,8 @@
     def write_footer(self):
         out = ""
         out += ('\\end{pspicture}\n')
+        #out += '\\end{multipage}\n'
+        #out += '%\n%\n'
         out += ('\\end{document}\n')
         return out
 
@@ -2262,10 +2267,7 @@
         prefix = ''
         if plotlog:
             bar = int(log10(value))
-            if bar < 0:
-                sign='-'
-            else:
-                sign='\\,'
+            sign='-' if bar < 0 else '\\,'
             if minor: # The power of ten is only to be added to the last minor tick label
                 if lastminor:
                     label = str(int(value/(10**bar))) + "\\cdot" + '10$^{'+sign+'\\text{'+str(abs(bar))+'}}$'


More information about the Rivet-svn mailing list