4
<title>Class: GridData</title>
7
<body bgcolor="#ffffff">
9
<p><i><a href="index.html">Table of Contents</a></i></p>
11
<table border="0" cellpadding="5" cellspacing="0" width="100%">
12
<tr bgcolor="#88bbee">
16
width="10%"><font color="#000000">Class: GridData</font>
18
<th align="right"><font color="#000000">./PlotItems.py</font></th>
22
<dl><dt><p><strong>Holds data representing a function of two variables, for use in splot.</strong><p>
23
</dt><dd><p> <code>GridData</code> represents a function that has been tabulated on a
24
rectangular grid. The data are written to a file; no copy is kept
30
<table border="0" cellpadding="5" cellspacing="0" width="100%%">
39
<font color="#000000">
40
<a name="Base Classes">Base Classes</a>
47
<font color="#000000"> </font>
53
<a href="PlotItems.py_PlotItem.html">PlotItem</a><br>
60
<table border="0" cellpadding="5" cellspacing="0" width="100%%">
69
<font color="#000000">
70
<a name="Methods">Methods</a>
77
<font color="#000000"> </font>
83
<a href="#__init__">__init__</a><br>
84
<a href="#pipein">pipein</a><br>
94
<font color="#000000">
95
<a name="__init__"></a>
102
<font color="#000000">__init__ </font>
118
</pre><dl><dt><p><strong>GridData constructor.</strong><p>
119
</dt><dd><p> Arguments:</p>
120
<dl><dt> <code>data</code></dt><dd><p>the data to plot: a 2-d array with dimensions
124
<dt> <code>xvals</code></dt><dd><p>a 1-d array with dimension <code>numx</code></p>
127
<dt> <code>yvals</code></dt><dd><p>a 1-d array with dimension <code>numy</code></p>
130
<dt> <code>binary=<bool></code></dt><dd><p>send data to gnuplot in binary format?</p>
133
<dt> <code>inline=<bool></code></dt><dd><p>send data to gnuplot "inline"?</p>
137
<p> Note the unusual argument order! The data are specified
138
<em>before</em> the x and y values. (This inconsistency was probably
139
a mistake; after all, the default xvals and yvals are not very
142
<p> <code>data</code> must be a data array holding the values of a function
143
f(x,y) tabulated on a grid of points, such that <code>data[i,j] ==
144
f(xvals[i], yvals[j])</code>. If <code>xvals</code> and/or <code>yvals</code> are
145
omitted, integers (starting with 0) are used for that
146
coordinate. The data are written to a temporary file; no copy
147
of the data is kept in memory.</p>
149
<p> If <code>binary=0</code> then the data are written to a datafile as <code>x y
150
f(x,y)</code> triplets (y changes most rapidly) that can be used by
151
gnuplot's <code>splot</code> command. Blank lines are included each time
152
the value of x changes so that gnuplot knows to plot a surface
153
through the data.</p>
155
<p> If <code>binary=1</code> then the data are written to a file in a binary
156
format that <code>splot</code> can understand. Binary format is faster
157
and usually saves disk space but is not human-readable. If
158
your version of gnuplot doesn't support binary format (it is a
159
recently-added feature), this behavior can be disabled by
160
setting the configuration variable
161
<code>gp.GnuplotOpts.recognizes_binary_splot=0</code> in the appropriate
164
<p> Thus if you have three arrays in the above format and a
165
Gnuplot instance called g, you can plot your data by typing
166
<code>g.splot(Gnuplot.GridData(data,xvals,yvals))</code>.</p>
172
<th bgcolor="#99ccff"
178
<font color="#000000">
179
<a name="pipein"></a>
182
<th bgcolor="#99ccff"
186
<font color="#000000">pipein </font>
195
<TABLE BORDER=1 CELLPADDING=2>
209
<p><i><a href="index.html">Table of Contents</a></i></p>
211
<i>This document was automatically generated on Fri Jan 26 13:13:18 2001
212
by <a href="http://happydoc.sourceforge.net">HappyDoc</a> version r0_9_2</i>
b'\\ No newline at end of file'