Plotitem represents an item that can be plotted by gnuplot.
For the finest control over the output, you can create PlotItems
yourself with additional keyword options, or derive new classes
from PlotItem.
The handling of options is complicated by the attempt to allow
options and their setting mechanism to be inherited conveniently.
Note first that there are some options that can only be set in the
constructor then never modified, and others that can be set in the
constructor and/or modified using the set_option() member
function. The former are always processed within __init__. The
latter are always processed within set_option, which is called
by the constructor.
set_option is driven by a class-wide dictionary called
_option_list, which is a mapping { from
option name to the function object used to set or change the
option. is a function object that takes two parameters:
self (the PlotItem instance) and the new value requested for
the option. If is None, then the option is not allowed
to be changed after construction and an exception is raised.
Any PlotItem that needs to add options can add to this
dictionary within its class definition. Follow one of the
examples in this file. Alternatively it could override the
set_option member function if it needs to do wilder things.
Members:
_basecommand
a string holding the elementary argument that
must be passed to gnuplot's `plot' command for this item;
e.g., sin(x) or "filename.dat".
_options
a dictionary of (
{'title' : (Data, title "Data"),
with : (linespoints, with linespoints)}
If the plot command requires data to be put on stdin (i.e.,
plot "-"), this method should put that data there. Can be
overridden in derived classes.
set_option
set_option ( self, **keyw )
Set or change a plot option for this PlotItem.
See documentation for __init__ for information about allowed
options. This function can be overridden by derived classes
to allow additional options, in which case those options will
also be allowed by __init__ for the derived class. However,
it is easier to define a new _option_list variable for the
derived class.