在我的ts.plot中,我无法获得2种颜色的红色和黑色 需要(图形)
ts.plot(窗口(CPI_ts, start = c(2012,1), 结束= c(2019,12)), 窗口(IIP_ts, 启动= C(…
直接为函数提供参数。这应该工作。
ts.plot(ts(rnorm(100), start = c(2001,1)), ts(rnorm(100), start = c(2001,1)), col = c("red", "blue"), xlab = "Year", ylab = "Index", lwd = 2) legend("topleft", bty="n", lty=c(1,1), col=c("red","blue"), legend=c(" IIP ", "CPI "))