light
Add a directional or point light source to a 3D scene.
Syntax
Section titled “Syntax”h = lighth = light('Position', [x y z], ...)Description
Section titled “Description”Adds a light source to the current axes. Default is a directional light at (0, 0, 1). Trailing name-value pairs set position, color, and style. Affects rendering of surfaces with surfl-style lighting.
Example
Section titled “Example”light('Position', [-1 0 1])See also
Section titled “See also”lightangle— Add or position a light source by azimuth and elevation.surfl— 3D surface plot with lighting.