# HG changeset patch # User Pantxo Diribarne # Date 1666559195 -7200 # Node ID 927c8d7bd8f38f6c1a9e2ddbe519f4f39629f556 # Parent b01e8e322838171bfe9f78c9a2a2173bd405650a legend.m: fix error with contour plot containing clabels (bug #63262) * legend.m (create_item): Remove text objects from the list of children to consider for shaping the legend icon. (grafted from 472df5147221f1bd304aefda0e9f84e44873bf2e) diff -r b01e8e322838 -r 927c8d7bd8f3 scripts/plot/appearance/legend.m --- a/scripts/plot/appearance/legend.m Mon Oct 17 09:27:37 2022 +0200 +++ b/scripts/plot/appearance/legend.m Sun Oct 23 23:06:35 2022 +0200 @@ -1042,6 +1042,8 @@ typ = creator; switch (creator) case "__contour__" + ## Eliminate eventual text objects created by clabel + kids(strcmp (get (kids, "type"), "text")) = []; hplt = [kids(end), kids(1)]; case {"__errplot__", "__quiver__", "__stem__"} hplt = kids(2:-1:1);