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

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Tue Oct 12 18:11:30 BST 2010


Author: hoeth
Date: Tue Oct 12 18:11:30 2010
New Revision: 2708

Log:
added new option "ColorSeries" for custom color palettes in 2-dim plots to make-plots.

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

Modified: trunk/bin/make-plots
==============================================================================
--- trunk/bin/make-plots	Thu Oct  7 11:33:24 2010	(r2707)
+++ trunk/bin/make-plots	Tue Oct 12 18:11:30 2010	(r2708)
@@ -381,7 +381,11 @@
         out += ('\\begin{pspicture}(0,0)(0,0)\n')
         out += ('\\psset{xunit=%scm}\n' %(inputdata.description['PlotSizeX']))
         if inputdata.description['is2dim']:
-            out += ('\\definecolorseries{gradientcolors}{hsb}{grad}[rgb]{0,0,1}{-.700,0,0}\n')
+            if inputdata.description.has_key('ColorSeries') and inputdata.description['ColorSeries']!='':
+                colorseries = inputdata.description['ColorSeries']
+            else:
+                colorseries = '{hsb}{grad}[rgb]{0,0,1}{-.700,0,0}'
+            out += ('\\definecolorseries{gradientcolors}%s\n' %colorseries)
             out += ('\\resetcolorseries[130]{gradientcolors}\n')
         return out
 

Modified: trunk/doc/make-plots.txt
==============================================================================
--- trunk/doc/make-plots.txt	Thu Oct  7 11:33:24 2010	(r2707)
+++ trunk/doc/make-plots.txt	Tue Oct 12 18:11:30 2010	(r2708)
@@ -283,6 +283,22 @@
 --------------------
 
 
+Color Palettes for 2-dim Plots
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+With the option `ColorSeries` you can define a custom color palette for
+2-dimensional plots. The syntax is the same as for the `\definecolorseries`
+command in the `xcolor` LaTeX package after the color series name, i.e.
+`{core-model}{method}[begin-model]{begin-spec}[end-model]{end-spec}`. For more
+information you can consult the 
+http://www.ctan.org/tex-archive/macros/latex/contrib/xcolor/xcolor.pdf[xcolor documentation].
+Here is an example:
+
+--------------------
+ColorSeries={rgb}{last}[rgb]{1,0.97,0.94}[rgb]{0.6,0.0,0.05}
+--------------------
+
+
 HISTOGRAM
 ~~~~~~~~~
 


More information about the Rivet-svn mailing list