-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Open
Labels
Difficulty: Mediumhttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issueshttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issuesDocumentationNew featurekeepItems to be ignored by the “Stale” Github ActionItems to be ignored by the “Stale” Github Actiontopic: date handlingtopic: units and array ducktypes
Milestone
Description
When using ginput() on a plot made using plot_date(), the return type of the x value is float, but it should be datetime.
Minimal example:
import matplotlib.pyplot as plt
from datetime import datetime, timedelta
times = []
data = []
for i in range(0, 10):
times.append(datetime(2016, 1, 1, 0, 0, 0) + timedelta(seconds=i))
data.append(i)
plt.plot_date(times, data)
x = plt.ginput()
print(x[0][0])
print(type(x[0][0]))
The last statement prints "<class 'numpy.float64'>"
- Present on 2.0.0b4+2828.g86b32ca (installed from source using pip on Linux)
Metadata
Metadata
Assignees
Labels
Difficulty: Mediumhttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issueshttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issuesDocumentationNew featurekeepItems to be ignored by the “Stale” Github ActionItems to be ignored by the “Stale” Github Actiontopic: date handlingtopic: units and array ducktypes