8000 Merge pull request #28054 from timhoffm/pos-only · matplotlib/matplotlib@2360c59 · GitHub
[go: up one dir, main page]

Skip to content

Commit 2360c59

Browse files
authored
Merge pull request #28054 from timhoffm/pos-only
DOC: Clarify that parameters to gridded data plotting functions are p…
2 parents 7fbdbf3 + 9fe39a7 commit 2360c59

File tree

2 files changed

+21
-9
lines changed

2 files changed

+21
-9
lines changed

lib/matplotlib/axes/_axes.py

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6038,10 +6038,12 @@ def pcolor(self, *args, shading=None, alpha=None, norm=None, cmap=None,
60386038
60396039
Call signature::
60406040
6041-
pcolor([X, Y,] C, **kwargs)
6041+
pcolor([X, Y,] C, /, **kwargs)
60426042
60436043
*X* and *Y* can be used to specify the corners of the quadrilaterals.
60446044
6045+
The arguments *X*, *Y*, *C* are positional-only.
6046+
60456047
.. hint::
60466048
60476049
``pcolor()`` can be very slow for large arrays. In most
@@ -6253,10 +6255,12 @@ def pcolormesh(self, *args, alpha=None, norm=None, cmap=None, vmin=None,
62536255
62546256
Call signature::
62556257
6256-
pcolormesh([X, Y,] C, **kwargs)
6258+
pcolormesh([X, Y,] C, /, **kwargs)
62576259
62586260
*X* and *Y* can be used to specify the corners of the quadrilaterals.
62596261
6262+
The arguments *X*, *Y*, *C* are positional-only.
6263+
62606264
.. hint::
62616265
62626266
`~.Axes.pcolormesh` is similar to `~.Axes.pcolor`. It is much faster
@@ -6480,6 +6484,8 @@ def pcolorfast(self, *args, alpha=None, norm=None, cmap=None, vmin=None,
64806484
64816485
ax.pcolorfast([X, Y], C, /, **kwargs)
64826486
6487+
The arguments *X*, *Y*, *C* are positional-only.
6488+
64836489
This method is similar to `~.Axes.pcolor` and `~.Axes.pcolormesh`.
64846490
It's designed to provide the fastest pcolor-type plotting with the
64856491
Agg backend. To achieve this, it uses different algorithms internally
@@ -6662,7 +6668,9 @@ def contour(self, *args, **kwargs):
66626668
66636669
Call signature::
66646670
6665-
contour([X, Y,] Z, [levels], **kwargs)
6671+
contour([X, Y,] Z, /, [levels], **kwargs)
6672+
6673+
The arguments *X*, *Y*, *Z* are positional-only.
66666674
%(contour_doc)s
66676675
"""
66686676
kwargs['filled'] = False
@@ -6678,7 +6686,9 @@ def contourf(self, *args, **kwargs):
66786686
66796687
Call signature::
66806688
6681-
contourf([X, Y,] Z, [levels], **kwargs)
6689+
contourf([X, Y,] Z, /, [levels], **kwargs)
6690+
6691+
The arguments *X*, *Y*, *Z* are positional-only.
66826692
%(contour_doc)s
66836693
"""
66846694
kwargs['filled'] = True

lib/matplotlib/quiver.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,11 @@
3232
3333
Call signature::
3434
35-
quiver([X, Y], U, V, [C], **kwargs)
35+
quiver([X, Y], U, V, [C], /, **kwargs)
3636
3737
*X*, *Y* define the arrow locations, *U*, *V* define the arrow directions, and
38-
*C* optionally sets the color.
38+
*C* optionally sets the color. The arguments *X*, *Y*, *U*, *V*, *C* are
39+
positional-only.
3940
4041
**Arrow length**
4142
@@ -731,13 +732,14 @@ def _h_arrows(self, length):
731732
732733
Call signature::
733734
734-
barbs([X, Y], U, V, [C], **kwargs)
735+
barbs([X, Y], U, V, [C], /, **kwargs)
735736
736737
Where *X*, *Y* define the barb locations, *U*, *V* define the barb
737738
directions, and *C* optionally sets the color.
738739
739-
All arguments may be 1D or 2D. *U*, *V*, *C* may be masked arrays, but masked
740-
*X*, *Y* are not supported at present.
740+
The arguments *X*, *Y*, *U*, *V*, *C* are positional-only and may be
741+
1D or 2D. *U*, *V*, *C* may be masked arrays, but masked *X*, *Y*
742+
are not supported at present.
741743
742744
Barbs are traditionally used in meteorology as a way to plot the speed
743745
and direction of wind observations, but can technically be used to

0 commit comments

Comments
 (0)
0