diff scripts/plot/hold.m @ 9328:0307f5e5568c

__go_draw_axes__.m: Fix order when pushing group children onto kid list.
author Ben Abbott <bpabbott@mac.com>
date Wed, 10 Jun 2009 20:33:10 -0400
parents c539ec5726e7
children e381f80a5f7a
line wrap: on
line diff
--- a/scripts/plot/hold.m
+++ b/scripts/plot/hold.m
@@ -121,3 +121,18 @@
 %! imagesc(1./hilb(4));
 %! hold off
 
+%!demo
+%! clf
+%! colormap (jet)
+%! t = linspace (-3, 3, 50);
+%! [x, y] = meshgrid (t, t);
+%! z = peaks (x, y);
+%! contourf (x, y, z, 10);
+%! hold ("on");
+%! plot (vec (x), vec (y), "^");
+%! patch ([-1.0 1.0 1.0 -1.0 -1.0], [-1.0 -1.0 1.0 1.0 -1.0], "red");
+%! xlim ([-2.0 2.0]);
+%! ylim ([-2.0 2.0]);
+%! colorbar ("SouthOutside");
+%! title ("Test script for some plot functions");
+