|
From: Maurice L. <mj...@ga...> - 2001-12-18 05:33:15
|
Did anyone respond to this? I am getting caught up with email after letting
it slide for a few weeks.
Victor Munoz writes:
>
> I've been using plplot for some weeks. Since I prefer C++, I'm using
> that interface, but I noticed I couldn't easily ask for the postscript
> driver and then specify the output file name so that my program does not
> expect an answer from the keyboard. The problem seemed to be that plstream
> constructors call plinit(), so when, after the plstream object is created,
> I intended to set the filename, I got a segfault. My program was:
>
> #include "plstream.h"
> int main(){
> plstream pls(1,1,"psc");
> pls.sfnam("tres.ps");
> }
>
> I decided to add a constructor to the plstream class, so that something
> like plstream pls(1,1,"psc","tres.ps") works, and consequently
> automatically opens an output file. I had to recompile the libraries, but
> it worked. If someone knows of a better or easier solution, or if someone
> thinks this is a good feature to include in future versions, I'd be glad
> to know.
Sounds like a good constructor to have. If you supply a patch, it will be
included.
> Second. I noticed that if I create two plstream objects, and the second
> window is put over the first one in my screen, the first one is erased, so
> I cannot see both windows simultaneously (that's why I had to worry about
> writing files, by the way). Is that a common problem with the xwin driver,
> or there's something in my distribution I could change to fix this?
That's because the xwin driver is part of the same process and is single
threaded. It'd be nice to add a threaded capability to it to handle the
event loop, but there are too many worthwhile projects, not enough time.
You can also try the tk driver, which lives in a separate process so doesn't
suffer from this problem.
--
Maurice LeBrun mj...@ga...
|