|
From: Hans-Bernhard B. <HBB...@t-...> - 2010-12-17 21:58:43
|
On 17.12.2010 16:48, seb_kramm wrote: > On 16/12/2010 22:27, Hans-Bernhard Bröker wrote: >> The effect you see is almost certainly caused by how you you set up >> that association. I'll venture a guess: you used the -persist flag. >> You get that behaviour because that's what -persist is meant (and >> documented) to do. > The problem is that if I don't set this "on", then the plot/GUI > doesn't stay on the screen, and closes instantly. So, as usual (I > mean, this is what I do with Windows), I add: pause -1 at the end of > the file. And, for some mysterious reason, gnuplot just ignores this > statement, and has the same behaviour (closing the window when > finished plotting). That's caused by you doing this entirely from the GUI. Console gnuplot needs a console for you to input that <Return> to end pause -1. Without a console (i.e. a command-line shell from which you invoked gnuplot), there's nowhere for that keypress to come from, i.e. no stdin. That is treated as an immediate termination of the script. You'll want to look up "pause mouse" in the help. Or you could just stick with the need-to-close-the-window, -persist mode. Typing q or Ctrl-q in that window should work, too, though. |