1

I am trying to generate a graph in ggplot2, but instead of showing up in the plots window it opens a new window named "R Graphics: Device 2 (ACTIVE)". This prevents me from resizing the graph and saving it in my desired size. I have tried calling dev.off() and dev.cur(), but they return null device 1, which seems correct. Does anyone know how to return it to the plots window? I am using R 3.4, RStudio 1.0.136, and Windows 10.

  • Use ggsave for exporting plots to a file. You don't provide sufficient information to diagnose why a new graphics window is opened. – Roland May 26 '17 at 18:41
  • Welcome to SO! I suggest you provide a [reproducible example](http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) using minimal data/code to cause the behavior. – r2evans May 26 '17 at 18:57
  • Can you provide an example of the code you are running that makes this happen? – Nancy May 26 '17 at 21:26
  • graphical output in R3.4 has some problems in Rstudio 1.0.136. I'd suggest you to update to v1.0.143 to see if it solves your problem. – lbusett May 28 '17 at 07:20

0 Answers0