matplotlib 3.5.1

ParametersReturnsBackRef
shade_normals(self, normals, fraction=1.0)

Imagine an artificial sun placed at infinity in some azimuth and elevation position illuminating our surface. The parts of the surface that slope toward the sun should brighten while those sides facing away should become darker.

Parameters

fraction : number, optional

Increases or decreases the contrast of the hillshade. Values greater than one will cause intermediate values to move closer to full illumination or shadow (and clipping any values that move beyond 0 or 1). Note that this is not visually or mathematically the same as vertical exaggeration.

Returns

ndarray

A 2D array of illumination values between 0-1, where 0 is completely in shadow and 1 is completely illuminated.

Calculate the illumination intensity for the normal vectors of a surface using the defined azimuth and elevation for the light source.

Examples

See :

Back References

The following pages refer to to this document either explicitly or contain code examples using this.

matplotlib.colors.LightSource.hillshade

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


File: /matplotlib/colors.py#2099
type: <class 'function'>
Commit: