Mercurial > jwe > octave
comparison scripts/plot/appearance/__getlegenddata__.m @ 21143:6f6eae08836f stable
__getlegenddata__.m: fix handling of multiple child elements (bug #46835)
author | Kai T. Ohlhus <k.ohlhus@gmail.com> |
---|---|
date | Wed, 27 Jan 2016 12:47:22 +0100 |
parents | 4197fc428c7d |
children | 76e0ef020dae |
comparison
equal
deleted
inserted
replaced
21142:a3362dd2dd52 | 21143:6f6eae08836f |
---|---|
27 text_strings = {}; | 27 text_strings = {}; |
28 ca = getfield (get (hlegend, "userdata"), "handle"); | 28 ca = getfield (get (hlegend, "userdata"), "handle"); |
29 if (numel (ca) == 1) | 29 if (numel (ca) == 1) |
30 kids = get (ca, "children"); | 30 kids = get (ca, "children"); |
31 else | 31 else |
32 kids = [get(ca, "children"){:}]; | 32 kids = cell2mat (get (ca, "children")); |
33 endif | 33 endif |
34 | 34 |
35 for i = numel (kids):-1:1 | 35 for i = numel (kids):-1:1 |
36 typ = get (kids(i), "type"); | 36 typ = get (kids(i), "type"); |
37 if (any (strcmp (typ, {"line", "patch", "surface", "hggroup"}))) | 37 if (any (strcmp (typ, {"line", "patch", "surface", "hggroup"}))) |