|
From: Mojca M. <moj...@gm...> - 2006-04-17 22:26:22
|
On 4/17/06, Ethan Merritt wrote:
> On Monday 17 April 2006 02:05 pm, Mojca Miklavec wrote:
> > I'm sorry for a stupid question (probably not the most appropriate for
> > this list, but I didn't find the answer yet): how can I ignore
> > "pause"? I would like to call gnuplot from an external program (with
> > "set terminal whatever", has to produce a couple of graphics and then
> > exit quitely) and "I can't afford to hire a robot" to keep pushing
> > "enter" on pauses triggered with "pause -1"? Pause is good for
> > interactive terminals, but not when writing images into a file.
>
> This is a strange question, because "pause -1" should return
> immediately if the input is from a script.
> How, exactly, are you feeding your commands to gnuplot?
I have a gnuplot.bat with
c:\path-to-wgnuplot.exe %*
and I call it with
gnuplot somescript.plt
where somescript.plt might be something like
set terminal context
set output "somefile.tex"
plot sin(x)
pause -1
plot cos(x)
or perhaps
load "somefile.dem" # any demo file from the distribution
Then a pause windows pops up and wants me to press Enter in order to procee=
d.
I'm still using the "old" windows terminal. Perhaps wxwidgets behave better=
.
> And if you are piping the commands from an external program,
> why is it listening to the keyboard even if you *were* to
> hire a robot key-presser?
I'm not piping (I guess). I'm only calling "gnuplot[.bat]
somescript.plt" from TeX.
> Off-the-wall suggestions, since I don't really understand how
> your problem is created.
>
> 1) Don't put any pause statements in your automated scripts to begin with
Sure, but if I want to test demo scripts out of the box ... I won't
write any pause statements in my scripts (although I still might want
to use the same code for testing the plots where I need pauses and for
producing high quality plots where I would want them to be ignored).
> 2) sed -e 's/pause -1//' < script | gnuplot
>
> 3) gnuplot script < /bin/true
But that can't be used under windows (where I'm experiencing the "problem")=
.
I don't have access to any linux box at the moment, but well ... I can
try what happens there.
GhostScript has -dBATCH -dNOPAUSE switches for the same purpose for example=
.
Thanks,
Mojca
|