Created
December 17, 2020 10:43
-
-
Save darioappsilon/5a2ff2852695daa7053e2fca5002b534 to your computer and use it in GitHub Desktop.
010_scatter_plots
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ggplot(mtcars, aes(x = mpg, y = hp)) + | |
geom_point(color = "#0099f9", size = 5) + | |
geom_point(aes(size = qsec, color = cyl)) + | |
labs( | |
title = "Miles per Gallon vs. Horse Power", | |
subtitle = "Color - Number of cylinders; Size - 1/4 mile time", | |
caption = "Source: MTCars dataset" | |
) + | |
theme( | |
plot.title = element_text(color = "#0099f9", size = 20, face = "bold", hjust = 0.5), | |
plot.subtitle = element_text(size = 13, face = "bold", hjust = 0.5), | |
plot.caption = element_text(face = "italic", hjust = 0) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment