L.J
L.J

Reputation: 1084

Is it possible to plot in new window by default in R?

I tried to run some R scripts within a terminal and just found that I have to run 'dev.new()' first every time I want to make new plots.

Is it possible, with some environment settings, R in a Terminal could plot in new frame by default (like what Rstudio does)?

Thanks!

Sorry, I made a mistake when asked the question. it should be a new plot in a new window (not a plot with a new frame). Sorry for the confusions.

Upvotes: 5

Views: 4109

Answers (1)

Ben
Ben

Reputation: 421

I think this should do what you want.

plot<-function(...){
  grDevices::dev.new()
  graphics::plot(...)
}

Upvotes: 7

Related Questions