How to change current Plot Window Size (in R) How to change current Plot Window Size (in R) r r

How to change current Plot Window Size (in R)


Some workaround could be rather than using dev.new() R function use this function which should work across platform :

 dev.new <- function(width = 7, height = 7)  { platform <- sessionInfo()$platform if (grepl("linux",platform))  { x11(width=width, height=height) }  else if (grepl("pc",platform))  { windows(width=width, height=height) }  else if (grepl("apple", platform))  { quartz(width=width, height=height) } }


Here is a my solution to this:

resize.win <- function(Width=6, Height=6){        # works for windows    dev.off(); # dev.new(width=6, height=6)    windows(record=TRUE, width=Width, height=Height)}resize.win(5,5)plot(rnorm(100))resize.win(10,10)plot(rnorm(100))