[Rivet-svn] rivet: Allow multi-line major tick labels on make-plots linear x...

Rivet Mercurial rivet at projects.hepforge.org
Sat Mar 12 21:30:01 GMT 2016


details:   https://rivet.hepforge.org/hg/rivet/rev/5e73177ee0f8
branches:  release-2-4-x
changeset: 5019:5e73177ee0f8
user:      Andy Buckley <andy at insectnation.org>
date:      Sat Mar 12 21:28:54 2016 +0000
description:
Allow multi-line major tick labels on make-plots linear x and y axes. Linebreaks are indicated by \n in the .dat file.

diffs (truncated from 125 to 50 lines):

--- a/ChangeLog	Wed Mar 09 17:52:15 2016 +0000
+++ b/ChangeLog	Sat Mar 12 21:28:54 2016 +0000
@@ -1,3 +1,8 @@
+2016-03-12  Andy Buckley  <andy.buckley at cern.ch>
+
+	* Allow multi-line major tick labels on make-plots linear x and y
+	axes. Linebreaks are indicated by \n in the .dat file.
+
 2016-03-09  Andy Buckley  <andy.buckley at cern.ch>
 
 	* Release 2.4.1
--- a/bin/make-plots	Wed Mar 09 17:52:15 2016 +0000
+++ b/bin/make-plots	Sat Mar 12 21:28:54 2016 +0000
@@ -174,9 +174,8 @@
         # inherit various values from histograms if not explicitly
         # set.
         for k in ['LogX', 'LogY', 'LogZ',
-                'XLabel', 'YLabel', 'ZLabel',
-                'XCustomMajorTicks', 'YCustomMajorTicks',
-                'ZCustomMajorTicks']:
+                  'XLabel', 'YLabel', 'ZLabel',
+                  'XCustomMajorTicks', 'YCustomMajorTicks', 'ZCustomMajorTicks']:
             self.inherit_from_histos(k)
 
         return
@@ -625,9 +624,9 @@
             drawylabels=False
         else:
             drawylabels=True
-        out += yticks.draw(custommajortickmarks=ycustommajortickmarks,\
-                           customminortickmarks=ycustomminortickmarks,\
-                           custommajorticks=ycustommajorticks,\
+        out += yticks.draw(custommajortickmarks=ycustommajortickmarks,
+                           customminortickmarks=ycustomminortickmarks,
+                           custommajorticks=ycustommajorticks,
                            customminorticks=ycustomminorticks,
                            drawlabels=drawylabels)
 
@@ -1936,6 +1935,8 @@
                                     else:
                                         out += self.draw_minorticklabel(ticklabel, last=True)
                     x+=1
+            else:
+                print "Warning: custom major ticks not currently supported on log axes -- please contact the developers to request!"
         elif custommajorticks is not None or customminorticks is not None:
             if custommajorticks:
                 for i in range(len(custommajorticks)):
@@ -2075,7 +2076,7 @@
         return out
 


More information about the Rivet-svn mailing list