Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Open
Labels
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:
importmatplotlib.pyplotaspltfromdatetimeimportdatetime,timedeltatimes= []data= []foriinrange(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)