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

Skip to content

Commit b30cd83

Browse files
committed
FIX: re-order unit conversion and mask array coercion
closes #19871
1 parent 564d4fd commit b30cd83

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/matplotlib/axes/_axes.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5621,9 +5621,10 @@ def _pcolorargs(self, funcname, *args, shading='flat', **kwargs):
56215621
if len(args) == 3:
56225622
# Check x and y for bad data...
56235623
C = np.asanyarray(args[2])
5624-
X, Y = [cbook.safe_masked_invalid(a) for a in args[:2]]
56255624
# unit conversion allows e.g. datetime objects as axis values
5625+
X, Y = args[:2]
56265626
X, Y = self._process_unit_info([("x", X), ("y", Y)], kwargs)
5627+
X, Y = [cbook.safe_masked_invalid(a) for a in [X, Y]]
56275628

56285629
if funcname == 'pcolormesh':
56295630
if np.ma.is_masked(X) or np.ma.is_masked(Y):

0 commit comments

Comments
 (0)