Add marginal distribution in R with rug plot from ggplot2

The R rug plot using the ggplot2 package is an interesting way to add one-dimension marginal distribution in R to the plot. There are multiple ways how to use that, and here are a couple of examples in combination with a scatter plot.

Exit mobile version