Cpt1207
莲味榴
2021-01-16 22:04

r语言小白,不懂就问

  • r语言

ggplot(JZKJ$"300566.SZ.Close",aes(x=index(JZKJ$"300566.SZ.Close")))+
  ggtitle("Moving average-JZKJ")+
  xlab("Date")+ylab("Price")+
  geom_line(aes(y=JZKJ5,color="JZKJ5"))+
  geom_line(aes(y=JZKJ10,color="JZKJ10"))+
  geom_line(aes(y=JZKJ30,color="JZKJ30"))+
  geom_line(aes(y=JZKJ60,color="JZKJ60"))+
  geom_point(data = JZKJ$"300566.SZ.Close"[buypoint, ],aes(x=index(JZKJ$"300566.SZ.Close"[buypoint, ]),y="300566.SZ.Close",color="buy"))+geom_text(data = JZKJ$"300566.SZ.Close"[buypoint, ],aes(x=index(JZKJ$"300566.SZ.Close"[buypoint, ]),y="300566.SZ.Close",label=rep("buy",length(JZKJ$"300566.SZ.Close"[buypoint, ]))))+
  geom_point(data = JZKJ$"300566.SZ.Close"[sellpoint, ],aes(x=index(JZKJ$"300566.SZ.Close"[sellpoint, ]),y="300566.SZ.Close",color="sell"))+geom_text(data = JZKJ$"300566.SZ.Close"[sellpoint, ],aes(x=index(JZKJ$"300566.SZ.Close"[sellpoint, ]),y="300566.SZ.Close",label=rep("sell",length(JZKJ$"300566.SZ.Close"[sellpoint, ]))))

提示我Don't know how to automatically pick scale for object of type xts/zoo. Defaulting to continuous.

这要怎么弄啊?

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

0条回答