[Rivet-svn] r2085 - in trunk: bin doc

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Mon Nov 23 15:29:44 GMT 2009


Author: hoeth
Date: Mon Nov 23 15:29:43 2009
New Revision: 2085

Log:
make-plots: new option "ShowZero" for linear plots. Default is 1.

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

Modified: trunk/bin/make-plots
==============================================================================
--- trunk/bin/make-plots	Mon Nov 23 12:15:39 2009	(r2084)
+++ trunk/bin/make-plots	Mon Nov 23 15:29:43 2009	(r2085)
@@ -225,10 +225,23 @@
             if is2dim:
                 ymin=min(foo)
             else:
-                if min(foo) > -1e-4:
-                    ymin = 0
+                showzero = True
+                if inputdata.description.has_key('ShowZero'):
+                    if inputdata.description['ShowZero']=='0':
+                        showzero = False
+                if showzero:
+                    if min(foo) > -1e-4:
+                        ymin = 0
+                    else:
+                        ymin = 1.1*min(foo)
                 else:
-                    ymin = 1.1*min(foo)
+                    if min(foo) < -1e-4:
+                        ymin = 1.1*min(foo)
+                    elif min(foo) < 1e-4:
+                        ymin = 0
+                    else:
+                        ymin = 0.9*min(foo)
+
                 if inputdata.description['LogY']:
                     foo=[item for item in foo if item>0.0]
                     if len(foo)==0:

Modified: trunk/doc/make-plots.txt
==============================================================================
--- trunk/doc/make-plots.txt	Mon Nov 23 12:15:39 2009	(r2084)
+++ trunk/doc/make-plots.txt	Mon Nov 23 15:29:43 2009	(r2085)
@@ -120,9 +120,12 @@
 ZMin=<value>
 ZMax=<value>
 FullRange=<0|1>
+ShowZero=<0|1>
 --------------------
 Specify the plot range. By default the range is chosen such that all data
-is visible in linear plots. In logarithmic plots the automatic choice of `YMin`
+is visible in linear plots, and the zero is visible. `ShowZero=0` suppresses
+plotting the zero in linear plots and thus zooms into the actual y-value range
+of the distribution. In logarithmic plots the automatic choice of `YMin`
 is limited to be not smaller than 2e-4*`YMax`, but manually you can specify
 any value. `FullRange=1` also overrides the 2e-4*`YMax` limit and plots the
 full range in y.


More information about the Rivet-svn mailing list