This post demonstrates how to build a
scatterplot with rug with
R
and ggplot2.
Adding rug gives insight about variable distribution and is
especially helpful when markers overlap.
geom_rug()
A scatterplot displays the
relationship between 2 numeric variables. You can easily add rug on
X and Y axis thanks to the geom_rug()
function to
illustrate the distribution of dots.
Note you can as well add marginal plots to show these distributions.
👋 After crafting hundreds of R charts over 12 years, I've distilled my top 10 tips and tricks. Receive them via email! One insight per day for the next 10 days! 🔥