Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 867db51

Browse filesBrowse files
committed
docstring: direct pcolor users to pcolormesh; fix pcolorfast docstring
1 parent b1dc9c5 commit 867db51
Copy full SHA for 867db51

File tree

Expand file treeCollapse file tree

1 file changed

+21
-10
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+21
-10
lines changed

‎lib/matplotlib/axes.py

Copy file name to clipboardExpand all lines: lib/matplotlib/axes.py
+21-10Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7142,6 +7142,10 @@ def pcolor(self, *args, **kwargs):
71427142
"""
71437143
Create a pseudocolor plot of a 2-D array.
71447144
7145+
Note: pcolor can be very slow for large arrays; consider
7146+
using the similar but much faster
7147+
:func:`~matplotlib.pyplot.pcolormesh` instead.
7148+
71457149
Call signatures::
71467150
71477151
pcolor(C, **kwargs)
@@ -7272,6 +7276,11 @@ def pcolor(self, *args, **kwargs):
72727276
Stroking the edges may be preferred if *alpha* is 1, but
72737277
will cause artifacts otherwise.
72747278
7279+
.. seealso::
7280+
7281+
:func:`~matplotlib.pyplot.pcolormesh`
7282+
For an explanation of the differences between
7283+
pcolor and pcolormesh.
72757284
"""
72767285

72777286
if not self._hold: self.cla()
@@ -7498,23 +7507,25 @@ def pcolorfast(self, *args, **kwargs):
74987507
"""
74997508
pseudocolor plot of a 2-D array
75007509
7501-
Experimental; this is a version of pcolor that
7502-
does not draw lines, that provides the fastest
7503-
possible rendering with the Agg backend, and that
7504-
can handle any quadrilateral grid.
7510+
Experimental; this is a pcolor-type method that
7511+
provides the fastest possible rendering with the Agg
7512+
backend, and that can handle any quadrilateral grid.
7513+
It supports only flat shading (no outlines), it lacks
7514+
support for log scaling of the axes, and it does not
7515+
have a pyplot wrapper.
75057516
75067517
Call signatures::
75077518
7508-
pcolor(C, **kwargs)
7509-
pcolor(xr, yr, C, **kwargs)
7510-
pcolor(x, y, C, **kwargs)
7511-
pcolor(X, Y, C, **kwargs)
7519+
ax.pcolorfast(C, **kwargs)
7520+
ax.pcolorfast(xr, yr, C, **kwargs)
7521+
ax.pcolorfast(x, y, C, **kwargs)
7522+
ax.pcolorfast(X, Y, C, **kwargs)
75127523
75137524
C is the 2D array of color values corresponding to quadrilateral
75147525
cells. Let (nr, nc) be its shape. C may be a masked array.
75157526
7516-
``pcolor(C, **kwargs)`` is equivalent to
7517-
``pcolor([0,nc], [0,nr], C, **kwargs)``
7527+
``ax.pcolorfast(C, **kwargs)`` is equivalent to
7528+
``ax.pcolorfast([0,nc], [0,nr], C, **kwargs)``
75187529
75197530
*xr*, *yr* specify the ranges of *x* and *y* corresponding to the
75207531
rectangular region bounding *C*. If::

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.