changeset 21715:db71f8a7d896

Add demos for surface plots. * scripts/plot/appearance/shading.m: Demos derived from the existing demos for shading. The new demos reverse the settings for "edgecolor" and "facecolor".
author Ben Abbott <bpabbott@mac.comm>
date Sun, 15 May 2016 20:20:47 -0400
parents 68522e5b74ef
children fccffef9d210
files scripts/plot/appearance/shading.m
diffstat 1 files changed, 75 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/plot/appearance/shading.m	Sun May 15 16:47:28 2016 -0500
+++ b/scripts/plot/appearance/shading.m	Sun May 15 20:20:47 2016 -0400
@@ -109,6 +109,17 @@
 %! clf;
 %! colormap ('default');
 %! sombrero ();
+%! shading faceted;
+%! h = findobj (gca (), 'type', 'surface');
+%! facecolor = get (h, 'facecolor');
+%! edgecolor = get (h, 'edgecolor');
+%! set (h, 'edgecolor', facecolor, 'facecolor', edgecolor)
+%! title ({'shading ''faceted''', 'with "edgecolor" and "facecolor" revesed'});
+
+%!demo
+%! clf;
+%! colormap ('default');
+%! sombrero ();
 %! shading flat;
 %! title ('shading ''flat''');
 
@@ -116,12 +127,43 @@
 %! clf;
 %! colormap ('default');
 %! sombrero ();
+%! shading flat;
+%! h = findobj (gca (), 'type', 'surface');
+%! facecolor = get (h, 'facecolor');
+%! edgecolor = get (h, 'edgecolor');
+%! set (h, 'edgecolor', facecolor, 'facecolor', edgecolor)
+%! title ({'shading ''flat''', 'with "edgecolor" and "facecolor" revesed'});
+
+%!demo
+%! clf;
+%! colormap ('default');
+%! sombrero ();
 %! shading interp;
 %! title ('shading ''interp''');
 
 %!demo
 %! clf;
 %! colormap ('default');
+%! sombrero ();
+%! shading interp;
+%! h = findobj (gca (), 'type', 'surface');
+%! facecolor = get (h, 'facecolor');
+%! edgecolor = get (h, 'edgecolor');
+%! set (h, 'edgecolor', facecolor, 'facecolor', edgecolor)
+%! title ({'shading ''interp''', 'with "edgecolor" and "facecolor" revesed'});
+
+%!demo
+%! clf
+%! colormap ('default')
+%! peaks ()
+%! shading interp
+%! h = findobj (gca (), 'type', 'surface');
+%! set (h, 'edgecolor', 'k')
+%! title ({'shading ''interp''', 'with "edgecolor" set to black'})
+
+%!demo
+%! clf;
+%! colormap ('default');
 %! pcolor (peaks ());
 %! shading faceted;
 %! title ('shading ''faceted''');
@@ -130,6 +172,17 @@
 %! clf;
 %! colormap ('default');
 %! pcolor (peaks ());
+%! shading faceted;
+%! h = findobj (gca (), 'type', 'surface');
+%! facecolor = get (h, 'facecolor');
+%! edgecolor = get (h, 'edgecolor');
+%! set (h, 'edgecolor', facecolor, 'facecolor', edgecolor)
+%! title ({'shading ''faceted''', 'with "edgecolor" and "facecolor" revesed'});
+
+%!demo
+%! clf;
+%! colormap ('default');
+%! pcolor (peaks ());
 %! shading flat;
 %! title ('shading ''flat''');
 
@@ -137,6 +190,28 @@
 %! clf;
 %! colormap ('default');
 %! pcolor (peaks ());
+%! shading flat;
+%! h = findobj (gca (), 'type', 'surface');
+%! facecolor = get (h, 'facecolor');
+%! edgecolor = get (h, 'edgecolor');
+%! set (h, 'edgecolor', facecolor, 'facecolor', edgecolor)
+%! title ({'shading ''flat''', 'with "edgecolor" and "facecolor" revesed'});
+
+%!demo
+%! clf;
+%! colormap ('default');
+%! pcolor (peaks ());
 %! shading interp;
 %! title ('shading ''interp''');
 
+%!demo
+%! clf;
+%! colormap ('default');
+%! pcolor (peaks ());
+%! shading interp;
+%! h = findobj (gca (), 'type', 'surface');
+%! facecolor = get (h, 'facecolor');
+%! edgecolor = get (h, 'edgecolor');
+%! set (h, 'edgecolor', facecolor, 'facecolor', edgecolor)
+%! title ({'shading ''interp''', 'with "edgecolor" and "facecolor" revesed'});
+