changeset 16797:38c1a421f082

When no keys are specified and defaults are populated, set have_labels = true. scripts/plot/legend.m: Set have_labals true when the default key labels are populated.
author Ben Abbott <bpabbott@mac.com>
date Fri, 21 Jun 2013 22:20:41 +0800
parents 1d1f02e0f6b4
children 519343308ab1
files scripts/plot/legend.m
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/plot/legend.m
+++ b/scripts/plot/legend.m
@@ -420,7 +420,9 @@
     if (have_labels || ! have_dname)
       k = nkids;
       if (! have_labels)
-        varargin = arrayfun (@(x) sprintf ("data%d", x), [1:nkids]', "uniformoutput", false);
+        varargin = arrayfun (@(x) sprintf ("data%d", x), [1:nkids]',
+          "uniformoutput", false);
+        have_labels = true;
         nargs = nkids;
       endif
       for i = 1 : nargs