How to get two windows with different plots

sbg picture sbg · Aug 2, 2011 · Viewed 46.8k times · Source

When we have a window with plots, is there a way to tell R to display a new plot in a new window?

Answer

IRTFM picture IRTFM · Aug 2, 2011
plot(1:1)
dev.new()
plot(2,2)
dev.set(dev.prev()) # go back to first
title(main="test dev 1")

dev.set(dev.next()) # go to second
title(main="test dev 2")