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

Skip to content

DOC: Clarify that parameters to gridded data plotting functions are p… #28054

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
merged 1 commit into from
Apr 10, 2024
Merged
Show file tree
Hide file tree
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
18 changes: 14 additions & 4 deletions lib/matplotlib/axes/_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -6038,10 +6038,12 @@ def pcolor(self, *args, shading=None, alpha=None, norm=None, cmap=None,

Call signature::

pcolor([X, Y,] C, **kwargs)
pcolor([X, Y,] C, /, **kwargs)

*X* and *Y* can be used to specify the corners of the quadrilaterals.

The arguments *X*, *Y*, *C* are positional-only.

.. hint::

``pcolor()`` can be very slow for large arrays. In most
Expand Down Expand Up @@ -6253,10 +6255,12 @@ def pcolormesh(self, *args, alpha=None, norm=None, cmap=None, vmin=None,

Call signature::

pcolormesh([X, Y,] C, **kwargs)
pcolormesh([X, Y,] C, /, **kwargs)

*X* and *Y* can be used to specify the corners of the quadrilaterals.

The arguments *X*, *Y*, *C* are positional-only.

.. hint::

`~.Axes.pcolormesh` is similar to `~.Axes.pcolor`. It is much faster
Expand Down Expand Up @@ -6480,6 +6484,8 @@ def pcolorfast(self, *args, alpha=None, norm=None, cmap=None, vmin=None,

ax.pcolorfast([X, Y], C, /, **kwargs)

The arguments *X*, *Y*, *C* are positional-only.

This method is similar to `~.Axes.pcolor` and `~.Axes.pcolormesh`.
It's designed to provide the fastest pcolor-type plotting with the
Agg backend. To achieve this, it uses different algorithms internally
Expand Down Expand Up @@ -6662,7 +6668,9 @@ def contour(self, *args, **kwargs):

Call signature::

contour([X, Y,] Z, [levels], **kwargs)
contour([X, Y,] Z, /, [levels], **kwargs)

The arguments *X*, *Y*, *Z* are positional-only.
%(contour_doc)s
"""
kwargs['filled'] = False
Expand All @@ -6678,7 +6686,9 @@ def contourf(self, *args, **kwargs):

Call signature::

contourf([X, Y,] Z, [levels], **kwargs)
contourf([X, Y,] Z, /, [levels], **kwargs)

The arguments *X*, *Y*, *Z* are positional-only.
%(contour_doc)s
"""
kwargs['filled'] = True
Expand Down
12 changes: 7 additions & 5 deletions lib/matplotlib/quiver.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,11 @@

Call signature::

quiver([X, Y], U, V, [C], **kwargs)
quiver([X, Y], U, V, [C], /, **kwargs)

*X*, *Y* define the arrow locations, *U*, *V* define the arrow directions, and
*C* optionally sets the color.
*C* optionally sets the color. The arguments *X*, *Y*, *U*, *V*, *C* are
positional-only.

**Arrow length**

Expand Down Expand Up @@ -731,13 +732,14 @@ def _h_arrows(self, length):

Call signature::

barbs([X, Y], U, V, [C], **kwargs)
barbs([X, Y], U, V, [C], /, **kwargs)

Where *X*, *Y* define the barb locations, *U*, *V* define the barb
directions, and *C* optionally sets the color.

All arguments may be 1D or 2D. *U*, *V*, *C* may be masked arrays, but masked
*X*, *Y* are not supported at present.
The arguments *X*, *Y*, *U*, *V*, *C* are positional-only and may be
1D or 2D. *U*, *V*, *C* may be masked arrays, but masked *X*, *Y*
are not supported at present.

Barbs are traditionally used in meteorology as a way to plot the speed
and direction of wind observations, but can technically be used to
Expand Down