Ggpllots Not Showing in Pane in Rstudio

Trying to create a ggplot using standard diamonds data setup and the code runs without errors but the plot does not display.

I've tried re-starting RStudio, running and but the command ggplot(diamonds) still does not work

Code run:

System Information:

  • RStudio Edition: (Desktop)
  • RStudio Version: 1.4.1106

Referred here from

This is expected.

only creates a ggplot blank object, using the diamonds
data set. To display requires providing aesthetics indicating what variables to plot and geoms to specify how to plot them.

p <- ggplot(diamonds,aes(carat,depth))
p + geom_point() + theme_minimal()