changeset 12533:35f6e9a25296

patch.m: Add demo.
author Ben Abbott <bpabbott@mac.com>
date Sat, 19 Mar 2011 17:46:45 -0400
parents 06cebc991966
children 5b9b2645db26
files scripts/ChangeLog scripts/plot/patch.m
diffstat 2 files changed, 17 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/ChangeLog	Sat Mar 19 14:35:59 2011 -0700
+++ b/scripts/ChangeLog	Sat Mar 19 17:46:45 2011 -0400
@@ -34,6 +34,7 @@
 
 2011-03-19  Ben Abbott  <bpabbott@mac.com>
 
+	* plot/patch.m: Add demo.
 	* geometry/trisurf.m: Set default edgecolor as Matlab does. Add demos.
 
 2010-03-18  Rik  <octave@nomad.inbox5.com>
--- a/scripts/plot/patch.m	Sat Mar 19 14:35:59 2011 -0700
+++ b/scripts/plot/patch.m	Sat Mar 19 17:46:45 2011 -0400
@@ -136,3 +136,19 @@
 %! patch('Vertices', vertices, 'Faces', faces, ...
 %!       'FaceVertexCData', jet(4), 'FaceColor', 'flat')
 %! view (-37.5, 30)
+
+%!demo
+%! clf
+%! vertices = [0, 0, 0;
+%!             1, 0, 0;
+%!             1, 1, 0;
+%!             0, 1, 0;
+%!             0.5, 0.5, 1];
+%! faces = [1, 2, 5;
+%!          2, 3, 5;
+%!          3, 4, 5;
+%!          4, 1, 5];
+%! patch('Vertices', vertices, 'Faces', faces, ...
+%!       'FaceVertexCData', jet(5), 'FaceColor', 'interp')
+%! view (-37.5, 30)
+