Class: Gnuplot | Gnuplot/_Gnuplot.py | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Interface to a gnuplot program. A Gnuplot represents a higher-level interface to a gnuplot
program. It can plot 'PlotItem's, which represent each thing to
be plotted on the current graph. It keeps a reference to each of
the Members:
Methods:
|
interact
|
| interact ( self ) Allow user to type arbitrary commands to gnuplot.Read stdin, line by line, and send each line as a command to gnuplot. End by typing C-d.
|
load
|
| load ( self, filename ) Load a file using gnuplot's
|
plot
|
| plot ( self, *items, *keyw, ) Draw a new plot.Clear the current plot and create a new 2-d plot containing the specified items. Each arguments should be of the following types:
|
refresh
|
| refresh ( self ) Refresh the plot, using the current 'PlotItem's.Refresh the current plot by reissuing the gnuplot plot command corresponding to the current itemlist.
|
replot
|
| replot ( self, *items, *keyw, ) Replot the data, possibly adding new 'PlotItem's. Replot the existing graph, using the items in the current
itemlist. If arguments are specified, they are interpreted as
additional items to be plotted alongside the existing items on
the same graph. See
|
reset
|
| reset ( self ) Reset all gnuplot settings to their defaults and clear itemlist.
|
save
|
| save ( self, filename ) Save the current plot commands using gnuplot's
|
set
|
| set ( self, **keyw ) Set one or more settings at once from keyword arguments. The allowed settings and their treatments are determined from the optiontypes mapping.
|
set_boolean
|
| set_boolean ( self, option, value, ) Set an on/off option. It is assumed that the way to turn
the option on is to type `set <option>
|
set_label
|
| set_label ( self, option, s=None, offset=None, font=None, ) Set or clear a label option, which can include an offset or font.If offset is specified, it should be a tuple of two integers or floats. If font is specified, it is appended to the command as a
string in double quotes. Its interpretation is
terminal-dependent; for example, for postscript it might be
|
set_range
|
| set_range ( self, option, value, ) Set a range option (xrange, yrange, trange, urange, etc.). The value can be a string (which is passed as-is, without quotes) or a tuple (minrange,maxrange) of numbers or string expressions recognized by gnuplot. If either range is None then that range is passed as `*' (which means to autoscale).
|
set_string
|
| set_string ( self, option, s=None, ) Set a string option, or if s is omitted, unset the option.
|
splot
|
| splot ( self, *items, *keyw, ) Draw a new three-dimensional plot.Clear the current plot and create a new 3-d plot containing the specified items. Arguments can be of the following types:
|
title
|
| title ( self, s=None, offset=None, font=None, ) Set the plot's title.
|
xlabel
|
| xlabel ( self, s=None, offset=None, font=None, ) Set the plot's xlabel.
|
ylabel
|
| ylabel ( self, s=None, offset=None, font=None, ) Set the plot's ylabel. |