Mercurial > hg > octave-nkf
diff scripts/plot/draw/plotyy.m @ 19913:52cd69e79784
Fix legend function interaction with plotyy (bug #44246).
* plotyy.m: Use addproperty correctly to add property, then set value.
* newplot.m: Add special exception case when doing "replace" on an existing
axis which is a plotyy axis. Instead of re-using existing axis and doing
a "reset", delete the axis entirely and create a new one.
author | Rik <rik@octave.org> |
---|---|
date | Sat, 14 Feb 2015 07:12:22 -0800 |
parents | 4197fc428c7d |
children |
line wrap: on
line diff
--- a/scripts/plot/draw/plotyy.m +++ b/scripts/plot/draw/plotyy.m @@ -176,14 +176,16 @@ ## Store the axes handles for the sister axes. if (ishandle (ax(1)) && ! isprop (ax(1), "__plotyy_axes__")) - addproperty ("__plotyy_axes__", ax(1), "data", ax); + addproperty ("__plotyy_axes__", ax(1), "data"); + set (ax(1), "__plotyy_axes__", ax); elseif (ishandle (ax(1))) set (ax(1), "__plotyy_axes__", ax); else error ("plotyy.m: This shouldn't happen. File a bug report."); endif if (ishandle (ax(2)) && ! isprop (ax(2), "__plotyy_axes__")) - addproperty ("__plotyy_axes__", ax(2), "data", ax); + addproperty ("__plotyy_axes__", ax(2), "data"); + set (ax(2), "__plotyy_axes__", ax); elseif (ishandle (ax(2))) set (ax(2), "__plotyy_axes__", ax); else