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 0673de9

Browse filesBrowse files
committed
Update docstring of QuadMesh
1 parent 52b2e93 commit 0673de9
Copy full SHA for 0673de9

File tree

Expand file treeCollapse file tree

2 files changed

+31
-3
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+31
-3
lines changed

‎doc/api/next_api_changes/deprecations/20237-TH.rst

Copy file name to clipboardExpand all lines: doc/api/next_api_changes/deprecations/20237-TH.rst
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ In particular:
1313

1414
- *coordinates* must now be a (M, N, 2) array-like. Previously, the grid
1515
shape was separately specified as (*meshHeight* + 1, *meshWidth* + 1) and
16-
*coordnates* could be an array-like of any shape with M * N * 2 elements.
16+
*coordinates* could be an array-like of any shape with M * N * 2 elements.
1717
- all parameters except *coordinates* are keyword-only now.

‎lib/matplotlib/collections.py

Copy file name to clipboardExpand all lines: lib/matplotlib/collections.py
+30-2Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1968,6 +1968,35 @@ class QuadMesh(Collection):
19681968
"""
19691969
Class for the efficient drawing of a quadrilateral mesh.
19701970
1971+
A quadrilateral mesh is a grid of M by N adjacent qudrilaterals that are
1972+
defined via a (M+1, N+1) grid of vertices. The quadrilateral (m, n) is
1973+
defind by the vertices ::
1974+
1975+
(m+1, n) ----------- (m+1, n+1)
1976+
/ /
1977+
/ /
1978+
/ /
1979+
(m, n) -------- (m, n+1)
1980+
1981+
The mesh need not be regular and the polygons need not be convex.
1982+
1983+
Parameters
1984+
----------
1985+
coordinates : (M+1, N+1, 2) array-like
1986+
The vertices. ``coordinates[m, n]`` specifies the (x, y) coordinates
1987+
of vertex (m, n).
1988+
1989+
antialiased : bool, default: True
1990+
1991+
shading : {'flat', 'gouraud'}, default: 'flat'
1992+
1993+
Notes
1994+
-----
1995+
There exists a deprecated API version ``QuadMesh(M, N, coords)``, where
1996+
the dimensions are given explicitly and ``coords`` is a (M*N, 2)
1997+
array-like. This has been deprecated in Matplotlib 3.5. The following
1998+
describes the semantics of this deprecated API.
1999+
19712000
A quadrilateral mesh consists of a grid of vertices.
19722001
The dimensions of this array are (*meshWidth* + 1, *meshHeight* + 1).
19732002
Each vertex in the mesh has a different set of "mesh coordinates"
@@ -1991,7 +2020,6 @@ class QuadMesh(Collection):
19912020
vertex at mesh coordinates (0, 0), then the one at (0, 1), then at (0, 2)
19922021
.. (0, meshWidth), (1, 0), (1, 1), and so on.
19932022
1994-
*shading* may be 'flat', or 'gouraud'
19952023
"""
19962024
def __init__(self, *args, **kwargs):
19972025
# signature deprecation since="3.5": Change to new signature after the
@@ -2020,7 +2048,7 @@ def __init__(self, *args, **kwargs):
20202048
_api.warn_deprecated(
20212049
"3.5",
20222050
message="This usage of Quadmesh is deprecated: Parameters "
2023-
"meshWidth and meshHights will be removed; "
2051+
"meshWidth and meshHeights will be removed; "
20242052
"coordinates must be 2D; all parameters except "
20252053
"coordinates will be keyword-only.")
20262054
coords = np.asarray(coords, np.float64).reshape((h + 1, w + 1, 2))

0 commit comments

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