changeset 23821:5b5b021b1476 stable

Fix 'legend hide' for gnuplot (bug #50483). * __gnuplot_draw_axes__.m: Check that legend object is visible before displaying it. * contributors.in: Add Tejaswi D Prakash to list of contributors.
author Tejaswi D Prakash <tejaswidp@protonmail.com>
date Tue, 01 Aug 2017 17:04:52 -0700
parents d396866fa7d8
children 9401e88f63cf 6ae0292aaa5c
files doc/interpreter/contributors.in scripts/plot/util/private/__gnuplot_draw_axes__.m
diffstat 2 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/doc/interpreter/contributors.in	Fri Jul 28 13:47:45 2017 -0500
+++ b/doc/interpreter/contributors.in	Tue Aug 01 17:04:52 2017 -0700
@@ -279,6 +279,7 @@
 Jef Poskanzer
 Francesco Potortì
 Konstantinos Poulios
+Tejaswi D. Prakash
 Jarno Rajahalme
 Eduardo Ramos
 Pooja Rao
--- a/scripts/plot/util/private/__gnuplot_draw_axes__.m	Fri Jul 28 13:47:45 2017 -0500
+++ b/scripts/plot/util/private/__gnuplot_draw_axes__.m	Tue Aug 01 17:04:52 2017 -0700
@@ -1563,7 +1563,8 @@
              sidx_major, sidx_minor);
   endif
 
-  if (! isempty (hlgnd) && ! isempty (hlgnd.children)
+  if (! isempty (hlgnd) && strcmp (hlgnd.visible, "on")
+      && ! isempty (hlgnd.children)
       && any (strcmp (get (hlgnd.children, "visible"), "on")))
     if (strcmp (hlgnd.box, "on"))
       box = "box";