我想知道为什么大多数par()
例如font.lab ; font.axis ; cex.lab
甚至xlim()
都不能与R中的plot.ts()
一起使用?
有关如何plot.ts()
接受font.lab ; font.axis ; cex.lab ; xlim
效果的任何建议吗?
coin_outcome <- sample(x = c(0, 1), size = 20, prob = c(1 - .6, .6), replace = TRUE)
plot.ts(cumsum(coin_outcome) / 1:20, ylim = c(0, 1), font.lab = 2, font.axis = 2,
cex.lab = 2, xlim = c(1, 20))
答案 0 :(得分:2)
我在这种情况下使用par,它对我有用。
coin_outcome <- sample(x = c(0, 1), size = 20, prob = c(1 - .6, .6),
replace = TRUE)
par(font.lab=3,font.axis = 2,cex.lab = 2)
plot.ts(cumsum(coin_outcome) / 1:20, ylim = c(0, 1),
xlim = c(1, 20))