0
我是ggplot的新手,虽然这看起来像一个简单的问题,但我很困惑。我收到错误消息ggplot时间系列,错误:不知道如何自动选择类型为xts/zoo的对象的比例。默认为连续
Don't know how to automatically pick scale for object of type xts/zoo. Defaulting to continuous.
而我在图上看不到一条线。下面是输出: 这里是我的代码:
> library(quantmod)
> library(TTR)
> library(ggplot2)
> getSymbols("SPY")
[1] "SPY"
> price<-SPY[,1]
> ggplot(price,aes(x=time(price),y=price),geom_line(color="blue"))
ggplot likes data.frames。你也需要'ggplot(...)+ geom_line(...)' –