changeset 27722:62a57f086bf9

legend.m: fix argument parsing when empty string present (bug #52641) * legend.m (parse_opts): Test number of rows to distinguish char arrays from char vectors.
author Pantxo Diribarne <pantxo.diribarne@gmail.com>
date Tue, 19 Nov 2019 18:29:25 +0100
parents 6eb7491a8794
children a0143104b224
files scripts/plot/appearance/legend.m
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/plot/appearance/legend.m	Tue Nov 19 18:02:55 2019 +0100
+++ b/scripts/plot/appearance/legend.m	Tue Nov 19 18:29:25 2019 +0100
@@ -699,7 +699,7 @@
       obj_labels = varargin{1};
       varargin(1) = [];
       nargs--;
-    elseif (ischar (varargin{1}) && ! isvector (varargin{1}))
+    elseif (ischar (varargin{1}) && rows (varargin{1}) > 1)
       obj_labels = cellstr (varargin{1});
       varargin(1) = [];
       nargs--;