wilkelab / ggridges

Ridgeline plots in ggplot2
https://wilkelab.org/ggridges
GNU General Public License v2.0
411 stars 31 forks source link

Feature request: support frequency trails #39

Open AndreyAkinshin opened 5 years ago

AndreyAkinshin commented 5 years ago

Frequency trails were introduced by Brendan Gregg in his blog. It's a combination of a density plot and a rug plot which highlights outliers. It would be nice to have the frequency trails support in ggridges.

I created own package ggwaterfall to draw them. Here is an example:

waterfall_ft(list(
  c(rnorm(100), 2, 3, 4),
  c(rnorm(100), 5, 6, 7)
), show.underline = FALSE)

plot1

That's how the same plots look like in ggridges:

df <- data.frame(
  x = c(rnorm(100), 2, 3, 4, rnorm(100), 5, 6, 7),
  y = factor(c(rep(1, 103), rep(2, 103)))
)
ggplot(df, aes(x = x, y = y)) + geom_density_ridges()

plot2 As you can see, such a picture doesn't provide enough information about outliers.