On Thursday 15 January 2004 10:27, Maurice LeBrun wrote:
> Heh. That looks like the plot buffer. As you create a plot under X, the
> plot buffer pseudo-device is written to, so that on window expose or redraw
> events, the prior contents of the window can be recovered. It's closed at
> every end-of-page, and my guess is that you aren't issuing any.. LOL.
> There really should be a size limitation on it though.. >1G is way, way too
> big. :)
> Although there is no API control for this, fortunately you do have access
> through the plplot stream pointer. You can disable writing to the plot
> buffer entirely by setting pls->plbuf_write to 0. Or keep it writing by
> default but control its contents through manipulating pls->plbufFile. See
> src/plbuf.c for more info.
(I'm really impressed by the speed one gets answers from this mailing list,
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:
extern PLStream *plsc;
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!
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