diff scripts/plot/drawnow.m @ 6432:5bec61ae1576

[project @ 2007-03-23 02:19:10 by jwe]
author jwe
date Fri, 23 Mar 2007 02:19:11 +0000
parents 0cc5ca7b1e91
children 71c052b5ce47
line wrap: on
line diff
--- a/scripts/plot/drawnow.m
+++ b/scripts/plot/drawnow.m
@@ -46,16 +46,20 @@
     for h = __go_figure_handles__ ()
       if (! (isnan (h) || h == 0))
 	f = get (h);
-	plot_stream = f.__plot_stream__;
-	figure_is_visible = strcmp (f.visible, "on");
-	if (figure_is_visible)
-	  if (isempty (plot_stream))
-	    plot_stream = open_gnuplot_stream (h);
+	if (f.__modified__)
+	  plot_stream = f.__plot_stream__;
+	  figure_is_visible = strcmp (f.visible, "on");
+	  if (figure_is_visible)
+	    if (isempty (plot_stream))
+	      plot_stream = open_gnuplot_stream (h);
+	    endif
+	    __go_draw_figure__ (f, plot_stream);
+	  elseif (! isempty (plot_stream))
+	    pclose (plot_stream);
+	    set (h, "__plot_stream__", []);
 	  endif
-	  __go_draw_figure__ (f, plot_stream);
-	elseif (! isempty (plot_stream))
-	  pclose (plot_stream);
-	  set (h, "__plot_stream__", []);
+	  "setting"
+	  set (h, "__modified__", false);
 	endif
 	__request_drawnow__ (false);
       endif