Mercurial > hg > octave-nkf
diff scripts/plot/patch.m @ 12533:35f6e9a25296
patch.m: Add demo.
author | Ben Abbott <bpabbott@mac.com> |
---|---|
date | Sat, 19 Mar 2011 17:46:45 -0400 |
parents | c792872f8942 |
children | cd808de114c1 |
line wrap: on
line diff
--- a/scripts/plot/patch.m +++ b/scripts/plot/patch.m @@ -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) +