Set the shading of patch or surface graphic objects.
Valid arguments for type are
"flat"
Single colored patches with invisible edges.
"faceted"
Single colored patches with black edges.
"interp"
Colors between patch vertices are interpolated and the patch edges are invisible.
If the first argument hax is an axes handle, then plot into this axis,
rather than the current axes returned by gca
.
See also: fill, mesh, patch, pcolor, surf, surface, hidden, lighting.
The following code
clf; colormap ("default"); sombrero (); shading faceted; title ('shading ''faceted''');
Produces the following figure
Figure 1 |
---|
The following code
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" reversed'});
Produces the following figure
Figure 1 |
---|
The following code
clf; colormap ("default"); sombrero (); shading flat; title ('shading ''flat''');
Produces the following figure
Figure 1 |
---|
The following code
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" reversed'});
Produces the following figure
Figure 1 |
---|
The following code
clf; colormap ("default"); sombrero (); shading interp; title ('shading ''interp''');
Produces the following figure
Figure 1 |
---|
The following code
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" reversed'});
Produces the following figure
Figure 1 |
---|
The following code
clf; colormap ("default"); peaks (); shading interp; h = findobj (gca (), "type", "surface"); set (h, "edgecolor", "k"); title ({'shading ''interp''', 'with "edgecolor" set to black'});
Produces the following figure
Figure 1 |
---|
The following code
clf; colormap ("default"); pcolor (peaks ()); shading faceted; title ('shading ''faceted''');
Produces the following figure
Figure 1 |
---|
The following code
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" reversed'});
Produces the following figure
Figure 1 |
---|
The following code
clf; colormap ("default"); pcolor (peaks ()); shading flat; title ('shading ''flat''');
Produces the following figure
Figure 1 |
---|
The following code
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" reversed'});
Produces the following figure
Figure 1 |
---|
The following code
clf; colormap ("default"); pcolor (peaks ()); shading interp; title ('shading ''interp''');
Produces the following figure
Figure 1 |
---|
The following code
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" reversed'});
Produces the following figure
Figure 1 |
---|
The following code
clf; colormap ('default'); mesh (sombrero ()); shading interp; title ('mesh with shading ''interp''');
Produces the following figure
Figure 1 |
---|
The following code
clf; colormap ('default'); mesh (sombrero ()); shading flat; title ('mesh with shading ''flat''');
Produces the following figure
Figure 1 |
---|
Package: octave