[Rivet-svn] r2840 - in trunk: bin data/plotinfo doc

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Wed Dec 8 18:34:22 GMT 2010


Author: hoeth
Date: Wed Dec  8 18:34:21 2010
New Revision: 2840

Log:
make-plots: Change {X,Y,Z}CustomTicks to {X,Y,Z}CustomMajorTicks

Modified:
   trunk/bin/make-plots
   trunk/data/plotinfo/STAR_2006_S6860818.plot
   trunk/doc/make-plots.txt

Modified: trunk/bin/make-plots
==============================================================================
--- trunk/bin/make-plots	Wed Dec  8 17:27:35 2010	(r2839)
+++ trunk/bin/make-plots	Wed Dec  8 18:34:21 2010	(r2840)
@@ -462,12 +462,16 @@
             xcustomminortickmarks=int(inputdata.description['XMinorTickMarks'])
         else:
             xcustomminortickmarks=-1
-        xcustomticks=[]
+        xcustommajorticks=[]
+        # TODO: remove XCustomTicks after 2011-12-31:
         if inputdata.description.has_key('XCustomTicks') and inputdata.description['XCustomTicks']!='':
-            FOO=inputdata.description['XCustomTicks'].strip().split('\t')
+            logging.warning('Warning: XCustomTicks is deprecated. Use XCustomMajorTicks instead.')
+            inputdata.description['XCustomMajorTicks']=inputdata.description['XCustomTicks']
+        if inputdata.description.has_key('XCustomMajorTicks') and inputdata.description['XCustomMajorTicks']!='':
+            FOO=inputdata.description['XCustomMajorTicks'].strip().split('\t')
             if not len(FOO)%2:
                 for i in range(0,len(FOO),2):
-                    xcustomticks.append({'Value': float(FOO[i]), 'Label': FOO[i+1]})
+                    xcustommajorticks.append({'Value': float(FOO[i]), 'Label': FOO[i+1]})
         xticks = XTicks(inputdata.description, self.coors)
         if inputdata.description.has_key('RatioPlot') and inputdata.description['RatioPlot']=='1':
             drawlabels=False
@@ -475,7 +479,7 @@
             drawlabels=True
         out += xticks.draw(custommajortickmarks=xcustommajortickmarks,\
                                customminortickmarks=xcustomminortickmarks,\
-                               customticks=xcustomticks,drawlabels=drawlabels)
+                               customticks=xcustommajorticks,drawlabels=drawlabels)
 
         if inputdata.description.has_key('YMajorTickMarks') and inputdata.description['YMajorTickMarks']!='':
             ycustommajortickmarks=int(inputdata.description['YMajorTickMarks'])
@@ -485,16 +489,20 @@
             ycustomminortickmarks=int(inputdata.description['YMinorTickMarks'])
         else:
             ycustomminortickmarks=-1
-        ycustomticks=[]
+        ycustommajorticks=[]
+        # TODO: remove YCustomTicks after 2011-12-31:
         if inputdata.description.has_key('YCustomTicks') and inputdata.description['YCustomTicks']!='':
-            FOO=inputdata.description['YCustomTicks'].strip().split('\t')
+            logging.warning('Warning: YCustomTicks is deprecated. Use YCustomMajorTicks instead.')
+            inputdata.description['YCustomMajorTicks']=inputdata.description['YCustomTicks']
+        if inputdata.description.has_key('YCustomMajorTicks') and inputdata.description['YCustomMajorTicks']!='':
+            FOO=inputdata.description['YCustomMajorTicks'].strip().split('\t')
             if not len(FOO)%2:
                 for i in range(0,len(FOO),2):
-                    ycustomticks.append({'Value': float(FOO[i]), 'Label': FOO[i+1]})
+                    ycustommajorticks.append({'Value': float(FOO[i]), 'Label': FOO[i+1]})
         yticks = YTicks(inputdata.description, self.coors)
         out += yticks.draw(custommajortickmarks=ycustommajortickmarks,\
                                customminortickmarks=ycustomminortickmarks,\
-                               customticks=ycustomticks)
+                               customticks=ycustommajorticks)
 
         labels = Labels(inputdata.description)
         if inputdata.description.has_key('RatioPlot') and inputdata.description['RatioPlot']=='1':
@@ -588,16 +596,20 @@
             xcustomminortickmarks=int(inputdata.description['XMinorTickMarks'])
         else:
             xcustomminortickmarks=-1
-        xcustomticks=[]
+        xcustommajorticks=[]
+        # TODO: remove XCustomTicks after 2011-12-31:
         if inputdata.description.has_key('XCustomTicks') and inputdata.description['XCustomTicks']!='':
-            FOO=inputdata.description['XCustomTicks'].strip().split('\t')
+            logging.warning('Warning: XCustomTicks is deprecated. Use XCustomMajorTicks instead.')
+            inputdata.description['XCustomMajorTicks']=inputdata.description['XCustomTicks']
+        if inputdata.description.has_key('XCustomMajorTicks') and inputdata.description['XCustomMajorTicks']!='':
+            FOO=inputdata.description['XCustomMajorTicks'].strip().split('\t')
             if not len(FOO)%2:
                 for i in range(0,len(FOO),2):
-                    xcustomticks.append({'Value': float(FOO[i]), 'Label': FOO[i+1]})
+                    xcustommajorticks.append({'Value': float(FOO[i]), 'Label': FOO[i+1]})
         xticks = XTicks(inputdata.description, self.coors)
         out += xticks.draw(custommajortickmarks=xcustommajortickmarks,\
                                customminortickmarks=xcustomminortickmarks,\
-                               customticks=xcustomticks)
+                               customticks=xcustommajorticks)
 
         if inputdata.description.has_key('YMajorTickMarks') and inputdata.description['YMajorTickMarks']!='':
             ycustommajortickmarks=int(inputdata.description['YMajorTickMarks'])
@@ -607,16 +619,20 @@
             ycustomminortickmarks=int(inputdata.description['YMinorTickMarks'])
         else:
             ycustomminortickmarks=-1
-        ycustomticks=[]
+        ycustommajorticks=[]
+        # TODO: remove YCustomTicks after 2011-12-31:
         if inputdata.description.has_key('YCustomTicks') and inputdata.description['YCustomTicks']!='':
-            FOO=inputdata.description['YCustomTicks'].strip().split('\t')
+            logging.warning('Warning: YCustomTicks is deprecated. Use YCustomMajorTicks instead.')
+            inputdata.description['YCustomMajorTicks']=inputdata.description['YCustomTicks']
+        if inputdata.description.has_key('YCustomMajorTicks') and inputdata.description['YCustomMajorTicks']!='':
+            FOO=inputdata.description['YCustomMajorTicks'].strip().split('\t')
             if not len(FOO)%2:
                 for i in range(0,len(FOO),2):
-                    ycustomticks.append({'Value': float(FOO[i]), 'Label': FOO[i+1]})
+                    ycustommajorticks.append({'Value': float(FOO[i]), 'Label': FOO[i+1]})
         yticks = YTicks(inputdata.description, self.coors)
         out += yticks.draw(custommajortickmarks=ycustommajortickmarks,\
                                customminortickmarks=ycustomminortickmarks,\
-                               customticks=ycustomticks)
+                               customticks=ycustommajorticks)
 
         if inputdata.description.has_key('MainPlot') and inputdata.description['MainPlot']=='0':
             if inputdata.description.has_key('Legend') and inputdata.description['Legend']=='1':
@@ -742,16 +758,20 @@
             zcustomminortickmarks=int(self.description['ZMinorTickMarks'])
         else:
             zcustomminortickmarks=-1
-        zcustomticks=[]
-        if self.description.has_key('ZCustomTicks') and self.description['ZCustomTicks']!='':
-            FOO=self.description['ZCustomTicks'].strip().split('\t')
+        zcustommajorticks=[]
+        # TODO: remove ZCustomTicks after 2011-12-31:
+        if inputdata.description.has_key('ZCustomTicks') and inputdata.description['ZCustomTicks']!='':
+            logging.warning('Warning: ZCustomTicks is deprecated. Use ZCustomMajorTicks instead.')
+            inputdata.description['ZCustomMajorTicks']=inputdata.description['ZCustomTicks']
+        if self.description.has_key('ZCustomMajorTicks') and self.description['ZCustomMajorTicks']!='':
+            FOO=self.description['ZCustomMajorTicks'].strip().split('\t')
             if not len(FOO)%2:
                 for i in range(0,len(FOO),2):
-                    zcustomticks.append({'Value': float(FOO[i]), 'Label': FOO[i+1]})
+                    zcustommajorticks.append({'Value': float(FOO[i]), 'Label': FOO[i+1]})
         zticks = ZTicks(self.description, self.coors)
         out += zticks.draw(custommajortickmarks=zcustommajortickmarks,\
                                customminortickmarks=zcustomminortickmarks,\
-                               customticks=zcustomticks)
+                               customticks=zcustommajorticks)
         out += '  }\n'
         out += '}\n'
         return out

Modified: trunk/data/plotinfo/STAR_2006_S6860818.plot
==============================================================================
--- trunk/data/plotinfo/STAR_2006_S6860818.plot	Wed Dec  8 17:27:35 2010	(r2839)
+++ trunk/data/plotinfo/STAR_2006_S6860818.plot	Wed Dec  8 18:34:21 2010	(r2840)
@@ -58,7 +58,7 @@
 Title=Anti-baryon over baryon ratio vs strangeness
 XLabel=strangeness
 YLabel=anti-baryon/baryon ratio
-XCustomTicks=0	0 ($\bar p / p$)	1	1 ($\bar \Lambda / \Lambda$)	2	2 ($\bar \Xi / \Xi$)	3	3 ($\bar \Omega / \Omega$)
+XCustomMajorTicks=0	0 ($\bar p / p$)	1	1 ($\bar \Lambda / \Lambda$)	2	2 ($\bar \Xi / \Xi$)	3	3 ($\bar \Omega / \Omega$)
 LogY=0
 ShowZero=0
 # END PLOT

Modified: trunk/doc/make-plots.txt
==============================================================================
--- trunk/doc/make-plots.txt	Wed Dec  8 17:27:35 2010	(r2839)
+++ trunk/doc/make-plots.txt	Wed Dec  8 18:34:21 2010	(r2840)
@@ -99,9 +99,9 @@
 Draw tickmarks also on the upper and/or right side of the plot.
 
 --------------------
-XCustomTicks=<list>
-YCustomTicks=<list>
-ZCustomTicks=<list>
+XCustomMajorTicks=<list>
+YCustomMajorTicks=<list>
+ZCustomMajorTicks=<list>
 --------------------
 To specify ticks at arbitrary positions and/or with arbitrary labels.
 `<list>` is a tab separated list of format `value1 <tab> label1 <tab> value2


More information about the Rivet-svn mailing list