~ubuntu-branches/ubuntu/trusty/python-gnuplot/trusty

« back to all changes in this revision

Viewing changes to doc/Gnuplot/_Gnuplot/Gnuplot.html

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2005-01-23 00:42:37 UTC
  • mfrom: (2.1.1 warty)
  • Revision ID: james.westby@ubuntu.com-20050123004237-0rfjkhe4ii7ky637
Tags: 1.7-5
Fix mouse control in generated plot windows (closes: #291294).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 
2
          "http://www.w3.org/TR/html40/loose.dtd">
 
3
 
 
4
<html>
 
5
         
 
6
  <head>
 
7
    <title>Class: Gnuplot</title>
 
8
  </head>
 
9
 
 
10
  <body bgcolor="#ffffff">
 
11
 
 
12
        <p><i><a href="../../index.html">Table of Contents</a></i></p>
 
13
        
 
14
        <table border="0" cellpadding="5" cellspacing="0" width="100%">
 
15
        <tr>
 
16
            <th rowspan="2"
 
17
                valign="top"
 
18
                align="left"
 
19
                width="10%"
 
20
                bgcolor="#88bbee"><font color="#000000">Class: Gnuplot</font>
 
21
            </th>
 
22
            <th bgcolor="#88bbee"
 
23
                width="90%"
 
24
                align="right"><font color="#000000">Gnuplot/_Gnuplot.py</font>
 
25
            </th>
 
26
        </tr>
 
27
        <tr>
 
28
        <td>
 
29
        
 
30
<h3>Interface to a gnuplot program.</h3>
 
31
<p>    A Gnuplot represents a higher-level interface to a gnuplot
 
32
    program.  It can plot 'PlotItem's, which represent each thing to
 
33
    be plotted on the current graph.  It keeps a reference to each of
 
34
    the <code>PlotItems</code> used in the current plot, so that they (and their
 
35
    associated temporary files) are not deleted prematurely.</p>
 
36
<h4>    Members:</h4>
 
37
<dl>
 
38
<dt>        <code>itemlist</code></dt>
 
39
<dd>a list of the PlotItems that are associated with
 
40
            the current plot.  These are deleted whenever a new plot
 
41
            command is issued via the <code>plot</code> method.</dd>
 
42
<dt>        <code>plotcmd</code></dt>
 
43
<dd><code>plot</code> or <code>splot</code>, depending on what was the last
 
44
            plot command.</dd>
 
45
</dl>
 
46
<h4>    Methods:</h4>
 
47
<dl>
 
48
<dt>        <code>__init__</code></dt>
 
49
<dd>if a filename argument is specified, the
 
50
            commands will be written to that file instead of being
 
51
            piped to gnuplot.</dd>
 
52
<dt>        <code>plot</code></dt>
 
53
<dd>clear the old plot and old <code>PlotItems</code>, then plot
 
54
            the arguments in a fresh plot command.  Arguments can be:
 
55
            a <code>PlotItem</code>, which is plotted along with its internal
 
56
            options; a string, which is plotted as a 'Func'; or
 
57
            anything else, which is plotted as a <code>Data</code>.</dd>
 
58
<dt>        <code>splot</code></dt>
 
59
<dd>like <code>plot</code>, except for 3-d plots.</dd>
 
60
<dt>        <code>hardcopy</code></dt>
 
61
<dd>replot the plot to a postscript file (if
 
62
            filename argument is specified) or pipe it to the printer
 
63
            as postscript othewise.  If the option <code>color</code> is set to
 
64
            true, then output color postscript.</dd>
 
65
<dt>        <code>replot</code></dt>
 
66
<dd>replot the old items, adding any arguments as
 
67
            additional items as in the plot method.</dd>
 
68
<dt>        <code>refresh</code></dt>
 
69
<dd>issue (or reissue) the plot command using the
 
70
            current <code>PlotItems</code>.</dd>
 
71
<dt>        <code>__call__</code></dt>
 
72
<dd>pass an arbitrary string to the gnuplot process,
 
73
            followed by a newline.</dd>
 
74
<dt>        <code>xlabel</code>, <code>ylabel</code>, <code>title</code></dt>
 
75
<dd>set corresponding plot
 
76
            attribute.</dd>
 
77
<dt>        <code>interact</code></dt>
 
78
<dd>read lines from stdin and send them, one by one,
 
79
            to the gnuplot interpreter.  Basically you can type
 
80
            commands directly to the gnuplot command processor.</dd>
 
81
<dt>        <code>load</code></dt>
 
82
<dd>load a file (using the gnuplot <code>load</code> command).</dd>
 
83
<dt>        <code>save</code></dt>
 
84
<dd>save gnuplot commands to a file (using gnuplot
 
85
            <code>save</code> command) If any of the 'PlotItem's is a temporary
 
86
            file, it will be deleted at the usual time and the save
 
87
            file will be pretty useless :-).</dd>
 
88
<dt>        <code>clear</code></dt>
 
89
<dd>clear the plot window (but not the itemlist).</dd>
 
90
<dt>        <code>reset</code></dt>
 
91
<dd>reset all gnuplot settings to their defaults and
 
92
            clear the current itemlist.</dd>
 
93
<dt>        <code>set_string</code></dt>
 
94
<dd>set or unset a gnuplot option whose value is a
 
95
            string.</dd>
 
96
<dt>        <code>_clear_queue</code></dt>
 
97
<dd>clear the current <code>PlotItem</code> list.</dd>
 
98
<dt>        <code>_add_to_queue</code></dt>
 
99
<dd>add the specified items to the current
 
100
            <code>PlotItem</code> list.</dd>
 
101
</dl>
 
102
<table border="0" cellpadding="5" cellspacing="0" width="100%">
 
103
 
 
104
        <tr>
 
105
            <th bgcolor="#99ccff"
 
106
                rowspan="2"
 
107
                valign="top"
 
108
                align="left"
 
109
                width="20%"
 
110
                >
 
111
                <font color="#000000">
 
112
                  <a name="Methods">Methods</a>&nbsp;
 
113
                </font>
 
114
            </th>
 
115
            <th bgcolor="#99ccff"
 
116
                valign="top"
 
117
                align="left"
 
118
                width="80%"
 
119
                >
 
120
                <font color="#000000">&nbsp;</font>
 
121
            </th>
 
122
        </tr>
 
123
        <tr>
 
124
        <td>
 
125
        
 
126
 
 
127
            <table border="0" cellspacing="2" cellpadding="2" width="100%">
 
128
              <tr>
 
129
            <td align="LEFT" valign="TOP">
 
130
<a href="#__call__">__call__</a><br>
 
131
<a href="#__init__">__init__</a><br>
 
132
<a href="#_add_to_queue">_add_to_queue</a><br>
 
133
<a href="#_clear_queue">_clear_queue</a><br>
 
134
<a href="#clear">clear</a><br>
 
135
<a href="#hardcopy">hardcopy</a><br>
 
136
<a href="#interact">interact</a><br>
 
137
<a href="#load">load</a><br>
 
138
</td>
 
139
<td align="LEFT" valign="TOP">
 
140
<a href="#plot">plot</a><br>
 
141
<a href="#refresh">refresh</a><br>
 
142
<a href="#replot">replot</a><br>
 
143
<a href="#reset">reset</a><br>
 
144
<a href="#save">save</a><br>
 
145
<a href="#set">set</a><br>
 
146
<a href="#set_boolean">set_boolean</a><br>
 
147
<a href="#set_label">set_label</a><br>
 
148
</td>
 
149
<td align="LEFT" valign="TOP">
 
150
<a href="#set_range">set_range</a><br>
 
151
<a href="#set_string">set_string</a><br>
 
152
<a href="#splot">splot</a><br>
 
153
<a href="#title">title</a><br>
 
154
<a href="#xlabel">xlabel</a><br>
 
155
<a href="#ylabel">ylabel</a><br>
 
156
</td>
 
157
</tr>
 
158
            </table>
 
159
            
 
160
 
 
161
        <tr>
 
162
            <th bgcolor="#99ccff"
 
163
                rowspan="2"
 
164
                valign="top"
 
165
                align="left"
 
166
                width="20%"
 
167
                >
 
168
                <font color="#000000">
 
169
                  <a name="__call__"></a>&nbsp;
 
170
                </font>
 
171
            </th>
 
172
            <th bgcolor="#99ccff"
 
173
                valign="top"
 
174
                align="left"
 
175
                width="80%"
 
176
                >
 
177
                <font color="#000000">__call__&nbsp;</font>
 
178
            </th>
 
179
        </tr>
 
180
        <tr>
 
181
        <td>
 
182
        <font color="#000088"><pre>
 
183
__call__ ( self,  s )
 
184
 
 
185
</pre></font>
 
186
 
 
187
<h3>Send a command string to gnuplot.</h3>
 
188
<p>        Send the string s as a command to gnuplot, followed by a
 
189
        newline.  All communication with the gnuplot process (except
 
190
        for inline data) is through this method.</p>
 
191
 
 
192
        <tr>
 
193
            <th bgcolor="#99ccff"
 
194
                rowspan="2"
 
195
                valign="top"
 
196
                align="left"
 
197
                width="20%"
 
198
                >
 
199
                <font color="#000000">
 
200
                  <a name="__init__"></a>&nbsp;
 
201
                </font>
 
202
            </th>
 
203
            <th bgcolor="#99ccff"
 
204
                valign="top"
 
205
                align="left"
 
206
                width="80%"
 
207
                >
 
208
                <font color="#000000">__init__&nbsp;</font>
 
209
            </th>
 
210
        </tr>
 
211
        <tr>
 
212
        <td>
 
213
        <font color="#000088"><pre>
 
214
__init__ (
 
215
        self,
 
216
        filename=None,
 
217
        persist=None,
 
218
        debug=0,
 
219
        )
 
220
 
 
221
</pre></font>
 
222
 
 
223
<h3>Create a Gnuplot object.</h3>
 
224
<p>        Create a <code>Gnuplot</code> object.  By default, this starts a gnuplot
 
225
        process and prepares to write commands to it.</p>
 
226
<h4>        Keyword arguments:</h4>
 
227
<dl>
 
228
<dt>          <code>filename=&lt;string&gt;</code></dt>
 
229
<dd>if a filename is specified, the
 
230
              commands are instead written to that file (e.g., for
 
231
              later use using <code>load</code>).</dd>
 
232
<dt>          <code>persist=1</code></dt>
 
233
<dd>start gnuplot with the <code>-persist</code> option
 
234
              (which creates a new plot window for each plot command).
 
235
              (This option is not available on older versions of
 
236
              gnuplot.)</dd>
 
237
<dt>          <code>debug=1</code></dt>
 
238
<dd>echo the gnuplot commands to stderr as well as
 
239
              sending them to gnuplot.</dd>
 
240
</dl>
 
241
<table border="0" cellpadding="5" cellspacing="0" width="100%">
 
242
 
 
243
        <tr>
 
244
            <th bgcolor="#99ccff"
 
245
                rowspan="2"
 
246
                valign="top"
 
247
                align="left"
 
248
                width="20%"
 
249
                >
 
250
                <font color="#000000">
 
251
                  <a name="Exceptions">Exceptions</a>&nbsp;
 
252
                </font>
 
253
            </th>
 
254
            <th bgcolor="#99ccff"
 
255
                valign="top"
 
256
                align="left"
 
257
                width="80%"
 
258
                >
 
259
                <font color="#000000">&nbsp;</font>
 
260
            </th>
 
261
        </tr>
 
262
        <tr>
 
263
        <td>
 
264
        
 
265
Errors.OptionError( 'Gnuplot with output to file does not allow ' 'persist option.' )<br>
 
266
 
 
267
</td></tr>
 
268
</table>
 
269
 
 
270
        <tr>
 
271
            <th bgcolor="#99ccff"
 
272
                rowspan="2"
 
273
                valign="top"
 
274
                align="left"
 
275
                width="20%"
 
276
                >
 
277
                <font color="#000000">
 
278
                  <a name="_add_to_queue"></a>&nbsp;
 
279
                </font>
 
280
            </th>
 
281
            <th bgcolor="#99ccff"
 
282
                valign="top"
 
283
                align="left"
 
284
                width="80%"
 
285
                >
 
286
                <font color="#000000">_add_to_queue&nbsp;</font>
 
287
            </th>
 
288
        </tr>
 
289
        <tr>
 
290
        <td>
 
291
        <font color="#000088"><pre>
 
292
_add_to_queue ( self,  items )
 
293
 
 
294
</pre></font>
 
295
 
 
296
<h3>Add a list of items to the itemlist (but don't plot them).</h3>
 
297
<p>        <code>items</code> is a sequence of items, each of which should be a
 
298
        <code>PlotItem</code> of some kind, a string (interpreted as a function
 
299
        string for gnuplot to evaluate), or a Numeric array (or
 
300
        something that can be converted to a Numeric array).</p>
 
301
 
 
302
        <tr>
 
303
            <th bgcolor="#99ccff"
 
304
                rowspan="2"
 
305
                valign="top"
 
306
                align="left"
 
307
                width="20%"
 
308
                >
 
309
                <font color="#000000">
 
310
                  <a name="_clear_queue"></a>&nbsp;
 
311
                </font>
 
312
            </th>
 
313
            <th bgcolor="#99ccff"
 
314
                valign="top"
 
315
                align="left"
 
316
                width="80%"
 
317
                >
 
318
                <font color="#000000">_clear_queue&nbsp;</font>
 
319
            </th>
 
320
        </tr>
 
321
        <tr>
 
322
        <td>
 
323
        <font color="#000088"><pre>
 
324
_clear_queue ( self )
 
325
 
 
326
</pre></font>
 
327
 
 
328
<p>Clear the <code>PlotItems</code> from the queue.</p>
 
329
 
 
330
        <tr>
 
331
            <th bgcolor="#99ccff"
 
332
                rowspan="2"
 
333
                valign="top"
 
334
                align="left"
 
335
                width="20%"
 
336
                >
 
337
                <font color="#000000">
 
338
                  <a name="clear"></a>&nbsp;
 
339
                </font>
 
340
            </th>
 
341
            <th bgcolor="#99ccff"
 
342
                valign="top"
 
343
                align="left"
 
344
                width="80%"
 
345
                >
 
346
                <font color="#000000">clear&nbsp;</font>
 
347
            </th>
 
348
        </tr>
 
349
        <tr>
 
350
        <td>
 
351
        <font color="#000088"><pre>
 
352
clear ( self )
 
353
 
 
354
</pre></font>
 
355
 
 
356
<p>Clear the plot window (without affecting the current itemlist).</p>
 
357
 
 
358
        <tr>
 
359
            <th bgcolor="#99ccff"
 
360
                rowspan="2"
 
361
                valign="top"
 
362
                align="left"
 
363
                width="20%"
 
364
                >
 
365
                <font color="#000000">
 
366
                  <a name="hardcopy"></a>&nbsp;
 
367
                </font>
 
368
            </th>
 
369
            <th bgcolor="#99ccff"
 
370
                valign="top"
 
371
                align="left"
 
372
                width="80%"
 
373
                >
 
374
                <font color="#000000">hardcopy&nbsp;</font>
 
375
            </th>
 
376
        </tr>
 
377
        <tr>
 
378
        <td>
 
379
        <font color="#000088"><pre>
 
380
hardcopy (
 
381
        self,
 
382
        filename=None,
 
383
        terminal='postscript',
 
384
        **keyw,
 
385
        )
 
386
 
 
387
</pre></font>
 
388
 
 
389
<h3>Create a hardcopy of the current plot.</h3>
 
390
<p>        Create a postscript hardcopy of the current plot to the
 
391
        default printer (if configured) or to the specified filename.</p>
 
392
<p>        Note that gnuplot remembers the postscript suboptions across
 
393
        terminal changes.  Therefore if you set, for example, color=1
 
394
        for one hardcopy then the next hardcopy will also be color
 
395
        unless you explicitly choose color=0.  Alternately you can
 
396
        force all of the options to their defaults by setting
 
397
        mode=<code>default</code>.  I consider this to be a bug in gnuplot.</p>
 
398
<h4>        Keyword arguments:</h4>
 
399
<dl>
 
400
<dt>          <code>filename=&lt;string&gt;</code></dt>
 
401
<dd>if a filename is specified, save the
 
402
              output in that file; otherwise print it immediately
 
403
              using the <code>default_lpr</code> configuration option.</dd>
 
404
<dt>          <code>terminal=&lt;string&gt;</code></dt>
 
405
<dd>the type of gnuplot <code>terminal</code> to use
 
406
              for the output (e.g., <code>postscript</code>, <code>png</code>, <code>latex</code>,
 
407
              etc).  At the moment only <code>postscript</code> is implemented.</dd>
 
408
</dl>
 
409
<p>        The rest of the keyword arguments depend on the terminal type.</p>
 
410
<h4>        Keyword arguments for <code>postscript</code> terminal:</h4>
 
411
<dl>
 
412
<dt>          <code>mode=&lt;string&gt;</code></dt>
 
413
<dd>set the postscript submode (<code>landscape</code>,
 
414
              <code>portrait</code>, <code>eps</code>, or <code>default</code>).  The default is
 
415
              to leave this option unspecified.</dd>
 
416
<dt>          <code>eps=&lt;bool&gt;</code></dt>
 
417
<dd>shorthand for 'mode=&quot;eps&quot;'; asks gnuplot to
 
418
              generate encapsulated postscript.</dd>
 
419
<dt>          <code>enhanced=&lt;bool&gt;</code></dt>
 
420
<dd>if set (the default), then generate
 
421
              enhanced postscript, which allows extra features like
 
422
              font-switching, superscripts, and subscripts in axis
 
423
              labels.  (Some old gnuplot versions do not support
 
424
              enhanced postscript; if this is the case set
 
425
              gp.GnuplotOpts.prefer_enhanced_postscript=None.)</dd>
 
426
<dt>          <code>color=&lt;bool&gt;</code></dt>
 
427
<dd>if set, create a plot with color.  Default
 
428
              is to leave this option unchanged.</dd>
 
429
<dt>          <code>solid=&lt;bool&gt;</code></dt>
 
430
<dd>if set, force lines to be solid (i.e., not
 
431
              dashed).</dd>
 
432
<dt>          <code>duplexing=&lt;string&gt;</code></dt>
 
433
<dd>set duplexing option (<code>defaultplex</code>,
 
434
              <code>simplex</code>, or <code>duplex</code>).  Only request double-sided
 
435
              printing if your printer can handle it.  Actually this
 
436
              option is probably meaningless since hardcopy() can only
 
437
              print a single plot at a time.</dd>
 
438
<dt>          <code>fontname=&lt;string&gt;</code></dt>
 
439
<dd>set the default font to &lt;string&gt;,
 
440
              which must be a valid postscript font.  The default is
 
441
              to leave this option unspecified.</dd>
 
442
<dt>          <code>fontsize=&lt;double&gt;</code></dt>
 
443
<dd>set the default font size, in
 
444
              postscript points.</dd>
 
445
</dl>
 
446
<p>        Note that this command will return immediately even though it
 
447
        might take gnuplot a while to actually finish working.  Be
 
448
        sure to pause briefly before issuing another command that
 
449
        might cause the temporary files to be deleted.</p>
 
450
<table border="0" cellpadding="5" cellspacing="0" width="100%">
 
451
 
 
452
        <tr>
 
453
            <th bgcolor="#99ccff"
 
454
                rowspan="2"
 
455
                valign="top"
 
456
                align="left"
 
457
                width="20%"
 
458
                >
 
459
                <font color="#000000">
 
460
                  <a name="Exceptions">Exceptions</a>&nbsp;
 
461
                </font>
 
462
            </th>
 
463
            <th bgcolor="#99ccff"
 
464
                valign="top"
 
465
                align="left"
 
466
                width="80%"
 
467
                >
 
468
                <font color="#000000">&nbsp;</font>
 
469
            </th>
 
470
        </tr>
 
471
        <tr>
 
472
        <td>
 
473
        
 
474
Errors.OptionError( 'default_lpr is not set, so you can only print to a file.' )<br>
 
475
Errors.OptionError('Terminal "%s" is not configured in Gnuplot.py.' %( terminal, ) )<br>
 
476
Errors.OptionError('The following options are unrecognized: %s' %( string.join( keyw.keys(), ', ' ), ) )<br>
 
477
 
 
478
</td></tr>
 
479
</table>
 
480
 
 
481
        <tr>
 
482
            <th bgcolor="#99ccff"
 
483
                rowspan="2"
 
484
                valign="top"
 
485
                align="left"
 
486
                width="20%"
 
487
                >
 
488
                <font color="#000000">
 
489
                  <a name="interact"></a>&nbsp;
 
490
                </font>
 
491
            </th>
 
492
            <th bgcolor="#99ccff"
 
493
                valign="top"
 
494
                align="left"
 
495
                width="80%"
 
496
                >
 
497
                <font color="#000000">interact&nbsp;</font>
 
498
            </th>
 
499
        </tr>
 
500
        <tr>
 
501
        <td>
 
502
        <font color="#000088"><pre>
 
503
interact ( self )
 
504
 
 
505
</pre></font>
 
506
 
 
507
<h3>Allow user to type arbitrary commands to gnuplot.</h3>
 
508
<p>        Read stdin, line by line, and send each line as a command to
 
509
        gnuplot.  End by typing C-d.</p>
 
510
 
 
511
        <tr>
 
512
            <th bgcolor="#99ccff"
 
513
                rowspan="2"
 
514
                valign="top"
 
515
                align="left"
 
516
                width="20%"
 
517
                >
 
518
                <font color="#000000">
 
519
                  <a name="load"></a>&nbsp;
 
520
                </font>
 
521
            </th>
 
522
            <th bgcolor="#99ccff"
 
523
                valign="top"
 
524
                align="left"
 
525
                width="80%"
 
526
                >
 
527
                <font color="#000000">load&nbsp;</font>
 
528
            </th>
 
529
        </tr>
 
530
        <tr>
 
531
        <td>
 
532
        <font color="#000088"><pre>
 
533
load ( self,  filename )
 
534
 
 
535
</pre></font>
 
536
 
 
537
<p>Load a file using gnuplot's <code>load</code> command.</p>
 
538
 
 
539
        <tr>
 
540
            <th bgcolor="#99ccff"
 
541
                rowspan="2"
 
542
                valign="top"
 
543
                align="left"
 
544
                width="20%"
 
545
                >
 
546
                <font color="#000000">
 
547
                  <a name="plot"></a>&nbsp;
 
548
                </font>
 
549
            </th>
 
550
            <th bgcolor="#99ccff"
 
551
                valign="top"
 
552
                align="left"
 
553
                width="80%"
 
554
                >
 
555
                <font color="#000000">plot&nbsp;</font>
 
556
            </th>
 
557
        </tr>
 
558
        <tr>
 
559
        <td>
 
560
        <font color="#000088"><pre>
 
561
plot (
 
562
        self,
 
563
        *items,
 
564
        *keyw,
 
565
        )
 
566
 
 
567
</pre></font>
 
568
 
 
569
<h3>Draw a new plot.</h3>
 
570
<p>        Clear the current plot and create a new 2-d plot containing
 
571
        the specified items.  Each arguments should be of the
 
572
        following types:</p>
 
573
<dl>
 
574
<dt>        <code>PlotItem</code> (e.g., <code>Data</code>, <code>File</code>, <code>Func</code>)</dt>
 
575
<dd>This is the most
 
576
            flexible way to call plot because the PlotItems can
 
577
            contain suboptions.  Moreover, PlotItems can be saved to
 
578
            variables so that their lifetime is longer than one plot
 
579
            command; thus they can be replotted with minimal overhead.</dd>
 
580
<dt>        <code>string</code> (e.g., <code>sin(x)</code>)</dt>
 
581
<dd>The string is interpreted as
 
582
            <code>Func(string)</code> (a function that is computed by gnuplot).</dd>
 
583
<dt>        Anything else</dt>
 
584
<dd>The object, which should be convertible to an
 
585
            array, is passed to the <code>Data</code> constructor, and thus
 
586
            plotted as data.  If the conversion fails, an exception is
 
587
            raised.</dd>
 
588
</dl>
 
589
 
 
590
        <tr>
 
591
            <th bgcolor="#99ccff"
 
592
                rowspan="2"
 
593
                valign="top"
 
594
                align="left"
 
595
                width="20%"
 
596
                >
 
597
                <font color="#000000">
 
598
                  <a name="refresh"></a>&nbsp;
 
599
                </font>
 
600
            </th>
 
601
            <th bgcolor="#99ccff"
 
602
                valign="top"
 
603
                align="left"
 
604
                width="80%"
 
605
                >
 
606
                <font color="#000000">refresh&nbsp;</font>
 
607
            </th>
 
608
        </tr>
 
609
        <tr>
 
610
        <td>
 
611
        <font color="#000088"><pre>
 
612
refresh ( self )
 
613
 
 
614
</pre></font>
 
615
 
 
616
<h3>Refresh the plot, using the current 'PlotItem's.</h3>
 
617
<p>        Refresh the current plot by reissuing the gnuplot plot command
 
618
        corresponding to the current itemlist.</p>
 
619
 
 
620
        <tr>
 
621
            <th bgcolor="#99ccff"
 
622
                rowspan="2"
 
623
                valign="top"
 
624
                align="left"
 
625
                width="20%"
 
626
                >
 
627
                <font color="#000000">
 
628
                  <a name="replot"></a>&nbsp;
 
629
                </font>
 
630
            </th>
 
631
            <th bgcolor="#99ccff"
 
632
                valign="top"
 
633
                align="left"
 
634
                width="80%"
 
635
                >
 
636
                <font color="#000000">replot&nbsp;</font>
 
637
            </th>
 
638
        </tr>
 
639
        <tr>
 
640
        <td>
 
641
        <font color="#000088"><pre>
 
642
replot (
 
643
        self,
 
644
        *items,
 
645
        *keyw,
 
646
        )
 
647
 
 
648
</pre></font>
 
649
 
 
650
<h3>Replot the data, possibly adding new 'PlotItem's.</h3>
 
651
<p>        Replot the existing graph, using the items in the current
 
652
        itemlist.  If arguments are specified, they are interpreted as
 
653
        additional items to be plotted alongside the existing items on
 
654
        the same graph.  See <code>plot</code> for details.</p>
 
655
 
 
656
        <tr>
 
657
            <th bgcolor="#99ccff"
 
658
                rowspan="2"
 
659
                valign="top"
 
660
                align="left"
 
661
                width="20%"
 
662
                >
 
663
                <font color="#000000">
 
664
                  <a name="reset"></a>&nbsp;
 
665
                </font>
 
666
            </th>
 
667
            <th bgcolor="#99ccff"
 
668
                valign="top"
 
669
                align="left"
 
670
                width="80%"
 
671
                >
 
672
                <font color="#000000">reset&nbsp;</font>
 
673
            </th>
 
674
        </tr>
 
675
        <tr>
 
676
        <td>
 
677
        <font color="#000088"><pre>
 
678
reset ( self )
 
679
 
 
680
</pre></font>
 
681
 
 
682
<p>Reset all gnuplot settings to their defaults and clear itemlist.</p>
 
683
 
 
684
        <tr>
 
685
            <th bgcolor="#99ccff"
 
686
                rowspan="2"
 
687
                valign="top"
 
688
                align="left"
 
689
                width="20%"
 
690
                >
 
691
                <font color="#000000">
 
692
                  <a name="save"></a>&nbsp;
 
693
                </font>
 
694
            </th>
 
695
            <th bgcolor="#99ccff"
 
696
                valign="top"
 
697
                align="left"
 
698
                width="80%"
 
699
                >
 
700
                <font color="#000000">save&nbsp;</font>
 
701
            </th>
 
702
        </tr>
 
703
        <tr>
 
704
        <td>
 
705
        <font color="#000088"><pre>
 
706
save ( self,  filename )
 
707
 
 
708
</pre></font>
 
709
 
 
710
<p>Save the current plot commands using gnuplot's <code>save</code> command.</p>
 
711
 
 
712
        <tr>
 
713
            <th bgcolor="#99ccff"
 
714
                rowspan="2"
 
715
                valign="top"
 
716
                align="left"
 
717
                width="20%"
 
718
                >
 
719
                <font color="#000000">
 
720
                  <a name="set"></a>&nbsp;
 
721
                </font>
 
722
            </th>
 
723
            <th bgcolor="#99ccff"
 
724
                valign="top"
 
725
                align="left"
 
726
                width="80%"
 
727
                >
 
728
                <font color="#000000">set&nbsp;</font>
 
729
            </th>
 
730
        </tr>
 
731
        <tr>
 
732
        <td>
 
733
        <font color="#000088"><pre>
 
734
set ( self,  **keyw )
 
735
 
 
736
</pre></font>
 
737
 
 
738
<p>Set one or more settings at once from keyword arguments.
 
739
        The allowed settings and their treatments are determined from
 
740
        the optiontypes mapping.</p>
 
741
<table border="0" cellpadding="5" cellspacing="0" width="100%">
 
742
 
 
743
        <tr>
 
744
            <th bgcolor="#99ccff"
 
745
                rowspan="2"
 
746
                valign="top"
 
747
                align="left"
 
748
                width="20%"
 
749
                >
 
750
                <font color="#000000">
 
751
                  <a name="Exceptions">Exceptions</a>&nbsp;
 
752
                </font>
 
753
            </th>
 
754
            <th bgcolor="#99ccff"
 
755
                valign="top"
 
756
                align="left"
 
757
                width="80%"
 
758
                >
 
759
                <font color="#000000">&nbsp;</font>
 
760
            </th>
 
761
        </tr>
 
762
        <tr>
 
763
        <td>
 
764
        
 
765
'option %s is not supported' %( k, )<br>
 
766
 
 
767
</td></tr>
 
768
</table>
 
769
 
 
770
        <tr>
 
771
            <th bgcolor="#99ccff"
 
772
                rowspan="2"
 
773
                valign="top"
 
774
                align="left"
 
775
                width="20%"
 
776
                >
 
777
                <font color="#000000">
 
778
                  <a name="set_boolean"></a>&nbsp;
 
779
                </font>
 
780
            </th>
 
781
            <th bgcolor="#99ccff"
 
782
                valign="top"
 
783
                align="left"
 
784
                width="80%"
 
785
                >
 
786
                <font color="#000000">set_boolean&nbsp;</font>
 
787
            </th>
 
788
        </tr>
 
789
        <tr>
 
790
        <td>
 
791
        <font color="#000088"><pre>
 
792
set_boolean (
 
793
        self,
 
794
        option,
 
795
        value,
 
796
        )
 
797
 
 
798
</pre></font>
 
799
 
 
800
<p>Set an on/off option.  It is assumed that the way to turn
 
801
        the option on is to type `set &lt;option&gt;<code> and to turn it off,
 
802
        `set no&lt;option&gt;</code>.</p>
 
803
 
 
804
        <tr>
 
805
            <th bgcolor="#99ccff"
 
806
                rowspan="2"
 
807
                valign="top"
 
808
                align="left"
 
809
                width="20%"
 
810
                >
 
811
                <font color="#000000">
 
812
                  <a name="set_label"></a>&nbsp;
 
813
                </font>
 
814
            </th>
 
815
            <th bgcolor="#99ccff"
 
816
                valign="top"
 
817
                align="left"
 
818
                width="80%"
 
819
                >
 
820
                <font color="#000000">set_label&nbsp;</font>
 
821
            </th>
 
822
        </tr>
 
823
        <tr>
 
824
        <td>
 
825
        <font color="#000088"><pre>
 
826
set_label (
 
827
        self,
 
828
        option,
 
829
        s=None,
 
830
        offset=None,
 
831
        font=None,
 
832
        )
 
833
 
 
834
</pre></font>
 
835
 
 
836
<h3>Set or clear a label option, which can include an offset or font.</h3>
 
837
<p>        If offset is specified, it should be a tuple of two integers
 
838
        or floats.</p>
 
839
<p>        If font is specified, it is appended to the command as a
 
840
        string in double quotes.  Its interpretation is
 
841
        terminal-dependent; for example, for postscript it might be
 
842
        <code>Helvetica,14</code> for 14 point Helvetica.</p>
 
843
 
 
844
        <tr>
 
845
            <th bgcolor="#99ccff"
 
846
                rowspan="2"
 
847
                valign="top"
 
848
                align="left"
 
849
                width="20%"
 
850
                >
 
851
                <font color="#000000">
 
852
                  <a name="set_range"></a>&nbsp;
 
853
                </font>
 
854
            </th>
 
855
            <th bgcolor="#99ccff"
 
856
                valign="top"
 
857
                align="left"
 
858
                width="80%"
 
859
                >
 
860
                <font color="#000000">set_range&nbsp;</font>
 
861
            </th>
 
862
        </tr>
 
863
        <tr>
 
864
        <td>
 
865
        <font color="#000088"><pre>
 
866
set_range (
 
867
        self,
 
868
        option,
 
869
        value,
 
870
        )
 
871
 
 
872
</pre></font>
 
873
 
 
874
<p>Set a range option (xrange, yrange, trange, urange, etc.).
 
875
        The value can be a string (which is passed as-is, without
 
876
        quotes) or a tuple (minrange,maxrange) of numbers or string
 
877
        expressions recognized by gnuplot.  If either range is None
 
878
        then that range is passed as `*' (which means to
 
879
        autoscale).</p>
 
880
 
 
881
        <tr>
 
882
            <th bgcolor="#99ccff"
 
883
                rowspan="2"
 
884
                valign="top"
 
885
                align="left"
 
886
                width="20%"
 
887
                >
 
888
                <font color="#000000">
 
889
                  <a name="set_string"></a>&nbsp;
 
890
                </font>
 
891
            </th>
 
892
            <th bgcolor="#99ccff"
 
893
                valign="top"
 
894
                align="left"
 
895
                width="80%"
 
896
                >
 
897
                <font color="#000000">set_string&nbsp;</font>
 
898
            </th>
 
899
        </tr>
 
900
        <tr>
 
901
        <td>
 
902
        <font color="#000088"><pre>
 
903
set_string (
 
904
        self,
 
905
        option,
 
906
        s=None,
 
907
        )
 
908
 
 
909
</pre></font>
 
910
 
 
911
<p>Set a string option, or if s is omitted, unset the option.</p>
 
912
 
 
913
        <tr>
 
914
            <th bgcolor="#99ccff"
 
915
                rowspan="2"
 
916
                valign="top"
 
917
                align="left"
 
918
                width="20%"
 
919
                >
 
920
                <font color="#000000">
 
921
                  <a name="splot"></a>&nbsp;
 
922
                </font>
 
923
            </th>
 
924
            <th bgcolor="#99ccff"
 
925
                valign="top"
 
926
                align="left"
 
927
                width="80%"
 
928
                >
 
929
                <font color="#000000">splot&nbsp;</font>
 
930
            </th>
 
931
        </tr>
 
932
        <tr>
 
933
        <td>
 
934
        <font color="#000088"><pre>
 
935
splot (
 
936
        self,
 
937
        *items,
 
938
        *keyw,
 
939
        )
 
940
 
 
941
</pre></font>
 
942
 
 
943
<h3>Draw a new three-dimensional plot.</h3>
 
944
<p>        Clear the current plot and create a new 3-d plot containing
 
945
        the specified items.  Arguments can be of the following types:</p>
 
946
<dl>
 
947
<dt>        <code>PlotItem</code> (e.g., <code>Data</code>, <code>File</code>, <code>Func</code>, <code>GridData</code> )</dt>
 
948
<dd>This
 
949
            is the most flexible way to call plot because the
 
950
            PlotItems can contain suboptions.  Moreover, PlotItems can
 
951
            be saved to variables so that their lifetime is longer
 
952
            than one plot command--thus they can be replotted with
 
953
            minimal overhead.</dd>
 
954
<dt>        <code>string</code> (e.g., <code>sin(x*y)</code>)</dt>
 
955
<dd>The string is interpreted as a
 
956
            <code>Func()</code> (a function that is computed by gnuplot).</dd>
 
957
<dt>        Anything else</dt>
 
958
<dd>The object is converted to a Data() item, and
 
959
            thus plotted as data.  Note that each data point should
 
960
            normally have at least three values associated with it
 
961
            (i.e., x, y, and z).  If the conversion fails, an
 
962
            exception is raised.</dd>
 
963
</dl>
 
964
 
 
965
        <tr>
 
966
            <th bgcolor="#99ccff"
 
967
                rowspan="2"
 
968
                valign="top"
 
969
                align="left"
 
970
                width="20%"
 
971
                >
 
972
                <font color="#000000">
 
973
                  <a name="title"></a>&nbsp;
 
974
                </font>
 
975
            </th>
 
976
            <th bgcolor="#99ccff"
 
977
                valign="top"
 
978
                align="left"
 
979
                width="80%"
 
980
                >
 
981
                <font color="#000000">title&nbsp;</font>
 
982
            </th>
 
983
        </tr>
 
984
        <tr>
 
985
        <td>
 
986
        <font color="#000088"><pre>
 
987
title (
 
988
        self,
 
989
        s=None,
 
990
        offset=None,
 
991
        font=None,
 
992
        )
 
993
 
 
994
</pre></font>
 
995
 
 
996
<p>Set the plot's title.</p>
 
997
 
 
998
        <tr>
 
999
            <th bgcolor="#99ccff"
 
1000
                rowspan="2"
 
1001
                valign="top"
 
1002
                align="left"
 
1003
                width="20%"
 
1004
                >
 
1005
                <font color="#000000">
 
1006
                  <a name="xlabel"></a>&nbsp;
 
1007
                </font>
 
1008
            </th>
 
1009
            <th bgcolor="#99ccff"
 
1010
                valign="top"
 
1011
                align="left"
 
1012
                width="80%"
 
1013
                >
 
1014
                <font color="#000000">xlabel&nbsp;</font>
 
1015
            </th>
 
1016
        </tr>
 
1017
        <tr>
 
1018
        <td>
 
1019
        <font color="#000088"><pre>
 
1020
xlabel (
 
1021
        self,
 
1022
        s=None,
 
1023
        offset=None,
 
1024
        font=None,
 
1025
        )
 
1026
 
 
1027
</pre></font>
 
1028
 
 
1029
<p>Set the plot's xlabel.</p>
 
1030
 
 
1031
        <tr>
 
1032
            <th bgcolor="#99ccff"
 
1033
                rowspan="2"
 
1034
                valign="top"
 
1035
                align="left"
 
1036
                width="20%"
 
1037
                >
 
1038
                <font color="#000000">
 
1039
                  <a name="ylabel"></a>&nbsp;
 
1040
                </font>
 
1041
            </th>
 
1042
            <th bgcolor="#99ccff"
 
1043
                valign="top"
 
1044
                align="left"
 
1045
                width="80%"
 
1046
                >
 
1047
                <font color="#000000">ylabel&nbsp;</font>
 
1048
            </th>
 
1049
        </tr>
 
1050
        <tr>
 
1051
        <td>
 
1052
        <font color="#000088"><pre>
 
1053
ylabel (
 
1054
        self,
 
1055
        s=None,
 
1056
        offset=None,
 
1057
        font=None,
 
1058
        )
 
1059
 
 
1060
</pre></font>
 
1061
 
 
1062
<p>Set the plot's ylabel.</p>
 
1063
</td></tr>
 
1064
</td></tr>
 
1065
</table>
 
1066
 
 
1067
        </td>
 
1068
        </tr>
 
1069
        </table>
 
1070
 
 
1071
        <hr>
 
1072
 
 
1073
        <p><i><a href="../../index.html">Table of Contents</a></i></p>
 
1074
 
 
1075
        <font size="-2"><i>This document was automatically generated
 
1076
        on Sun Oct 19 17:10:22 2003 by
 
1077
        <a href="http://happydoc.sourceforge.net">HappyDoc</a> version
 
1078
        2.1</i></font>
 
1079
        
 
1080
        </body>
 
1081
        </html>
 
1082
        
 
 
b'\\ No newline at end of file'