comparison scripts/plot/legend.m @ 12387:5fb6ea1bff65

legend.m: Add demo for replacing existing legend.
author Ben Abbott <bpabbott@mac.com>
date Sun, 06 Feb 2011 09:16:03 -0500
parents d63007ac067a
children cf9ca0dbc5ee
comparison
equal deleted inserted replaced
12351:ca1190196d26 12387:5fb6ea1bff65
1077 %! plot (x, sin(x), ";sin(x);") 1077 %! plot (x, sin(x), ";sin(x);")
1078 %! hold all 1078 %! hold all
1079 %! plot (x, cos(x), ";cos(x);") 1079 %! plot (x, cos(x), ";cos(x);")
1080 %! hold off 1080 %! hold off
1081 1081
1082 %!demo
1083 %! clf
1084 %! x = 0:0.1:10;
1085 %! plot (x, sin(x), ";sin(x);")
1086 %! hold all
1087 %! plot (x, cos(x), ";cos(x);")
1088 %! hold off
1089 %! legend ({"sin(x)", "cos(x)"}, "location", "northeastoutside")
1090
1091