changeset 8813:70d06ed27c08

gnuplot_drawnow.m: Only send figure position info to gnuplot when the plot stream is first opened. Revert usage of hidden axes to store prior figure "position" property.
author Ben Abbott <bpabbott@mac.com>
date Thu, 19 Feb 2009 07:34:15 -0500
parents 7d48766c21a5
children de16ebeef93d
files scripts/ChangeLog scripts/plot/gnuplot_drawnow.m
diffstat 2 files changed, 6 insertions(+), 24 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/ChangeLog
+++ b/scripts/ChangeLog
@@ -1,3 +1,9 @@
+2009-02-19  Ben Abbott <bpabbott@mac.com>
+
+	* plot/gnuplot_drawnow.m: Only send figure position info to gnuplot
+	when the plot stream is first opened. Revert usage of hidden axes 
+	to store prior figure "position" property.
+
 2009-02-19  John W. Eaton  <jwe@octave.org>
 
 	* general/__isequal__.m, general/__splinen__.m, image/__img__.m,
--- a/scripts/plot/gnuplot_drawnow.m
+++ b/scripts/plot/gnuplot_drawnow.m
@@ -58,35 +58,11 @@
   elseif (nargin == 1)
     ##  Graphics terminal for display.
     plot_stream = get (h, "__plot_stream__");
-    tag = "gnuplot_drawnow";
     if (isempty (plot_stream))
       plot_stream = open_gnuplot_stream (2, h);
       new_stream = true;
-      ha = axes ("tag", tag, "visible", "off");
-      set (ha, "userdata", get (h, "position"));
     else
       new_stream = false;
-      unwind_protect
-	set (0, "showhiddenhandles", "on");
-	ha = findobj (h, "type", "axes", "tag", tag);
-        position = get (h, "position");
-	if (! isempty (ha))
-	  prior_position = get (ha, "userdata");
-	  if (! all (position == prior_position))
-	    new_stream = true;
-	  else
-	    ## FIXME -- Obtain the x11 window id from gnuplot and
-	    ## determine the current position via xwininfo.  The
-	    ## "position" property may then be updated to reflect
-	    ## changes in window position/size made by the mouse.
-	  endif
-	else
-          ha = axes ("tag", tag, "visible", "off");
-	endif
-        set (ha, "userdata", position);
-      unwind_protect_cleanup
-	set (0, "showhiddenhandles", "off");
-      end_unwind_protect
     endif
     enhanced = gnuplot_set_term (plot_stream (1), new_stream, h);
     __go_draw_figure__ (h, plot_stream (1), enhanced, mono);