# HG changeset patch # User Rik # Date 1348585882 25200 # Node ID e5a07d7aafcc769b95d513f3b4548e8c5ad0bebb # Parent 1db706430c965cc4add7b15f3df8b7e38450e8bd legend.m: Remove unused warning variable and associated code. * legend.m: Remove unused warning variable and associated code. diff --git a/scripts/plot/legend.m b/scripts/plot/legend.m --- a/scripts/plot/legend.m +++ b/scripts/plot/legend.m @@ -357,7 +357,6 @@ endif if (strcmp (textpos, "default")) - warned = false; k = nkids; for i = 1 : nargs arg = varargin{i}; @@ -389,14 +388,14 @@ if (--k == 0) break; endif - elseif (! warned) - break; + else + break; # k = 0, no further handles to process endif else error ("legend: expecting argument to be a character string"); endif endfor - if (i < nargs && ! warned) + if (i < nargs) warning ("legend: ignoring extra labels"); endif else @@ -440,7 +439,7 @@ if (isempty (hplots)) if (! isempty (hlegend)) fkids = get (fig, "children"); - delete (fkids (fkids == hlegend)); + delete (fkids(fkids == hlegend)); hlegend = []; hobjects = []; hplots = []; @@ -760,10 +759,10 @@ "xliminclude", "off", "yliminclude", "off"); set (t1, "deletefcn", {@deletelegend1, hlegend}); - ## Resize the axis the legend is attached to if the - ## legend is "outside" the plot and create listener to + ## Resize the axis that the legend is attached to if the + ## legend is "outside" the plot and create a listener to ## resize axis to original size if the legend is deleted, - ## hidden or shown + ## hidden, or shown. if (outside) for i = 1 : numel (ca) units = get (ca(i), "units");