Mercurial > octave-nkf
comparison scripts/plot/legend.m @ 12391:b268c9a79d09 release-3-4-x
legend.m: Add demo for inline keys created by two plot commands.
author | Ben Abbott <bpabbott@mac.com> |
---|---|
date | Sat, 05 Feb 2011 11:14:09 -0500 |
parents | 7428d177f00a |
children | 5fb6ea1bff65 |
comparison
equal
deleted
inserted
replaced
12390:7428d177f00a | 12391:b268c9a79d09 |
---|---|
1069 %! x = 0:0.1:7; | 1069 %! x = 0:0.1:7; |
1070 %! h = plot (x, sin(x), x, cos(x), x, sin(x.^2/10), x, cos(x.^2/10)); | 1070 %! h = plot (x, sin(x), x, cos(x), x, sin(x.^2/10), x, cos(x.^2/10)); |
1071 %! title ("Only the sin() objects have keylabels"); | 1071 %! title ("Only the sin() objects have keylabels"); |
1072 %! legend (h([1, 3]), {"sin(x)", "sin(x^2/10)"}, "location", "southwest"); | 1072 %! legend (h([1, 3]), {"sin(x)", "sin(x^2/10)"}, "location", "southwest"); |
1073 | 1073 |
1074 %!demo | |
1075 %! clf | |
1076 %! x = 0:0.1:10; | |
1077 %! plot (x, sin(x), ";sin(x);") | |
1078 %! hold all | |
1079 %! plot (x, cos(x), ";cos(x);") | |
1080 %! hold off | |
1081 |