|
From: Joe K. <jko...@co...> - 2006-10-10 00:59:17
|
Hi, all
While testing the wxt terminal, I ran across a problem with my perception of
the way gnuplot-4.2.rc1 should work. The problem also occurs with x11, so
here it is. This is on my G5 Mac with OS X 10.4.8, built with Xcode-2.4
developer tools, etc.
I test a simple script with gnuplot < test_script.inp, where test_script is
set term x11
plot [-pi:pi] sin(x)
pause -1
set term postscript color
set output "test_plot.ps"
replot
First, the script doesn't pause for a carriage return at pause -1, then I
see
Joe-Koskis-Computer:~/Codes/gnuplot_tests jakoski$ gnuplot < test_script.inp
gnuplot> et term postscript color
^
line 0: invalid command
Joe-Koskis-Computer:~/Codes/gnuplot_tests jakoski$
Shouldn't pause -1 work, even in script input mode? Otherwise the plot just
flashes by. What happens to the s in set?
The problem is identical with the wxt terminal.
Tell me if I should submit this as a bug report. Thanks.
Joe
|
|
From: Daniel J S. <dan...@ie...> - 2006-10-10 01:23:30
|
Joe Koski wrote: > Shouldn't pause -1 work, even in script input mode? Otherwise the plot just > flashes by. What happens to the s in set? The "s" is the character interpretted as a carriage return. > The problem is identical with the wxt terminal. > > Tell me if I should submit this as a bug report. Thanks. Probably not. The redirection < replaces the keyboard input with with the file contents. Not sure how one can "pause" the input from a file. (Not hitting the keyboard is the pause.) Give this a try: gnuplot test_script.inp Dan |
|
From: Joe K. <jko...@co...> - 2006-10-10 02:23:09
|
on 10/9/06 7:33 PM, Daniel J Sebald at dan...@ie... wrote: > Joe Koski wrote: > >> Shouldn't pause -1 work, even in script input mode? Otherwise the plot just >> flashes by. What happens to the s in set? > > The "s" is the character interpretted as a carriage return. > >> The problem is identical with the wxt terminal. >> >> Tell me if I should submit this as a bug report. Thanks. > > Probably not. The redirection < replaces the keyboard input with with the > file contents. Not sure how one can "pause" the input from a file. (Not > hitting the keyboard is the pause.) > > Give this a try: > > gnuplot test_script.inp > > > Dan Dan, You are correct. gnuplot test_script.inp works as I expected it should. Thanks. Joe |
|
From: Ethan A M. <merritt@u.washington.edu> - 2006-10-10 02:15:41
|
On Monday 09 October 2006 05:59 pm, Joe Koski wrote: > > First, the script doesn't pause for a carriage return at pause -1 That is correct. You cannot control the execution of a script using 'pause -1'. Here is why: 'pause -1' means "wait until more input is available". In a keyboard session, this means in effect "wait until the guy behind the keyboard types something". But in a scripted session, more input is *always* available, right up until you run off the end of the script. > Shouldn't pause -1 work, even in script input mode? No. What would it mean? Pause until....what, exactly? You can tell it "pause mouse" instead, if you like. Then it will wait for a mouse click, even if you are in a script. > Tell me if I should submit this as a bug report. Nope. -- Ethan A Merritt Biomolecular Structure Center University of Washington, Seattle 98195-7742 |
|
From: Joe K. <jko...@co...> - 2006-10-10 02:32:46
|
on 10/9/06 8:15 PM, Ethan A Merritt at merritt@u.washington.edu wrote: > On Monday 09 October 2006 05:59 pm, Joe Koski wrote: >> >> First, the script doesn't pause for a carriage return at pause -1 > > That is correct. > You cannot control the execution of a script using 'pause -1'. > > Here is why: > 'pause -1' means "wait until more input is available". > In a keyboard session, this means in effect "wait until the > guy behind the keyboard types something". But in a scripted > session, more input is *always* available, right up until you > run off the end of the script. > >> Shouldn't pause -1 work, even in script input mode? > > No. What would it mean? Pause until....what, exactly? > You can tell it "pause mouse" instead, if you like. > Then it will wait for a mouse click, even if you are > in a script. > >> Tell me if I should submit this as a bug report. > > Nope. Ethan, OK, the reason I had never worried about this was because I had always used aquaterm with gnuplot, maxima and octave. The aquaterm terminal separately pops up the plot window and keeps it until it is later closed or aquaterm is quit. If I had used X11, I would have seen this behavior before. I guess having a separate application as the terminal has at least one minor advantage to slow learners. Thanks. Joe |
|
From: <br...@ph...> - 2006-10-10 17:58:39
|
Ethan A Merritt wrote: > You cannot control the execution of a script using 'pause -1'. Actually, you can. But you have to run it as a script for that to work, not as redirected stdin. There's a difference between gnuplot file and gnuplot < file which is why we run gnuplot all.dem </dev/null to shoot through all the demo plots without interaction. |