mailr10768 - /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 19, 2010 - 11:46:
Author: bugman
Date: Fri Feb 19 11:46:25 2010
New Revision: 10768

URL: http://svn.gna.org/viewcvs/relax?rev=10768&view=rev
Log:
write_xy_header() now has a sets arg for specifying the number of data sets 
in the graph G0.


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=10768&r1=10767&r2=10768&view=diff
==============================================================================
--- 1.3/generic_fns/grace.py (original)
+++ 1.3/generic_fns/grace.py Fri Feb 19 11:46:25 2010
@@ -569,7 +569,7 @@
         file.write("&\n")
 
 
-def write_xy_header(file=None, data_type=[None, None], return_units=[None, 
None], return_grace_string=[None, None], spin_ids=None, norm=False):
+def write_xy_header(file=None, sets=1, data_type=[None, None], 
return_units=[None, None], return_grace_string=[None, None], spin_ids=None, 
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.
@@ -577,6 +577,8 @@
 
     @keyword file:                  The file object to write the data to.
     @type file:                     file object
+    @keyword sets:                  The number of data sets in the graph G0.
+    @type sets:                     int
     @keyword data_type:             The axis data category (in the [X, Y] 
list format).
     @type data_type:                list of str
     @keyword return_units:          The analysis specific function for 
returning the Grace formatted units string for the axes (in the [X, Y] list 
format).
@@ -674,8 +676,8 @@
     # Frame.
     file.write("@    frame linewidth 0.5\n")
 
-    # Loop over the data sets.
-    for i in xrange(len(data)):
+    # Loop over each graph set.
+    for i in range(sets):
         # Error bars.
         file.write("@    s%i errorbar size 0.5\n" % i)
         file.write("@    s%i errorbar linewidth 0.5\n" % i)




Related Messages


Powered by MHonArc, Updated Fri Feb 19 14:20:02 2010