#include <multiplot.h>
Public Methods | |
MULTIPLOT (int x, int y, int w, int h, const char *title="MULTIPLOT-updates on www.andre-krause.net") | |
void | add (unsigned int trace, const PLOT_POINT &p) |
void | set_max_points (int mx) |
void | set_scrolling (int max_points_to_plot) |
void | set_grid (int gridx, int gridy, float gridx_step=-1.0, float gridy_step=-1.0, float w=1.0) |
void | set_pointsize (unsigned int trace, float s) |
void | set_linewidth (unsigned int trace, float w) |
void | set_bg_color (float r, float g, float b) |
void | set_grid_color (float r, float g, float b) |
void | clear () |
void | clear (unsigned int t) |
|
this constructor tells multiplot where to put the window on the desktop in pixel-coordinates(x,y) and with wich width and height (w,h) |
|
with this function you cann add a plot-points to a trace. traces are numbered from zero to N. memory for the traces is automatically allocated. |
|
this function call clears trace number t |
|
this function call simply clears all traces |
|
sets the background color |
|
call this function if you wish a grid to be plotted in your graph. by default, no grids are plotted. call this function with the first two arguments set to either MP_NO_GRID, MP_LINEAR_GRID or MP_LOG_GRID. the next two arguments gridx_step and gridy_step specify the grid spacing. Zero or a negative value like -1 enables auto - spacing. The last parameter w sets the grid-linewidth. the default is 1 pixel. |
|
sets the grid color |
|
call set_linewidth to change the thickness of the traces. the default value is 1 pixel, if you set the linewidth to zero, no lines are drawn. this is usefull to create scatter-plots. |
|
set the maximum number of points to be plotted. this is useful to avoid slow drawing of your trace. if you have 1000 plot-points and set the number of max_points to 100, then only every tenth point gets plotted. |
|
this function sets the size of the plot-points. the default value is zero, so no points are drawn at all. if you wish to create a scatter-plot, set the pointsize to a value bigger than zero and the linesize to zero. |
|
if you call set_scrolling with a positive number of points to be plotted, your graph will scroll left out of the plot-window as you add new plot-points. Zero or a negative number disables scrolling. |