篇首语:本文由小编为大家整理,主要介绍了Plotly绘制时间序列图实战:简单时序图时间范围限制的时序图相关的知识,希望对你有一定的参考价值。
Plotly绘制时间序列图实战:简单时序图、时间范围限制的时序图
# 简单时间序列图;
import plotly as pyimport plotly.graph_objs as gofrom datetime import datetime# ----------pre defpyplt = py.offline.plot# ----------codex_datetime = [datetime(year=2013, month=10, day=4), datetime(year=2013, month=11, day=5), datetime(year=2013, month=12, day=6)]x_string = ["2013-10-04", "2013-11-05", "2013-12-06"]trace_datetime = go.Scatter(x=x_datetime, y=[1, 3, 6],name="trace_datetime")trace_string = go.Scatter(x=x_string, y=[2, 4, 7],name="trace_string")data = [trace_datetime, trace_string]pyplt(data, filename="time_series.html")
以上是关于Plotly绘制时间序列图实战:简单时序图时间范围限制的时序图的主要内容,如果未能解决你的问题,请参考以下文章