-
-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Closed as not planned
Closed as not planned
Copy link
Labels
Description
Bug summary
list of datetime passed to ax.plot results in a mypy error. The same error has been seen in ax.errorbar.
Code for reproduction
import matplotlib.pyplot as plt
from datetime import datetime
ax = plt.axes()
ax.plot([datetime.now()], [20.6], label="buggy")
Actual outcome
Argument 1 to "plot" of "Axes" has incompatible type "list[datetime]"; expected "Union[float, Union[_SupportsArray[dtype[Any]], _NestedSequence[_SupportsArray[dtype[Any]]], bool, int, float, complex, str, bytes, _NestedSequence[Union[bool, int, float, complex, str, bytes]]], str]" [arg-type]
Expected outcome
no mypy errors
Additio 5CC2 nal information
No response
Operating system
Windows 11
Matplotlib Version
3.8.0
Matplotlib Backend
TkAgg
Python version
Python 3.9.13
Jupyter version
NA
Installation
pip
adamjstewart