From: Arjen M. <arj...@wl...> - 2004-01-15 14:40:28
|
Jay Christnach wrote: > > > This got a bit complicated, because I'm no experienced C-programmer. > Fortunately one knows somebody who knows more. We found that pls was declared > static, so inaccessible and out of pure intuition we decided to try out plsc > which is also a PLStream. And it worked! The temporary file is now still > open, but it doesn't grow anymore. > Here is what I did in my application code: > ... > #include "plstrm.h" > extern PLStream *plsc; > .... > plinit(); > plsc->plbuf_write=0; > .... > > I'm not sure if this was the right (or the best) way to do it, but I think I > can be happy with it. Thanks to the developers of those cool libraries which > make programming a lot more fun! > I ran into a similar problem - and used the same solution. This had to do with PLplot being a library inside a larger application. > The next challenge will be user interaction for which I will need an > eventhandler for our window. Just don't know yet how to accomplish this > stuff. > You might want to look at the Tcl/Tk binding: with Tcl/Tk you can easily create user-interfaces and PLplot can serve to produce your graphical display. If you choose another solution, you will probably run into the problems I referred to - I still have to commit them to the PLplot development team - as they arose in this larger program, because it handles the user-interface (and all window events) and uses PLplot as a graphics library. Regards, Arjen |