ggplot(mtcars, aes(x = wt, y = mpg)) +
geom_point() +
ggtitle("Scatter Plot of MPG vs. Weight", subtitle = "Your Name - Your Student ID")
Did you have a question about the code you posted? If you make it
library(ggplot2)
ggplot(mtcars, aes(x = wt, y = mpg)) +
geom_point() +
ggtitle(
"Scatter Plot of MPG vs. Weight",
subtitle = "Your Name - Your Student ID"
)
it will work and produce a scatterplot in RStudio's plot pane.
This topic was automatically closed 90 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.