继本主题之后, 如何使用 plot.xts 在蜡烛图中设置蜡烛的宽度?,我注意到如何plot.xts
创建如此奇妙的烛台图。但是,当我尝试该帖子中的代码时,我无法正确设置 x 轴。我试过了
start <- as.Date('2007-01-03');end<-as.Date('2007-12-31')
from.dat <- start;to.dat <- end
getSymbols("C", src="yahoo", from = from.dat, to = to.dat)
candlecolors <- ifelse(C[,'C.Close'] < C[,'C.Open'], 'RED', 'GREEN')
plot.xts(C, type='candles',width=70000, candle.col=candlecolors, bar.col='BLACK',cex.axis=1.5,main='Candlestick plot of Citigroup (2007)',cex.main=2)
x 轴不是我想要的。我需要类似于这篇文章中的彩色图的东西 如何使用 plot.xts 在蜡烛图中设置蜡烛的宽度?
抱歉,我没有足够的声誉来发布图片。任何帮助表示赞赏。
问候,
长