- R Data Visualization Recipes
- Vitor Bianchi Lanzetta
- 73字
- 2021-07-02 23:33:28
Adding marginal histograms using ggExtra
Another way to go is to draw histograms or even density distributions in the margins. Drawing tailor made plots in the margins would require more code. On the other hand, if there is no need for greater customization ggExtra package can be used to spare many code lines. This recipe is demonstrating how to use ggExtra to easily draw histograms in the margins of a scatterplot.