Main Page   Compound List   File List   Compound Members  

MULTIPLOT Class Reference

#include <multiplot.h>

List of all members.

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)


Detailed Description

this class creates a window to wich you can add an arbitrary number of autoscaling traces.


Constructor & Destructor Documentation

MULTIPLOT::MULTIPLOT int    x,
int    y,
int    w,
int    h,
const char *    title = "MULTIPLOT-updates on www.andre-krause.net"
[inline]
 

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)


Member Function Documentation

void MULTIPLOT::add unsigned int    trace,
const PLOT_POINT   p
[inline]
 

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.

void MULTIPLOT::clear unsigned int    t [inline]
 

this function call clears trace number t

void MULTIPLOT::clear   [inline]
 

this function call simply clears all traces

void MULTIPLOT::set_bg_color float    r,
float    g,
float    b
[inline]
 

sets the background color

void MULTIPLOT::set_grid int    gridx,
int    gridy,
float    gridx_step = -1.0,
float    gridy_step = -1.0,
float    w = 1.0
[inline]
 

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.

void MULTIPLOT::set_grid_color float    r,
float    g,
float    b
[inline]
 

sets the grid color

void MULTIPLOT::set_linewidth unsigned int    trace,
float    w
[inline]
 

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.

void MULTIPLOT::set_max_points int    mx [inline]
 

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.

void MULTIPLOT::set_pointsize unsigned int    trace,
float    s
[inline]
 

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.

void MULTIPLOT::set_scrolling int    max_points_to_plot [inline]
 

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.


The documentation for this class was generated from the following file:
Generated on Fri Oct 18 15:06:44 2002 for multiplot by doxygen1.2.18