Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 77dfcc8

Browse files
committed
TST/FIX
1 parent a688ba3 commit 77dfcc8

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

lib/matplotlib/axes/_axes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5675,7 +5675,7 @@ def _pcolorargs(self, funcname, *args, shading='auto', **kwargs):
56755675
shading = 'flat'
56765676

56775677
if shading == 'flat':
5678-
if (Nx, Ny) != (ncols + 1, nrows + 1):
5678+
if (Nx, Ny) != (ncols + 1, nrows + 1):
56795679
raise TypeError('Dimensions of C %s are incompatible with'
56805680
' X (%d) and/or Y (%d); see help(%s)' % (
56815681
C.shape, Nx, Ny, funcname))

lib/matplotlib/mpl-data/matplotlibrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@
130130

131131
#markers.fillstyle: full # {full, left, right, bottom, top, none}
132132

133-
#pcolor.shading: flat
133+
#pcolor.shading: auto
134134
#pcolormesh.snap: True # Whether to snap the mesh to pixel boundaries. This is
135135
# provided solely to allow old test images to remain
136136
# unchanged. Set to False to obtain the previous behavior.

lib/matplotlib/tests/test_axes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1260,15 +1260,15 @@ def test_pcolorauto(fig_test, fig_ref):
12601260
y = np.arange(0, 4)
12611261
np.random.seed(19680801)
12621262
Z = np.random.randn(3, 9)
1263-
# this is the same as flat:
1263+
# this is the same as flat; note that auto is default
12641264
ax.pcolormesh(x, y, Z)
12651265

12661266
ax = fig_ref.subplots()
12671267
# specify the centers
12681268
x2 = x[:-1] + np.diff(x) / 2
12691269
y2 = y[:-1] + np.diff(y) / 2
12701270
# this is same as nearest:
1271-
ax.pcolormesh(x2, y2, Z, shading='auto')
1271+
ax.pcolormesh(x2, y2, Z)
12721272

12731273

12741274
@image_comparison(['canonical'])

0 commit comments

Comments
 (0)