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 3ab4146

Browse filesBrowse files
committed
DOC: reword non-monotinc cell center warning
1 parent 0b21c7c commit 3ab4146
Copy full SHA for 3ab4146

File tree

Expand file treeCollapse file tree

2 files changed

+8
-8
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+8
-8
lines changed

‎lib/matplotlib/axes/_axes.py

Copy file name to clipboardExpand all lines: lib/matplotlib/axes/_axes.py
+7-7Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5578,13 +5578,13 @@ def _interp_grid(X):
55785578
dX = np.diff(X, axis=1)/2.
55795579
if not (np.all(dX >= 0) or np.all(dX <= 0)):
55805580
cbook._warn_external(
5581-
f"The input coordinates to {funcname} are "
5582-
"not all either increasing or decreasing, "
5583-
"the automatically computed edges can "
5584-
"produce misleading results in this case. "
5585-
"It is recommended to supply the "
5586-
f"quadrilateral edges to {funcname}"
5587-
f" yourself. See help({funcname}).")
5581+
f"Mesh cell edges are being inferred from "
5582+
f"mesh cell centers, but the input "
5583+
f"coordinates to {funcname} are not "
5584+
"monotonically increasing or decreasing. The "
5585+
"inferred cell edges can produce misleading "
5586+
"results. If so, supply explicit mesh cell "
5587+
f"edges to {funcname} yourself.")
55885588
X = np.hstack((X[:, [0]] - dX[:, [0]],
55895589
X[:, :-1] + dX,
55905590
X[:, [-1]] + dX[:, [-1]]))

‎lib/matplotlib/tests/test_axes.py

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/test_axes.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1180,7 +1180,7 @@ def test_pcolorargs():
11801180
y = [-10, 10]
11811181
X, Y = np.meshgrid(x, y)
11821182
Z = np.zeros(X.shape)
1183-
with pytest.warns(UserWarning, match="The input coordinates"):
1183+
with pytest.warns(UserWarning, match="Mesh cell edges are being inferred"):
11841184
ax.pcolormesh(X, Y, Z, shading='auto')
11851185

11861186

0 commit comments

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