8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5ec0e25 commit fdd589eCopy full SHA for fdd589e
lib/matplotlib/axes/_axes.py
@@ -5273,7 +5273,19 @@ def _pcolorargs(funcname, *args, **kw):
5273
raise TypeError('Dimensions of C %s are incompatible with'
5274
' X (%d) and/or Y (%d); see help(%s)' % (
5275
C.shape, Nx, Ny, funcname))
5276
- C = C[:Ny - 1, :Nx - 1]
+ X = np.hstack( (1.5 * X[:, [0]] - 0.5 * X[:, [1]],
5277
+ 0.5 * (X[:, 1:] + X[:, :-1]),
5278
+ 1.5 * X[:, [-1]] - 0.5 * X[:, [-2]]) )
5279
+ X = np.vstack( (1.5 * X[[0], :] - 0.5 * X[[1], :],
5280
+ 0.5 * (X[1:, :] + X[:-1, :]),
5281
+ 1.5 * X[[-1], :] - 0.5 * X[[-2], :]) )
5282
+ Y = np.vstack( (1.5 * Y[[0], :] - 0.5 * Y[[1], :],
5283
+ 0.5 * (Y[1:, :] + Y[:-1, :]),
5284
+ 1.5 * Y[[-1], :] - 0.5 * Y[[-2], :]) )
5285
+ Y = np.hstack( (1.5 * Y[:, [0]] - 0.5 * Y[:, [1]],
5286
+ 0.5 * (Y[:, 1:] + Y[:, :-1]),
5287
+ 1.5 * Y[:, [-1]] - 0.5 * Y[:, [-2]]) )
5288
+
5289
C = cbook.safe_masked_invalid(C)
5290
return X, Y, C
5291
0 commit comments