How to use R language to draw scatter chart combined with marginal distribution map
This article mainly shows you "how to use R language to draw scatter chart combined with marginal distribution map", the content is easy to understand, clear, hope to help you solve doubts, the following let the editor lead you to study and learn "how to use R language to draw scatter chart combined with marginal distribution map" this article.
Mainly use ggExtra combined with ggplot2 two R packets to draw. (superior in simplicity and convenience) use cowplot and ggpubr to draw. (the advantage lies in flexibility and beauty)
We all take the iris dataset as an example in the following drawings.
1. Use ggExtra with ggplot21) traditional scatter chart # librarylibrary (ggplot2) library (ggExtra) # classic plotp