You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
pcolormesh x-axis with datetime broken for nearest shading #18547
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File ".local/lib/python3.8/site-packages/matplotlib/pyplot.py", line 2801, in pcolormesh
__ret = gca().pcolormesh(
File ".local/lib/python3.8/site-packages/matplotlib/__init__.py", line 1438, in inner
return func(ax, *map(sanitize_sequence, args), **kwargs)
File ".local/lib/python3.8/site-packages/matplotlib/axes/_axes.py", line 6093, in pcolormesh
X, Y, C, shading = self._pcolorargs('pcolormesh', *args,
File ".local/lib/python3.8/site-packages/matplotlib/axes/_axes.py", line 5651, in _pcolorargs
X = _interp_grid(X)
File ".local/lib/python3.8/site-packages/matplotlib/axes/_axes.py", line 5633, in _interp_grid
if not (np.all(dX >= 0) or np.all(dX <= 0)):
TypeError: '>=' not supported between instances of 'datetime.timedelta' and 'int'
Expected outcome
None
Matplotlib version
Matplotlib version: 3.3.2
Python version: 3.8
works with pip3 install matplotlib==3.3.1, fails with pip3 install matplotlib==3.3.2
Activity
jklymak commentedon Sep 23, 2020
Thanks, though I don't think this never "worked", just an oversight that unit conversion needs to happen sooner. See fix in new PR...