Mercurial > hg > octave-nkf
changeset 6419:73fcbac81f33
[project @ 2007-03-20 17:18:24 by jwe]
author | jwe |
---|---|
date | Tue, 20 Mar 2007 17:18:24 +0000 |
parents | 2efe282221ed |
children | e35658098bbc |
files | scripts/ChangeLog scripts/plot/clf.m scripts/plot/drawnow.m scripts/plot/newplot.m scripts/plot/text.m src/ChangeLog src/sysdep.cc |
diffstat | 7 files changed, 32 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,7 +1,15 @@ 2007-03-20 John W. Eaton <jwe@octave.org> + * plot/newplot.m: Call __request_drawnow__ after initializing axes. + * plot/text.m: Call __request_drawnow__ after creating text objects. + + * plot/clf.m: Don't call drawnow. + +2007-03-20 Daniel J Sebald <daniel.sebald@ieee.org>. + * plot/drawnow.m: Make __go_close_all_registered__ persistent - instead of global. From Daniel J Sebald <daniel.sebald@ieee.org>. + instead of global. Only register __go_close_all__ with atexit if + the plot stream is successfully opened. 2007-03-15 John W. Eaton <jwe@octave.org>
--- a/scripts/plot/clf.m +++ b/scripts/plot/clf.m @@ -32,7 +32,6 @@ for k = get (cf, "children") delete (k); endfor - drawnow (); else print_usage (); endif
--- a/scripts/plot/drawnow.m +++ b/scripts/plot/drawnow.m @@ -46,10 +46,6 @@ cmd = sprintf ("%s -title \"Figure %d\"", cmd, h); endif plot_stream = popen (cmd, "w"); - if (isempty (__go_close_all_registered__)) - atexit ("__go_close_all__"); - __go_close_all_registered__ = true; - endif if (plot_stream < 0) error ("drawnow: failed to open connection to gnuplot"); else @@ -57,6 +53,10 @@ if (isunix () && isempty (getenv ("DISPLAY"))) fprintf (plot_stream, "set terminal dumb\n;"); endif + if (isempty (__go_close_all_registered__)) + atexit ("__go_close_all__"); + __go_close_all_registered__ = true; + endif endif endif
--- a/scripts/plot/newplot.m +++ b/scripts/plot/newplot.m @@ -44,6 +44,7 @@ case "replacechildren" case "replace" __go_axes_init__ (ca, "replace"); + __request_drawnow__ (); otherwise error ("newplot: unrecognized nextplot property for current axes"); endswitch
--- a/scripts/plot/text.m +++ b/scripts/plot/text.m @@ -78,12 +78,14 @@ "position", pos(i,:), varargin{:}); endfor + __request_drawnow__ (); elseif (n == nx) for i = 1:nx tmp(i) = __go_text__ (ca, "string", label{i}, "position", pos(i,:), varargin{:}); endfor + __request_drawnow__ (); else error ("text: dimension mismatch for coordinates and label"); endif
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2007-03-20 John W. Eaton <jwe@octave.org> + + * sysdep.cc (Fpause): Call drawnow. + 2007-03-15 John W. Eaton <jwe@octave.org> * variables.cc (F__lock_global__): Delete.
--- a/src/sysdep.cc +++ b/src/sysdep.cc @@ -84,6 +84,7 @@ #include "oct-obj.h" #include "ov.h" #include "pager.h" +#include "parse.h" #include "sighandlers.h" #include "sysdep.h" #include "toplev.h" @@ -648,15 +649,20 @@ if (! error_state) { - if (xisnan (dval)) - warning ("pause: NaN is an invalid delay"); - else if (xisinf (dval)) + if (! xisnan (dval)) { - flush_octave_stdout (); - octave_kbhit (); + feval ("drawnow"); + + if (xisinf (dval)) + { + flush_octave_stdout (); + octave_kbhit (); + } + else + octave_sleep (dval); } else - octave_sleep (dval); + warning ("pause: NaN is an invalid delay"); } } else