# HG changeset patch # User jwe # Date 1082735189 0 # Node ID 013350fee83743d40bc579323f55f18c8099ac6c # Parent 4eaf35cfdb1160f8f000aae6c7df318adc287043 [project @ 2004-04-23 15:46:29 by jwe] diff -r 4eaf35cfdb11 -r 013350fee837 src/ChangeLog --- a/src/ChangeLog Fri Apr 23 15:42:10 2004 +0000 +++ b/src/ChangeLog Fri Apr 23 15:46:29 2004 +0000 @@ -1,3 +1,8 @@ +2004-04-22 John W. Eaton + + * pt-plot.cc (Fclearplot): Temporarily turn off automatic_replot. + Clear display after resetting title, labels, etc. + 2004-04-22 John W. Eaton * pt-colon.cc (tree_colon_expression::rvalue): Also check for diff -r 4eaf35cfdb11 -r 013350fee837 src/pt-plot.cc --- a/src/pt-plot.cc Fri Apr 23 15:42:10 2004 +0000 +++ b/src/pt-plot.cc Fri Apr 23 15:46:29 2004 +0000 @@ -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; }