Mercurial > jwe > octave
changeset 23823:ff2c2f2f6702
Require some plot object present to show legend for gnuplot (bug #50483).
* __gnuplot_draw_axes__.m: Add a condition to legend drawing that checks
that at least one of the plot objects associated with all the legend children
is visible.
author | Daniel J Sebald <daniel.sebald@ieee.org> |
---|---|
date | Wed, 02 Aug 2017 00:43:38 -0500 |
parents | 9401e88f63cf |
children | 061a343089be |
files | scripts/plot/util/private/__gnuplot_draw_axes__.m |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/plot/util/private/__gnuplot_draw_axes__.m Tue Aug 01 17:05:49 2017 -0700 +++ b/scripts/plot/util/private/__gnuplot_draw_axes__.m Wed Aug 02 00:43:38 2017 -0500 @@ -1562,7 +1562,9 @@ if (! isempty (hlgnd) && strcmp (hlgnd.visible, "on") && ! isempty (hlgnd.children) - && any (strcmp (get (hlgnd.children, "visible"), "on"))) + && any (strcmp (get ([get(hlgnd.children, "userdata"){:}], "visible"), + "on"))) + if (strcmp (hlgnd.box, "on")) box = "box"; else