Bases: decida.ItclObjectx.ItclObjectx, Tkinter.Frame
graphical user-interface to plot equation sets.
synopsis:
Plotterx is a graphical user-interface to plot the left-hand-side variables of a set of equations, specified in a text-window in the panel. Cartesian, parametric, polar or polar-parametric curves can be specified and plotted. The equation set experiments can be saved to a script which, when invoked, puts up the same Plotterx window.
The DeCiDa application plotter simply instantiates one Plotterx object.
constructor arguments:
- parent (Tkinter handle)
handle of frame or other widget to pack plot in. if this is not specified, top-level is created.
- **kwargs (dict)
configuration-options
configuration options:
- verbose (bool, default=False)
Enable or disable verbose mode
- plot_width (string, default="5i")
Plot width, specified in Tk inch or pixel units
- plot_height (string, default="5i")
Plot height, specified in Tk inch or pixel units
- plot_type (string, default="cartesian")
- Plot type: one of “cartesian”, “cartesian-parametric”,
- “polar”, or “polar-parametric”
- Cartesian plots: y vs x, require specification of an x variable to vary, its range, and a y variable.
- Parametric plots: y(t) vs x(t), require specification of a parameter variable to vary, its range, and x and y variables to plot.
- Polar plots: r(a) require specification of an angle variable to vary, its range, and a radius variable. x(r,a) and y(r,a) are plotted.
- Polar-parametric plots: r(t), a(t), require specification of a parameter variable to vary, its range, and angle and radius variables. x(r,a) and y(r,a) are plotted.
- sample_type (string, default="linear")
Sample type: one of “linear”, or “logarithmic”
- linear sampling: equally-spaced samples from the minimum to maximum values of the varied variable or parameter
- logarithmic sampling: the parameter is varied according to (maximum_value/minimum_value)^(i/(number_of_points - 1)), for i in range(0, number_of_points)
- xcol (string) (default="x")
x-axis column (sweep for caresian plots)
- ycol (string) (default="y")
y-axis column
- acol (string) (default="a")
angle column (sweep for polar plots)
- rcol (string) (default="r")
radius column (for polar and polar-parametric plots)
- tcol (string) (default="t")
- parameter column (sweep for cartesian-parametric and
- polar-parametric plots)
- npts (int) (default=1000)
number of sample points
- min (float) (default=0.0)
minimum of sampling
- max (float) (default=5.0)
maximum of sampling
example: (from test_Plotterx)
from decida.Plotterx import Plotterx
Plotterx(ycol="v", xcol="time", equations="v=sin(time*3)")
public methods:
- public methods from ItclObjectx