[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gnuplot problem

From: John W. Eaton
Subject: gnuplot problem
Date: Thu, 4 Mar 1999 22:25:33 -0600 (CST)

On  4-Mar-1999, Jason Curry <address@hidden> wrote:

| I'm a newbie to Octave, but I was unable to find information about this
| problem in the archives.  
| Whenever I use the plot command in an m-file, gnuplot will display the
| correct plot for an instant and then immediately close.  I can only catch
| a glimpse of what was plotted.  I'm familiar with the "hold on" command
| but this doesn't do anything to keep gnuplot open.

Can you say precisely what you mean by `use the plot command in an
m-file' and exactly how you are invoking Octave and how you are
executing the m-file?

If it is a script and you are running

  octave script-file.m

then probably the reason that the plot disappears quickly is that
Octave and gnuplot are exiting as soon as the plot is drawn.  Two
possible solutions are to add

  sleep (N);

to the end of your script, in which N is the number of seconds to wait
before exiting, or add

  gnuplot_binary = "gnuplot -persist";

before any plotting commands.  The `-persist' option will cause the
X11 window to stay on the screen after gnuplot exits.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]