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(...)' –