diff 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
line wrap: on
line diff
--- a/scripts/plot/legend.m	Sun Feb 06 05:50:49 2011 -0500
+++ b/scripts/plot/legend.m	Sun Feb 06 09:16:03 2011 -0500
@@ -1079,3 +1079,13 @@
 %! plot (x, cos(x), ";cos(x);")
 %! hold off
 
+%!demo
+%! clf
+%! x = 0:0.1:10;
+%! plot (x, sin(x), ";sin(x);")
+%! hold all
+%! plot (x, cos(x), ";cos(x);")
+%! hold off
+%! legend ({"sin(x)", "cos(x)"}, "location", "northeastoutside")
+
+