How can I create a new on-screen R plot window with a particular width and height (in pixels, etc.)?
See Question&Answers more detail:osHow can I create a new on-screen R plot window with a particular width and height (in pixels, etc.)?
See Question&Answers more detail:osUse dev.new()
. (See this related question.)
plot(1:10)
dev.new(width=5, height=4)
plot(1:20)
To be more specific which units are used:
dev.new(width=5, height=4, unit="in")
plot(1:20)
dev.new(width = 550, height = 330, unit = "px")
plot(1:15)
edit additional argument for Rstudio (May 2020), (thanks user Soren Havelund Welling)
For Rstudio, add dev.new(width=5,height=4,noRStudioGD = TRUE)