comparison 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
comparison
equal deleted inserted replaced
18970:4ff59f43f7ec 18971:961ecaf9fb57
1087 set (hax, "position", position); 1087 set (hax, "position", position);
1088 case "outerposition" 1088 case "outerposition"
1089 set (hax, "position", position); 1089 set (hax, "position", position);
1090 set (hax, "outerposition", outerposition); 1090 set (hax, "outerposition", outerposition);
1091 endswitch 1091 endswitch
1092 ## Crazy syntax because set() only seems to support row vectors 1092 set (hax, {"units"}, units);
1093 set (hax, repmat ({"units"}, [1 numel(hax)]), units(:)');
1094 1093
1095 h = legend (hax(1), hplots, get (h, "string")); 1094 h = legend (hax(1), hplots, get (h, "string"));
1096 unwind_protect_cleanup 1095 unwind_protect_cleanup
1097 recursive = false; 1096 recursive = false;
1098 end_unwind_protect 1097 end_unwind_protect