diff scripts/plot/draw/patch.m @ 22312:533c3c4059a3

Add titles to more of the graphic demos. * imagesc.m, imshow.m, axis.m, daspect.m, datetick.m, material.m, camlight.m, compass.m, isocaps.m, isonormals.m, isosurface.m, light.m, loglog.m, patch.m, plot.m, plotyy.m, semilogx.m, semilogy.m, surfnorm.m, trisurf.m, hold.m: Add titles to more of the graphic demos.
author Rik <rik@octave.org>
date Tue, 16 Aug 2016 10:07:34 -0700
parents 1c4cd12987f5
children bac0d6f07a3e
line wrap: on
line diff
--- a/scripts/plot/draw/patch.m	Tue Aug 16 18:19:31 2016 +0200
+++ b/scripts/plot/draw/patch.m	Tue Aug 16 10:07:34 2016 -0700
@@ -107,7 +107,6 @@
 
 
 %!demo
-%! ## Patches with same number of vertices
 %! clf;
 %! t1 = (1/16:1/8:1)' * 2*pi;
 %! t2 = ((1/16:1/8:1)' + 1/32) * 2*pi;
@@ -116,9 +115,9 @@
 %! x2 = sin (t2) + 0.8;
 %! y2 = cos (t2);
 %! patch ([x1,x2], [y1,y2], "r");
+%! title ("patches with same number of vertices");
 
 %!demo
-%! ## Unclosed patch
 %! clf;
 %! t1 = (1/16:1/8:1)' * 2*pi;
 %! t2 = ((1/16:1/16:1)' + 1/32) * 2*pi;
@@ -127,9 +126,9 @@
 %! x2 = sin (t2) + 0.8;
 %! y2 = cos (t2);
 %! patch ([[x1;NaN(8,1)],x2], [[y1;NaN(8,1)],y2], "r");
+%! title ("Unclosed patch by using NaN");
 
 %!demo
-%! ## Specify vertices and faces separately
 %! clf;
 %! t1 = (1/16:1/8:1)' * 2*pi;
 %! t2 = ((1/16:1/16:1)' + 1/32) * 2*pi;
@@ -140,9 +139,9 @@
 %! vert = [x1, y1; x2, y2];
 %! fac = [1:8,NaN(1,8);9:24];
 %! patch ("Faces",fac, "Vertices",vert, "FaceColor","r");
+%! title ("patch() with separate specification of Faces and Vertices");
 
 %!demo
-%! ## Specify vertices and faces separately
 %! clf;
 %! t1 = (1/16:1/8:1)' * 2*pi;
 %! t2 = ((1/16:1/16:1)' + 1/32) * 2*pi;
@@ -154,6 +153,7 @@
 %! fac = [1:8,NaN(1,8);9:24];
 %! patch ("Faces",fac, "Vertices",vert, ...
 %!        "FaceVertexCData",[0, 1, 0; 0, 0, 1], "FaceColor", "flat");
+%! title ("patch() with specification of color for each vertex");
 
 %!demo
 %! ## Property change on multiple patches
@@ -167,6 +167,7 @@
 %! h = patch ([x1,x2], [y1,y2], cat (3, [0,0],[1,0],[0,1]));
 %! pause (1);
 %! set (h, "FaceColor", "r");
+%! title ("change color on multiple patch() objects");
 
 %!demo
 %! clf;
@@ -182,6 +183,8 @@
 %! patch ("Vertices", vertices, "Faces", faces, ...
 %!        "FaceVertexCData", jet (4), "FaceColor", "flat");
 %! view (-37.5, 30);
+%! box off;
+%! title ('"FaceColor" = "flat"');
 
 %!demo
 %! clf;
@@ -197,6 +200,8 @@
 %! patch  ("Vertices", vertices, "Faces", faces, ...
 %!        "FaceVertexCData", jet (5), "FaceColor", "interp");
 %! view (-37.5, 30);
+%! box off;
+%! title ('"FaceColor" = "interp"');
 
 %!demo
 %! clf;
@@ -204,12 +209,12 @@
 %! x = [0 1 1 0];
 %! y = [0 0 1 1];
 %! subplot (2,1,1);
-%!  title ("Blue, Light-Green, and Red Horizontal Bars");
+%!  title ("Blue, Light Green, and Red Horizontal Bars");
 %!  patch (x, y + 0, 1);
 %!  patch (x, y + 1, 2);
 %!  patch (x, y + 2, 3);
 %! subplot (2,1,2);
-%!  title ("Blue, Light-Green, and Red Vertical Bars");
+%!  title ("Blue, Light Green, and Red Vertical Bars");
 %!  patch (x + 0, y, 1 * ones (size (x)));
 %!  patch (x + 1, y, 2 * ones (size (x)));
 %!  patch (x + 2, y, 3 * ones (size (x)));