mailr27138 - /trunk/lib/plotting/gnuplot.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on December 18, 2014 - 18:07:
Author: bugman
Date: Thu Dec 18 18:07:19 2014
New Revision: 27138

URL: http://svn.gna.org/viewcvs/relax?rev=27138&view=rev
Log:
Fixes and improvements for the gnuplot correlation_matrix() plotting API 
function.

This is for the structure.atomic_fluctuations user function.  The "pm3d map" 
plot type is incorrect
for such data type, so instead of using 'splot', 'plot' is being used 
instead.  The resultant EPS
file is now much smaller.  The colour map has also been changed to one of the 
inbuilt ones for
higher contrast.


Modified:
    trunk/lib/plotting/gnuplot.py

Modified: trunk/lib/plotting/gnuplot.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/lib/plotting/gnuplot.py?rev=27138&r1=27137&r2=27138&view=diff
==============================================================================
--- trunk/lib/plotting/gnuplot.py       (original)
+++ trunk/lib/plotting/gnuplot.py       Thu Dec 18 18:07:19 2014
@@ -52,33 +52,14 @@
     # Open the script file for writing.
     output = open_write_file(file_name, dir=dir, force=force)
 
-    # Set the plot type.
-    output.write("\n# Set the plot type.\n")
-    output.write("set pm3d map\n")
-
     # Set up the terminal type and make the plot square.
-    output.write("\n# Set up the terminal type and make the plot square.\n")
+    output.write("# Set up the terminal type and make the plot square.\n")
     output.write("set terminal postscript eps size 10,10 enhanced color font 
'Helvetica,20' linewidth 0.1\n")
 
-    # The blue-red colour map.
+    # The colour map.
     output.write("\n# Blue-red colour map.\n")
-    colours = [
-        "#000090",
-        "#000fff",
-        "#0090ff",
-        "#0fffee",
-        "#90ff70",
-        "#ffee00",
-        "#ff7000",
-        "#ee0000",
-        "#7f0000"
-    ]
-    output.write("set palette defined (")
-    for i in range(len(colours)):
-        if i != 0:
-            output.write(", ")
-        output.write("%s \"%s\"" % (i, colours[i]))
-    output.write(")\n")
+    output.write("set palette model RGB\n")
+    output.write("set palette defined\n")
 
     # The labels.
     if labels != None:
@@ -100,7 +81,7 @@
 
     # Load and show the text data.
     output.write("\n# Load and show the text data\n")
-    output.write("splot \"%s\" matrix\n" % file)
+    output.write("plot \"%s\" matrix with image\n" % file)
 
     # Close the file.
     output.close()




Related Messages


Powered by MHonArc, Updated Thu Dec 18 19:00:02 2014