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()

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.