RStudio is not showing the generated plots in the plot pane anymore. Instead they open in a separate file with the name "Quartz". Here\'s my session info.:
I was able to visualize plots in the plot pane for a while before it vanished. All the attempts with the suggestions above failed. What is referred in the blog below got it working.
https://datasciencelearner.wordpress.com/2014/08/17/my-plot-is-not-showing-up/
The trick is to wrap the graphics command inside print function, for instance:
print(
plt2 <- ggplot(housing,
aes(x = Home.Value)) +
geom_histogram()
)
Follow below procedure to resolve the issue.
dev.off()
print(plot(1)) # Basically use print command once
now use plot command as you normally use and should work fine.
I am working with Rmarkdown, and in my case I solved this problem like this:
Go to Tools->Global Options->Rmarkdown
In "Show output preview in" select "Viewer Pane"
Uncheck the box "Show output inline for all R Markdown documents"
It could be because graphic device are already on .
To find indices of open devices:
dev.cur()
To close devices:
dev.off(i)
where i
is index of device to be switched off.
I had the same problem after updating R to version 3.3.2 and using RStudio 0.98.0. Installing the latest version of RStudio fixed the problem.