Navigation

Operators and Keywords

Function List:

C++ API

Function File: shading (type)
Function File: shading (hax, type)

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 visible edges.

"interp"

Color 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.

Demonstration 1

The following code

 clf;
 colormap ('default');
 sombrero ();
 shading faceted;
 title ('shading ''faceted''');

Produces the following figure

Figure 1

Demonstration 2

The following code

 clf;
 colormap ('default');
 sombrero ();
 shading flat;
 title ('shading ''flat''');

Produces the following figure

Figure 1

Demonstration 3

The following code

 clf;
 colormap ('default');
 sombrero ();
 shading interp;
 title ('shading ''interp''');

Produces the following figure

Figure 1

Demonstration 4

The following code

 clf;
 colormap ('default');
 pcolor (peaks ());
 shading faceted;
 title ('shading ''faceted''');

Produces the following figure

Figure 1

Demonstration 5

The following code

 clf;
 colormap ('default');
 pcolor (peaks ());
 shading flat;
 title ('shading ''flat''');

Produces the following figure

Figure 1

Demonstration 6

The following code

 clf;
 colormap ('default');
 pcolor (peaks ());
 shading interp;
 title ('shading ''interp''');

Produces the following figure

Figure 1

Package: octave