We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
As found in #27450, the X/Y arguments to pcolorfast do not support units.
X
Y
pcolorfast
import datetime import numpy as np import matplotlib.pyplot as plt np.random.seed(19680801) basedate_x = datetime.datetime(2023, 12, 6, 1, 30, 30) basedate_y = datetime.datetime(2024, 5, 5, 12, 15, 45) dates_x = [basedate_x + datetime.timedelta(days=1*i, hours=6*i, minutes=20*i) for i in range(10)] dates_y = [basedate_y + datetime.timedelta(days=1*i, hours=8*i, minutes=30*i) for i in range(10)] data = np.random.rand(0, 100) fig, ax = plt.subplots() pc = ax.pcolorfast(dates_x, dates_y, data)
Traceback (most recent call last): File "/home/elliott/code/matplotlib/pcolorfast.py", line 19, in <module> pc = ax.pcolorfast(dates_x, dates_y, data) File "/home/elliott/code/matplotlib/lib/matplotlib/__init__.py", line 1472, in inner return func( File "/home/elliott/code/matplotlib/lib/matplotlib/axes/_axes.py", line 6527, in pcolorfast self.update_datalim(np.array([[xl, yb], [xr, yt]])) File "/home/elliott/code/matplotlib/lib/matplotlib/axes/_base.py", line 2503, in update_datalim if not np.any(np.isfinite(xys)): TypeError: ufunc 'isfinite' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''
A plot similar to pcolormesh, with dates on the x/y axis.
pcolormesh
No response
589d3fb
git checkout
The text was updated successfully, but these errors were encountered:
Axes.pcolorfast()
datetime
No branches or pull requests
Bug summary
As found in #27450, the
X
/Y
arguments topcolorfast
do not support units.Code for reproduction
Actual outcome
Expected outcome
A plot similar to
pcolormesh
, with dates on the x/y axis.Additional information
No response
Operating system
No response
Matplotlib Version
589d3fb
Matplotlib Backend
No response
Python version
No response
Jupyter version
No response
Installation
git checkout
The text was updated successfully, but these errors were encountered: