Mercurial > hg > octave-lyh
diff scripts/plot/legend.m @ 16800:56102c33122d
Fix problems with changeset 286904321282.
legend.m: Do not delete invisible legend text object. Fix typo.
author | Ben Abbott <bpabbott@mac.com> |
---|---|
date | Sat, 22 Jun 2013 13:38:03 +0800 |
parents | 286904321282 |
children | 2281d957cde6 |
line wrap: on
line diff
--- a/scripts/plot/legend.m +++ b/scripts/plot/legend.m @@ -511,7 +511,7 @@ if (isempty (hplots)) if (! isempty (hlegend)) fkids = get (fig, "children"); - delete_legend (fkids(fkids == hlegend)); + delete (fkids(fkids == hlegend)); hlegend = []; hobjects = []; hplots = []; @@ -869,13 +869,8 @@ props = {"parent", ca(1), "tag", "legend", ... "handlevisibility", "off", "visible", "off", ... "xliminclude", "off", "yliminclude", "off"}; - t1 = findall (ca(1), props{:}, "type", "text"); + t1 = findall (ca(1), props{3:4}, "type", "text"); if (isempty (t1)) - ht = findall (ca(1), "type", "text", props{3:end}); - if (! isempty (ht)) - set (ht, "deletefcn", "") - delete (ht); - endif t1 = text (0, 0, "", props{:}); set (t1, "deletefcn", {@deletelegend1, hlegend}); endif