Visualizing distributions of some measured quantity is an extremely common task in bioinformatics, and one that base R handles admirably with its hist() and density() functions and the generic plot() methods, which can create plots of the objects. The ggplot graphics system has a neat way of plotting many density graphs in a per factor level manner, resulting in a compact and very readable graphic—a so-called ridgeplot. In this recipe, we'll look at how to create a ridgeplot.
Visualizing multiple distributions with ridgeplots
Getting ready
In this recipe, we'll use the ggplot and ggridges packages. For the dataset, we'll use one from the datasets package that usually comes preinstalled with R. We&apos...