|
From: Daniel J S. <dan...@ie...> - 2004-10-22 19:09:50
|
Ian Reinhart Geiser wrote: >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. > Hi Ian, There is a lot of functionality in gnuplot, making a wrapper for a full implementation quite big. Octave doesn't use all features, naturally, but one nice thing about Octave is the "graw" function that allows one to access "non-Octave" graphics and other terminals. If you want a good idea of things you are not aware of, I suggest downloading the latest CVS version of gnuplot, compiling, then running 'all.dem' in the 'demo' subdirectory. Dan Sebald >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 = 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 = 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 > > -- Dan Sebald email: daniel DOT sebald AT ieee DOT org URL: http://acer-access DOT com/~dsebald AT acer-access DOT com/ |