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 ad06d93

Browse filesBrowse files
committed
changes for fixing the failing test
1 parent 04f0dc1 commit ad06d93
Copy full SHA for ad06d93

File tree

Expand file treeCollapse file tree

2 files changed

+5
-4
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+5
-4
lines changed

‎lib/matplotlib/axes/_axes.py

Copy file name to clipboardExpand all lines: lib/matplotlib/axes/_axes.py
+4-3Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5748,9 +5748,10 @@ def _pcolorargs(self, funcname, *args, shading='auto', **kwargs):
57485748

57495749
if shading == 'flat':
57505750
if (Nx, Ny) != (ncols + 1, nrows + 1):
5751-
raise TypeError(f"Dimensions of X({Nx}) and y({Ny}) should"
5752-
f" be one larger than C {C.shape} while using"
5753-
f" shading='flat' see help({funcname})")
5751+
raise TypeError(f"Dimensions of C {C.shape} should"
5752+
f" be one smaller than X({Nx}) and Y({Ny})"
5753+
f" while using shading='flat'"
5754+
f" see help({funcname})")
57545755
else: # ['nearest', 'gouraud']:
57555756
if (Nx, Ny) != (ncols, nrows):
57565757
raise TypeError('Dimensions of C %s are incompatible with'

‎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
@@ -1443,7 +1443,7 @@ def test_samesizepcolorflaterror():
14431443
fig, ax = plt.subplots()
14441444
x, y = np.meshgrid(np.arange(5), np.arange(3))
14451445
Z = x + y
1446-
with pytest.raises(TypeError, match=r".*one larger than C"):
1446+
with pytest.raises(TypeError, match=r".*one smaller than X"):
14471447
ax.pcolormesh(x, y, Z, shading='flat')
14481448

14491449

0 commit comments

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