Plotly时间序列 - 水平线绘制
问题描述:
我想这是一个非常简单的问题,但我试图在Plotly(R)中绘制一个时间序列,并且每次我尝试绘图时 - 线会自动假设y轴(即水平面)。Plotly时间序列 - 水平线绘制
从我所了解的情况来看,这是一个与我的变量如何输入代码有关的问题。但不完全知道如何解决这个问题?
假设这是我的变量做的,我已经印刷低于我的数据集的结构:
Classes ‘tbl_df’, ‘tbl’ and 'data.frame': 53 obs. of 2 variables:
$ Date.received: Date, format: "2017-06-29" "2017-06-22" "2017-05-16" "2017-06-23" ...
$ n : num 20 17 14 13 12 12 12 11 11 11 ...
我Plotly代码如下:
plot_ly(Time, x = Date.received, y = n, mode = "line")
的结果是:
非常感谢提前,道歉的菜鸟问题!
同样,我能说什么 - 非常感谢你弗洛里安! – Pryore