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
library(ggplot2) | |
head(mtcars) |
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() |
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(size = 5, color = "#0099f9") |
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(aes(size = qsec, color = cyl)) |
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(size = 5, color = "#0099f9", shape = 17) |
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
library(ggrepel) | |
ggplot(mtcars, aes(x = mpg, y = hp)) + | |
geom_point(size = 5, color = "#0099f9") + | |
geom_text_repel(label = rownames(mtcars), size=3.5) |
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(size = 5, color = "#0099f9") + | |
geom_label_repel(label = rownames(mtcars), size=3.5) |
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(size = 5, color = "#0099f9") + | |
theme_classic() |
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" | |
) |
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), |
OlderNewer