fit1=ts(x.fit1$fitted.value,start = 1952)
fit2=ts(x.fit2$fitted.value,start = 1952)
plot(x,type="p",pch=8)
lines(fit1,col=2)
lines(fit2,col=4)
为什么这些代码在RStudio里运行不出 结果,而在R里可以运行出来,RStudio运行时错误提示如下:
> fit1=ts(x.fit1$fitted.value,start = 1952)
> fit2=ts(x.fit2$fitted.value,start = 1952)
> plot(x,type="o",pch=3)
Error in plot.new() : figure margins too large
> lines(fit1,col=2)
Error in plot.xy(xy.coords(x, y), type = type, ...) :
plot.new has not been called yet
> lines(fit2,col=4)
Error in plot.xy(xy.coords(x, y), type = type, ...) :
plot.new has not been called yet
谢谢。