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

Skip to content

Backport PR #20135 on branch v3.4.x (Add tricontour/tricontourf arguments(corner_mask, vmin vmax, antialiased, nchunk, hatches) documentation) #20139

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 32 additions & 3 deletions lib/matplotlib/tri/tricontour.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,13 @@ def _contour_args(self, args, kwargs):

Other Parameters
----------------
corner_mask : bool, default: :rc:`contour.corner_mask`
Enable/disable corner masking, which only has an effect if *Z* is
a masked array. If ``False``, any quad touching a masked point is
masked out. If ``True``, only the triangular corners of quads
nearest those points are always masked out, other triangular
corners comprising three unmasked points are contoured as usual.

colors : color string or sequence of colors, optional
The colors of the levels, i.e., the contour %(type)s.

Expand Down Expand Up @@ -207,6 +214,11 @@ def _contour_args(self, args, kwargs):
the canonical colormap range [0, 1] for mapping to colors. If not given,
the default linear scaling is used.

vmin, vmax : float, optional
If not *None*, either or both of these values will be supplied to
the `.Normalize` instance, overriding the default color scaling
based on *levels*.

origin : {*None*, 'upper', 'lower', 'image'}, default: None
Determines the orientation and exact position of *Z* by specifying the
position of ``Z[0, 0]``. This is only relevant, if *X*, *Y* are not given.
Expand Down Expand Up @@ -255,7 +267,21 @@ def _contour_args(self, args, kwargs):

xunits, yunits : registered units, optional
Override axis units by specifying an instance of a
:class:`matplotlib.units.ConversionInterface`.""")
:class:`matplotlib.units.ConversionInterface`.

antialiased : bool, optional
Enable antialiasing, overriding the defaults. For
filled contours, the default is *True*. For line contours,
it is taken from :rc:`lines.antialiased`.

nchunk : int >= 0, optional
If 0, no subdivision of the domain. Specify a positive integer to
divide the domain into subdomains of *nchunk* by *nchunk* quads.
Chunking reduces the maximum length of polygons generated by the
contouring algorithm which reduces the rendering workload passed
on to the backend and also requires slightly less RAM. It can
however introduce rendering artifacts at chunk boundaries depending
on the backend, the *antialiased* flag and value of *alpha*.""")


@docstring.Substitution(func='tricontour', type='lines')
Expand Down Expand Up @@ -293,8 +319,11 @@ def tricontourf(ax, *args, **kwargs):
"""
%(_tricontour_doc)s

antialiased : bool, default: True
Whether to use antialiasing.
hatches : list[str], optional
A list of cross hatch patterns to use on the filled areas.
If None, no hatching will be added to the contour.
Hatching is supported in the PostScript, PDF, SVG and Agg
backends only.

Notes
-----
Expand Down