# HG changeset patch # User David Bateman # Date 1283888738 -7200 # Node ID c9786e03670c4534796e026e7387ec5f25d226cb # Parent 848f3a13b7cfe75938ecdea6e7d6fc16d25eef5b Don't create __plotyy_axes__ properties in plotyy if they exist (Bug #30977) diff --git a/scripts/ChangeLog b/scripts/ChangeLog --- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,8 +1,13 @@ +2010-09-07 David Bateman + + * plot/plotyy.m: Don't add the __plotyy_axes__ property to the + axes handles if iit already exists. + 2010-09-06 Petr Mikulik * geometry/griddata.m: Allow x, y to be vectors, and z a matrix. -2010-07-07 David Bateman +2010-09-03 David Bateman * geometry/delaunay.m: Allow the delaunay function to treat matrices of the same size for compatibility. diff --git a/scripts/plot/plotyy.m b/scripts/plot/plotyy.m --- 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