Mercurial > hg > octave-lyh
diff scripts/plot/plotyy.m @ 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 | fe3c3dfc07eb |
line wrap: on
line diff
--- 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