My plots only show in a separate window. How can I undo this?

36 Views Asked by At

I am using RStudio and doing scRNA sequencing analysis. I am trying to plot my clusters and they keep pooping up in a new window called R Graphics: Device 2 (ACTIVE).

This is my code:

DimPlot(pbmc.seurat.filtered, reduction = 'umap')

I already tried: dev.off() and go to Tools->Global options->R Mark down -> select "window" from that list in the "show output preview in:"

Also tried options(device = "RStudioGD") and still pops up a new window.

My R is updated to 4.3.0 ans RStudio is 3.51 (they say it's the latest).

Is there any way I can put my graphics back into the plots in Rstudio instead of a new window??

Thank you so much!!

2

There are 2 best solutions below

1
Dan On

Try using dev.off() until you see the following message:

null device 
          1 

After that type dev.new() and try plotting something.

1
Sara Silva On

This is what worked for me:

try 1) uninstall RStudio, 2) update R to the most recent version R 4.3.2, 3) reinstall the most recent version of RStudio RStudio 2023.12.1+402

suggested by: L Tyrone

thank you!!