M_Plotter widget plots one or more numerical datasets.
The widget is suitable for plotting data in real-time (fetching the data from
different types of sources), but it can also plot existing datasets all at once.
Extra annotations (labels) can be associated with the individual plots.
The data displayed by M_Plotter can be retrieved from different types of sources. Currently implemented sources include:
|AG_Object(3)-> AG_Widget(3)-> M_Plotter.|
The M_PlotterNew() function allocates, initializes, and attaches a new M_Plotter widget. Acceptable flags include:
M_PlotterSizeHint() sets an initial preferred widget size in pixels.
M_PlotterSetDefaultFont() configures a default font face for use with plotter labels (see PLOT LABELS section).
M_PlotterSetDefaultColor() sets entry colorIdx in the palette of default plot colors. Newly created plots are assigned an initial plot color from this palette in a round-robin fashion. Valid indices are 0 up to M_PLOTTER_NDEFCOLORS-1.
M_PlotterSetDefaultScale() sets the default X and Y scaling factor that will be assigned to newly created plots.
M_PlotNew() creates a new plot with no label and a source type of M_PLOT_MANUALLY (see DESCRIPTION ) . The type, argument can take on the values:
The M_PlotFromReal() and M_PlotFromInt() variants create a plot which will be generated by dereferencing the value of an integer or real variable. The plot is assigned a specified label string by default.
M_PlotFromDerivative() creates a plot which will be computed as the derivative of plot. Nothing prevents plot from being a derivative plot itself.
M_PlotFromVariableVFS() creates a plot that will be generated by reading the value of a numerical AG_Object(3) variable. The object itself must be located under vfsRoot, and the varName string can take on the form "<object-name>:<variable-name>". See AG_Variable(3) for details.
M_PlotClear() erases the existing contents of a plot.
M_PlotSettings() constructs and displays a dialog which allows the user to change plot parameters (style, color, etc.), as well as to display the plot data in tabular format.
M_PlotSetColor() configures an alternate color for plot pl in RGB format.
M_PlotSetScale() configures an alternate horizontal and vertical scaling factor for plot pl.
The functions M_PlotSetXoffs() and M_PlotSetYoffs() set specific display X and Y offsets. Note that these offsets are bound to scrollbars and can be manipulated by the user.
The M_PlotReal() function enters an explicit value v in plot pl. M_PlotRealv() enters data from an array values, containing n entries.
M_PlotVector() enters data from an M_Vector(3). M_PlotVectorv() enters data from an array of n vectors.
The M_PlotterUpdate() routine updates all plots (except those using the M_PLOT_MANUALLY source type), effectively increasing the width of the plot display. This involves the dereferencing of associated variables (and possibly the evaluation of AG_Variable(3) functions for M_PLOT_FROM_VARIABLE_VFS). If scrolling mode is set (scrolling mode can be enabled by the user panning to the right edge of the display), the display is scrolled by one increment.
|The M_Plotter widget does not generate any event.|
|AG_Intro(3), AG_Scrollbar(3), AG_Widget(3), M_Complex(3), M_Matrix(3), M_Real(3), M_Vector(3)|
|The M_Plotter widget first appeared in Agar 1.3.4.|