mailr10803 - /1.3/generic_fns/grace.py


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

Header


Content

Posted by edward on February 22, 2010 - 10:50:
Author: bugman
Date: Mon Feb 22 10:50:42 2010
New Revision: 10803

URL: http://svn.gna.org/viewcvs/relax?rev=10803&view=rev
Log:
Set colours can now be specified in write_xy_header().


Modified:
    1.3/generic_fns/grace.py

Modified: 1.3/generic_fns/grace.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/generic_fns/grace.py?rev=10803&r1=10802&r2=10803&view=diff
==============================================================================
--- 1.3/generic_fns/grace.py (original)
+++ 1.3/generic_fns/grace.py Mon Feb 22 10:50:42 2010
@@ -379,7 +379,7 @@
             file.write("&\n")
 
 
-def write_xy_header(file=None, paper_size='A4', sets=1, set_names=None, 
data_type=None, seq_type=None, axis_labels=None, axis_min=None, 
axis_max=None, legend_pos=None, legend=False, norm=False):
+def write_xy_header(file=None, paper_size='A4', sets=1, set_names=None, 
set_colours=None, data_type=None, seq_type=None, axis_labels=None, 
axis_min=None, axis_max=None, legend_pos=None, legend=False, norm=False):
     """Write the grace header for xy-scatter plots.
 
     Many of these keyword arguments should be supplied in a [X, Y] list 
format, where the first element corresponds to the X data, and the second the 
Y data.  Defaults will be used for any non-supplied args (or lists with 
elements set to None).
@@ -393,6 +393,8 @@
     @type sets:                     int
     @keyword set_names:             The names associated with each graph 
data set G0.Sx.  For example this can be a list of spin identification 
strings.
     @type set_names:                list of str
+    @keyword set_colours:           The colours for each graph data set 
G0.Sx.
+    @type set_colours:              list of int
     @keyword data_type:             The axis data category (in the [X, Y] 
list format).
     @type data_type:                None or list of str
     @keyword seq_type:              The sequence data type (in the [X, Y] 
list format).  This is for molecular sequence specific data and can be one of 
'res', 'spin', or 'mixed'.
@@ -534,6 +536,10 @@
         file.write("@    s%i errorbar linewidth 0.5\n" % i)
         file.write("@    s%i errorbar riser linewidth 0.5\n" % i)
 
+        # Colours.
+        if colours:
+            file.write("@    s%i line color %s\n" % (i, colours[i]))
+
         # Legend.
         if set_names:
             file.write("@    s%i legend \"Spin %s\"\n" % (i, set_names[i]))




Related Messages


Powered by MHonArc, Updated Mon Feb 22 11:00:02 2010