changeset 10950:c9786e03670c

Don't create __plotyy_axes__ properties in plotyy if they exist (Bug #30977)
author David Bateman <dbateman@free.fr>
date Tue, 07 Sep 2010 21:45:38 +0200
parents 848f3a13b7cf
children 97b8d462ef11
files scripts/ChangeLog scripts/plot/plotyy.m
diffstat 2 files changed, 16 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/ChangeLog
+++ b/scripts/ChangeLog
@@ -1,8 +1,13 @@
+2010-09-07  David Bateman  <dbateman@free.fr>
+
+	* plot/plotyy.m: Don't add the __plotyy_axes__ property to the
+	axes handles if iit already exists.
+
 2010-09-06  Petr Mikulik <mikulik@physics.muni.cz>
 
 	* geometry/griddata.m: Allow x, y to be vectors, and z a matrix.
 
-2010-07-07  David Bateman  <dbateman@free.fr>
+2010-09-03  David Bateman  <dbateman@free.fr>
 
 	* geometry/delaunay.m: Allow the delaunay function to treat
 	matrices of the same size for compatibility.
--- a/scripts/plot/plotyy.m
+++ b/scripts/plot/plotyy.m
@@ -195,9 +195,16 @@
   set (ax, "tag", "plotyy")
 
   ## Store the axes handles for the sister axes.
-  addproperty ("__plotyy_axes__", ax(1), "data", ax);
-  addproperty ("__plotyy_axes__", ax(2), "data", ax);
-
+  try 
+    addproperty ("__plotyy_axes__", ax(1), "data", ax);
+  catch
+    set (ax(1), "__plotyy_axes__", ax);
+  end_try_catch
+  try 
+    addproperty ("__plotyy_axes__", ax(2), "data", ax);
+  catch
+    set (ax(2), "__plotyy_axes__", ax);
+  end_try_catch
 endfunction
 
 %!demo