How to plot in RStudio and not have a new window pop up (R Graphics: Device (ACTIVE)?
For others who like me may still encounter this issue:
This is probably caused by an R update to 3.3.2 and is fixed by installing a newer version of RStudio. In my case 1.0.136 did the trick.
Make R Studio plots only show up in new window
The dev.new()
function will open a new plot window, which then becomes the target for all plots.
If you wish to open another window you can run the command a second time to open a second window.
dev.off()
will shut down the window (in the order they were opened by default).
You can see how to control multiple graphics devices in the documentation here.
Leaving RScript-produced plots on screen until user interaction
This works for me on Linux:
#!/usr/bin/env Rscript
X11()
with(mtcars, plot(mpg, hp))
locator(1)
The user has to click the plot window before it disappears. I presume it would work on Windows with a call to windows()
instead.
show multiple R graphics windows in (r)gedit
Not a gedit
issue but a general R feature -- use x11()
(or windows()
) to create new plot devices.
You can then use dev.set()
et al to flip between them.
Related Topics
Use 'J' to Select the Join Column of 'X' and All Its Non-Join Columns
R: Reading a Binary File That Is Zipped
Sum Columns Row-Wise with Similar Names
Convert Byte Encoding to Unicode
Combining Grid.Table and Base Package Plots in R Figure
Replace Na with Grouped Means in R
Download .Rdata and .CSV Files from Ftp Using Rcurl (Or Any Other Method)
Color Bar Missing in Ggplot Legend, Windows Remote Desktop
Weird Case with Data Tables in R, Column Names Are Mixed
Removing Row with Duplicated Values in All Columns of a Data Frame (R)
Do I Need to Reshape This Wide Data to Effectively Use Ggplot2
Interleave Columns of Two Data Frames
Filter Data Table by Dynamic Column Name
Selecting Unique Rows in Matrix Using R