ggplot2 is an alternative (and awesome) to base R for data visualization. It is based on The Grammar of Graphics. In this post, we will understand the philosophy behind ggplot2 and learn to build some of the most frequently used plots for visualizing data.
## Warning: package 'ggplot2' was built under R version 3.5.1
Grammar of Graphics is a formal system for building plots. The core idea is that any plot can be uniquely described as a combination of
ggplot(data = mtcars)
ggplot(data = mtcars) + geom_point(mapping = aes(x = disp, y = mpg))