I want to create a new window for each additional plot in R. I tried
par(new=T) plot(rnorm(20), new=TRUE)
Neither gives me a new window. Do I really need to create a new device?Answer1:
plot.new() function is used to start a new plot on the current device and will open a default device if there is not a device currently open. If you want a new device (so that you have the old plot in one window and the new plot in another window) then use
dev.new() or other device functions.
par(new = T) is used for plotting over an existing plot. You will need to create a new device for each plot, closed with
dev.off(). If you want multiple plots in the same window, try using
par(mfrow=c(2,2) for 2 rows of 2 plots.