plot for acf and pacf

This code I have tried to show a clean plot but failed. Could you give me your kind comments and revision for this code?

Thank you!

TG

 set.seed(123456)
 y <- arima.sim(n = 100, list(ar = 0.9), innov=rnorm(100))
 op <- par(no.readonly=TRUE)
 layout(matrix(c(1, 1, 2, 3), 2, 2, byrow=TRUE))
 plot.ts(y, ylab='')
Error in plot.new() : figure margins too large
acf(y, main='Autocorrelations', ylab='', ylim=c(-1, 1), ci.col = "black")
Error in plot.new() : figure margins too large
pacf(y, main='Partial Autocorrelations', ylab='', ylim=c(-1, 1), ci.col = "black")
Error in plot.new() : figure margins too large
 par(op)

Hi @truegrit. The problem was due to the area of the Plots panel on the bottom right corner is too small. The plot function check the area for plotting is not enough. You can drag the boundary to enlarge it.

1 Like

Thank you for your nice reply. I tried to enlarge the space of studio for plots but ...
I will do it again.

Best,

TG

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.