Open
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)