diff scripts/plot/appearance/legend.m @ 18971:961ecaf9fb57

legend.m: Tweak syntax when setting multiple "unit" properties to be more readable. * legend.m (updatelegend): Tweak syntax when setting multiple "unit" properties to be more readable.
author Rik <rik@octave.org>
date Thu, 17 Jul 2014 11:20:26 -0700
parents b6fdfe22634b
children 6ca096827123
line wrap: on
line diff
--- a/scripts/plot/appearance/legend.m	Thu Jul 17 15:32:19 2014 -0400
+++ b/scripts/plot/appearance/legend.m	Thu Jul 17 11:20:26 2014 -0700
@@ -1089,8 +1089,7 @@
           set (hax, "position", position);
           set (hax, "outerposition", outerposition);
       endswitch
-      ## Crazy syntax because set() only seems to support row vectors
-      set (hax, repmat ({"units"}, [1 numel(hax)]), units(:)');
+      set (hax, {"units"}, units);
 
       h = legend (hax(1), hplots, get (h, "string"));
     unwind_protect_cleanup