mailr10800 - /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:39:
Author: bugman
Date: Mon Feb 22 10:39:03 2010
New Revision: 10800

URL: http://svn.gna.org/viewcvs/relax?rev=10800&view=rev
Log:
The paper size of A4 can now be set 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=10800&r1=10799&r2=10800&view=diff
==============================================================================
--- 1.3/generic_fns/grace.py (original)
+++ 1.3/generic_fns/grace.py Mon Feb 22 10:39:03 2010
@@ -379,7 +379,7 @@
             file.write("&\n")
 
 
-def write_xy_header(file=None, sets=1, set_names=None, data_type=[None, 
None], seq_type=[None, None], axis_labels=[None, None], axis_min=[None, 
None], axis_max=[None, None], norm=False):
+def write_xy_header(file=None, paper_size='A4', sets=1, set_names=None, 
data_type=[None, None], seq_type=[None, None], axis_labels=[None, None], 
axis_min=[None, None], axis_max=[None, 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.  Defaults will be used for any non-supplied args (or lists with 
elements set to None).
@@ -387,6 +387,8 @@
 
     @keyword file:                  The file object to write the data to.
     @type file:                     file object
+    @keyword paper_size:            The paper size, i.e. 'A4'.  If set to 
None, this will default to letter size.
+    @type paper_size:               str
     @keyword sets:                  The number of data sets in the graph G0.
     @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.
@@ -405,6 +407,10 @@
     @type norm:                     bool
     """
 
+    # The paper size.
+    if paper_size == 'A4':
+        file.write("@page size 842, 595\n")
+
     # Graph G0.
     file.write("@with g0\n")
 




Related Messages


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