Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9e73e25

Browse files
committed
DOC: Add documentation for lightsource parameter
1 parent 833543d commit 9e73e25

File tree

1 file changed

+25
-13
lines changed

1 file changed

+25
-13
lines changed

lib/mpl_toolkits/mplot3d/axes3d.py

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1593,7 +1593,11 @@ def plot_surface(self, X, Y, Z, *args, norm=None, vmin=None,
15931593
Bounds for the normalization.
15941594
15951595
shade : bool
1596-
Whether to shade the face colors.
1596+
Whether to shade the facecolors. Defaults to True. Shading is
1597+
always disabled when `cmap` is specified.
1598+
1599+
lightsource : LightSource
1600+
The lightsource to use when `shade` is True.
15971601
15981602
**kwargs :
15991603
Other arguments are forwarded to `.Poly3DCollection`.
@@ -1882,17 +1886,24 @@ def plot_wireframe(self, X, Y, Z, *args, **kwargs):
18821886
def plot_trisurf(self, *args, color=None, norm=None, vmin=None, vmax=None,
18831887
lightsource=None, **kwargs):
18841888
"""
1885-
============= ================================================
1886-
Argument Description
1887-
============= ================================================
1888-
*X*, *Y*, *Z* Data values as 1D arrays
1889-
*color* Color of the surface patches
1890-
*cmap* A colormap for the surface patches.
1891-
*norm* An instance of Normalize to map values to colors
1892-
*vmin* Minimum value to map
1893-
*vmax* Maximum value to map
1894-
*shade* Whether to shade the facecolors
1895-
============= ================================================
1889+
1890+
Parameters
1891+
----------
1892+
X, Y, Z : array-like
1893+
Data values as 1D arrays
1894+
color
1895+
Color of the surface patches
1896+
cmap
1897+
A colormap for the surface patches.
1898+
norm : Normalize
1899+
An instance of Normalize to map values to colors.
1900+
vmin, vmax : scalar, optional, default: None
1901+
Minimum and maximum value to map.
1902+
shade : bool
1903+
Whether to shade the facecolors. Defaults to True. Shading is
1904+
always disabled when `cmap` is specified.
1905+
lightsource : LightSource
1906+
The lightsource to use when `shade` is True.
18961907
18971908
The (optional) triangulation can be specified in one of two ways;
18981909
either::
@@ -1920,7 +1931,8 @@ def plot_trisurf(self, *args, color=None, norm=None, vmin=None, vmax=None,
19201931
Other arguments are passed on to
19211932
:class:`~mpl_toolkits.mplot3d.art3d.Poly3DCollection`
19221933
1923-
**Examples:**
1934+
Examples
1935+
--------
19241936
19251937
.. plot:: gallery/mplot3d/trisurf3d.py
19261938
.. plot:: gallery/mplot3d/trisurf3d_2.py

0 commit comments

Comments
 (0)