Mercurial > hg > octave-lyh
changeset 4879:013350fee837
[project @ 2004-04-23 15:46:29 by jwe]
author | jwe |
---|---|
date | Fri, 23 Apr 2004 15:46:29 +0000 |
parents | 4eaf35cfdb11 |
children | b9662e2ceb6b |
files | src/ChangeLog src/pt-plot.cc |
diffstat | 2 files changed, 21 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2004-04-22 John W. Eaton <jwe@octave.org> + + * pt-plot.cc (Fclearplot): Temporarily turn off automatic_replot. + Clear display after resetting title, labels, etc. + 2004-04-22 John W. Eaton <jwe@bevo.che.wisc.edu> * pt-colon.cc (tree_colon_expression::rvalue): Also check for
--- a/src/pt-plot.cc +++ b/src/pt-plot.cc @@ -59,6 +59,7 @@ #include "pt-walk.h" #include "sighandlers.h" #include "sysdep.h" +#include "unwind-prot.h" #include "utils.h" #include "variables.h" @@ -942,7 +943,13 @@ @end deftypefn") { octave_value_list retval; - send_to_plot_stream ("clear\n"); + + // We are clearing the plot window, so there is no need to redisplay + // after each incremental change to the title, labels, etc. + + unwind_protect_bool (Vautomatic_replot); + + Vautomatic_replot = false; // XXX FIXME XXX -- instead of just clearing these things, it would // be nice if we could reset things to a user-specified default @@ -954,11 +961,17 @@ send_to_plot_stream ("set nogrid\n"); send_to_plot_stream ("set nolabel\n"); - // This makes a simple `replot' not work after a `clearplot' command - // has been issued. + // Clear the plot display last. + + send_to_plot_stream ("clear\n"); + + // Setting plot_line_count to zero makes a simple `replot' not work + // after a `clearplot' command has been issued. plot_line_count = 0; + unwind_protect::run (); + return retval; }