
MultiPlot allows for fast plotting two - dimensional graphs. You simply add points with their coordinates (x,y)
and optionally their colors (r,g,b) and MULTIPLOT does the rest for you. It scales automatically such that the whole graph fits
to the window. It is based on www.FLTK.org for platform independent window-creation
(and so should compile on win32, mac and linu[ni]x ) and
www.opengl.org for fast drawing of lines. To use MULTIPLOT, you only need to include
"multiplot.h" and you are done.
here is an example code on how to use multiplot:
void main()
{
MULTIPLOT m(10,10,300,300); // create a multiplot Window in position 10,10 and with
// width=300 and height=300
m.show(); // display the window
int x=0;
while(Fl::check()) // process events so the window gets redrawn
{
// add a point to the graph. (this draws a spiral)
m.add(0,PLOT_POINT(0.1*x*cos(x/5.0), 0.1*x*sin(x/5.0)));
m.redraw();
x++;
Fl::wait(10); // wait some mseconds to give other tasks some processor time
}
}
PLEASE drop me a note if you have questions or something doesnt work: post@andre-krause.net
back to homepage