Mercurial > hg > octave-lyh
diff scripts/plot/legend.m @ 11199:91c606a68693
minor fix to previous changeset
author | David Bateman <dbateman@free.fr> |
---|---|
date | Sun, 07 Nov 2010 22:48:50 +0100 |
parents | 9f080d23396f |
children | abc0c6b0a4c4 |
line wrap: on
line diff
--- a/scripts/plot/legend.m +++ b/scripts/plot/legend.m @@ -109,11 +109,13 @@ ca = get (fig, "currentaxes"); endif - plty = get(ca (strcmp (get (ca, "tag"), "plotyy")), "userdata"); - if (isscalar (plty)) - ca = [ca, plty]; - else - ca = [ca, plty{:}]; + if (strcmp (get (ca, "tag"), "plotyy")) + plty = get(ca (strcmp (get (ca, "tag"), "plotyy")), "userdata"); + if (isscalar (plty)) + ca = [ca, plty]; + else + ca = [ca, plty{:}]; + endif endif if (all (ishandle (varargin{1})))