FUNCTION REFERENCE
shading
Surface colour shading.
Surface colour shading.
Syntax
shading flatSyntax
shading facetedSyntax
shading interpSyntax
shading(ax, mode)Sets the colouring of every surface in the current axes, or in axes ax: 'flat' gives FaceColor 'flat' and EdgeColor 'none'; 'faceted' (surf's default) gives FaceColor 'flat' and black edges; 'interp' gives FaceColor 'interp' and EdgeColor 'none'. On a mesh, 'flat' and 'faceted' set EdgeColor 'flat' and 'interp' sets EdgeColor 'interp'; the mesh faces are kept.
Example
surf(peaks(20)); shading interpExample
h = surf(magic(4)); shading flat; h.EdgeColor % 'none'Differences from MATLAB: 'interp' colours each face with the mean of its four vertex colours (no gradients within a face). Patch objects are not changed.
These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.