|
From: Ian R. G. <ge...@kd...> - 2004-10-21 00:39:50
|
Greetings, I have been working on a KDE interface to Octave, when I found that there was no nice KDE wrapper around gnuplot. So I started one. I am mostly looking for people who are interested in helping me that are familiar with gnuplot. I only really know how to do pretty simple things with it, but I did most of the dirty work already, so anyone with minor C++ knowledge, and a good gnuplot background would work. The following C++ code generates the graphic at http://www.geiseri.com/kdevelop/gnuplot.png KGNUPlotWidget *wid =3D new KGNUPlotWidget(); LineStyle line(2); line.setLineType( 4 ); line.setLineWidth( 1 ); line.setPointType( 6 ); line.setPointSize( 3 ); LineStyle border( 3 ); border.setLineType( 9 ); border.setLineWidth( 2 ); FillStyle fill; fill.setType( FillStyle::pattern ); fill.setFillPattern( 2 ); fill.setBorderStyle( &border ); FunctionPlot *plot =3D new FunctionPlot( "sin(x)" ); plot->setTitle( "Test Plot of sin(x)" ); plot->setStartRange( -1 ); plot->setEndRange( 2 ); plot->setPlotStyle( PlotBase::linespoints ); plot->setLineStyle( &line ); wid->addLineStyle( &border ); wid->addLineStyle( &line ); wid->addFillStyle( &fill ); wid->show(); wid->resize(400,300); wid->setXLabel("Test X Label"); wid->setYLabel("Test Y Label"); wid->setFormats(KGNUPlotWidget::X, "%g"); wid->setFormats(KGNUPlotWidget::Y, "%.2f"); wid->plot(plot); Currently line styles, arrows, and arrow styles are supported. Fill is sort of supported, and plot for data or functions will work with most simple cases. I think the big issues that remain are the ones I am not aware of ;) Currently there is a small dependency on KDE, but I have plans to remove it, and the remainder works on Win32 or Unix. So who wants to play? I'm not on the list so please CC me. -ian reinhart geiser --=20 KDE - Unix is ready for the desktop http://www.kde.org |