
你必须首先将时间戳转换为
Python datetime对象(使用
datetime.strptime)。然后使用
date2num将日期转换为
matplotlib格式。
使用
plot_date以下方式绘制日期和值:
dates = matplotlib.dates.date2num(list_of_datetimes)matplotlib.pyplot.plot_date(dates, values)
欢迎分享,转载请注明来源:内存溢出

你必须首先将时间戳转换为
Python datetime对象(使用
datetime.strptime)。然后使用
date2num将日期转换为
matplotlib格式。
使用
plot_date以下方式绘制日期和值:
dates = matplotlib.dates.date2num(list_of_datetimes)matplotlib.pyplot.plot_date(dates, values)
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)