在plot.xts中编辑xaxis

时间:2017-08-09 05:08:42

标签: r plot xts

在较早的xts包中(直到我认为0.9-7),可以使用xaxt = "n"来抑制x轴。然而,在新版本的软件包中,这不再适用了。

示例代码:

# remove new version of xts
remove.packages(xts)

# install predownloaded 0.9-7 version of xts from 
# https://cran.r-project.org/src/contrib/Archive/xts/
install.packages("C:/xts_0.9-7.tar.gz", repos = NULL)
library(xts)

# load sample data
data(sample_matrix)
sample.xts <- as.xts(sample_matrix)

# plot sample data
plot(sample.xts[,1], xaxt = "n")

xts plot using xtx 0.9-7

# remove that version of xts and install new version
remove.packages(xts)
install.packages("xts")

# load package and sample data
library(xts)
data(sample_matrix)
sample.xts <- as.xts(sample_matrix)

# plot sample data
plot(sample.xts)

xts plot using xts 0.10

有没有办法删除情节的x轴?

0 个答案:

没有答案