Mercurial > octave
diff scripts/plot/legend.m @ 12340:d63007ac067a
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 | eda5eabd5d0b |
children | 5fb6ea1bff65 |
line wrap: on
line diff
--- a/scripts/plot/legend.m Sat Feb 05 10:19:13 2011 -0500 +++ b/scripts/plot/legend.m Sat Feb 05 11:14:09 2011 -0500 @@ -1071,3 +1071,11 @@ %! title ("Only the sin() objects have keylabels"); %! legend (h([1, 3]), {"sin(x)", "sin(x^2/10)"}, "location", "southwest"); +%!demo +%! clf +%! x = 0:0.1:10; +%! plot (x, sin(x), ";sin(x);") +%! hold all +%! plot (x, cos(x), ";cos(x);") +%! hold off +