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

Skip to content

Commit 7d69aca

Browse files
committed
FIX: re-order unit conversion and mask array coercion
closes #19871
1 parent 183018c commit 7d69aca

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
@@ -5635,9 +5635,10 @@ def _pcolorargs(self, funcname, *args, shading='flat', **kwargs):
56355635
if len(args) == 3:
56365636
# Check x and y for bad data...
56375637
C = np.asanyarray(args[2])
5638-
X, Y = [cbook.safe_masked_invalid(a) for a in args[:2]]
56395638
# unit conversion allows e.g. datetime objects as axis values
5639+
X, Y = args[:2]
56405640
X, Y = self._process_unit_info([("x", X), ("y", Y)], kwargs)
5641+
X, Y = [cbook.safe_masked_invalid(a) for a in [X, Y]]
56415642

56425643
if funcname == 'pcolormesh':
56435644
if np.ma.is_masked(X) or np.ma.is_masked(Y):

0 commit comments

Comments
 (0)