Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commit558ccae

Browse files
jklymakQuLogic
authored andcommitted
DOC: reword non-monotonic cell center warning
1 parent0b21c7c commit558ccae

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

‎lib/matplotlib/axes/_axes.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5579,12 +5579,11 @@ def _interp_grid(X):
55795579
ifnot (np.all(dX>=0)ornp.all(dX<=0)):
55805580
cbook._warn_external(
55815581
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}).")
5582+
"interpreted as cell centers, but are not "
5583+
"monotonically increasing or decreasing. "
5584+
"This may lead to incorrectly calculated cell "
5585+
"edges, in which case, please supply "
5586+
f"explicit cell edges to{funcname}.")
55885587
X=np.hstack((X[:, [0]]-dX[:, [0]],
55895588
X[:, :-1]+dX,
55905589
X[:, [-1]]+dX[:, [-1]]))

‎lib/matplotlib/tests/test_axes.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1180,7 +1180,8 @@ def test_pcolorargs():
11801180
y= [-10,10]
11811181
X,Y=np.meshgrid(x,y)
11821182
Z=np.zeros(X.shape)
1183-
withpytest.warns(UserWarning,match="The input coordinates"):
1183+
withpytest.warns(UserWarning,
1184+
match='are not monotonically increasing or decreasing'):
11841185
ax.pcolormesh(X,Y,Z,shading='auto')
11851186

11861187

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp