|
From: Ethan M. <merritt@u.washington.edu> - 2008-01-24 20:31:15
|
On Thursday 24 January 2008 07:26, Sebi35 wrote: > > I've been working a lot with Qt and I often have to use plot functions. I've > recently discovered the power of Gnuplot and I'd like to encapsulate gnuplot > in a Qt widget. There was some discussion of this a long while back, but it didn't seem to go anywhere. http://marc.info/?l=gnuplot-info-beta&m=109846928802054&w=2 > I have read all the docs of the gnuplot distribution, and I feel like if I > code a "Qt" terminal, the widget will only be reachable through the gnuplot > application. It is not clear exactly what you want to present to the user inside this widget. Are you proposing to develop a GUI that controls gnuplot? Or are you proposing a Qt-based output widget that contains the plots created by gnuplot? Both? Something else? > Is there anyway to use Gnuplot as a library? No. But IMHO this would not be a useful thing to do even if it were possible. It is better to control the complete gnuplot app through a pipe, possibly through multiple pipes to multiple instances of gnuplot. The plots output from gnuplot could then be directed to any of a variety of output modes, including display within a panel of your hypothetical Qt widget. The CVS version of gnuplot now has an example script .../demo/gpdemos.tcl that demonstrates doing something of this sort using Tcl/Tk widgets. You might want to look at that to get a feel for one possible model of control flow. -- Ethan A Merritt |