Skip to content

Commit

Permalink
Backport PR matplotlib#29065: DOC: Update docstring of triplot()
Browse files Browse the repository at this point in the history
  • Loading branch information
timhoffm authored and meeseeksmachine committed Nov 5, 2024
1 parent 10e09bf commit ec95510
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions lib/matplotlib/tri/_tripcolor.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import numpy as np

from matplotlib import _api
from matplotlib import _api, _docstring
from matplotlib.collections import PolyCollection, TriMesh
from matplotlib.tri._triangulation import Triangulation


@_docstring.interpd
def tripcolor(ax, *args, alpha=1.0, norm=None, cmap=None, vmin=None,
vmax=None, shading='flat', facecolors=None, **kwargs):
"""
Expand Down Expand Up @@ -54,8 +55,25 @@ def tripcolor(ax, *args, alpha=1.0, norm=None, cmap=None, vmin=None,
values used for each triangle are from the mean c of the triangle's
three points. If *shading* is 'gouraud' then color values must be
defined at points.
other_parameters
All other parameters are the same as for `~.Axes.pcolor`.
%(cmap_doc)s
%(norm_doc)s
%(vmin_vmax_doc)s
%(colorizer_doc)s
Returns
-------
`~matplotlib.collections.PolyCollection` or `~matplotlib.collections.TriMesh`
The result depends on *shading*: For ``shading='flat'`` the result is a
`.PolyCollection`, for ``shading='gouraud'`` the result is a `.TriMesh`.
Other Parameters
----------------
**kwargs : `~matplotlib.collections.Collection` properties
%(Collection:kwdoc)s
"""
_api.check_in_list(['flat', 'gouraud'], shading=shading)

Expand Down

0 comments on commit ec95510

Please sign in to comment.