Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot create new plotting window (device?) with par(new=T)

Tags:

plot

r

I want to create a new window for each additional plot in R. I tried

plot(rnorm(20), new=TRUE)

and also

par(new=T)
plot(rnorm(20), new=TRUE)

Neither gives me a new window. Do I really need to create a new device?

like image 246
Alan Berezin Avatar asked Dec 10 '22 02:12

Alan Berezin


1 Answers

The 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.

like image 161
Greg Snow Avatar answered Dec 11 '22 14:12

Greg Snow