How to plot 3 different time-series with “actual” values rather than a density plot as ridge plots (formerly knows as Joyplots) in R?

I am not being able to plot ridgeplots of 3 different timeseries with same axes with actual values, but NOT a density plot as ridgeplots generally show.

Tried using Henrik Lindberg's code here : viz-pub/sports-time-of-day at master · halhen/viz-pub · GitHub

It does what it is supposed to do, but can not produce smoothing. Also tried the ggridges manual codes (below)

ggplot(df,aes(x = time, y = activity, height = p)) + geom_density_ridges()

ggridges produces density plots, not as a timeseries as I want it to be. Henrik's code produces desired timeseries, but without the smoothing as I wanted from a ridgeplot.

Just use geom_ridgeline() instead.

Hi Martin, I can use geom_ridgeline(), but let me give you am estimate of how my data looks like:

Stock TimePoint Difference
Group1 0 0.801444432
Group1 2 0.517057753
Group1 4 1.919621056
Group1 6 8.369235927
Group1 8 43.21730522
Group1 10 20.592619
Group1 12 13.09526964
Group1 14 6.898520781
Group1 16 2.972149033
Group1 18 0.944320904
Group1 20 0.384980881
Group1 22 0.28747538
Group1 24 0.801444432
Group2 0 1.622469161
Group2 2 0.848417783
Group2 4 0.545399876
Group2 6 1.882030648
Group2 8 25.61238229
Group2 10 19.80661138
Group2 12 15.65288105
Group2 14 10.90096494
Group2 16 10.26798548
Group2 18 8.080563509
Group2 20 3.407711062
Group2 22 1.372582806
Group2 24 1.622469161
Group3 0 6.000350635
Group3 2 2.106272491
Group3 4 0.700256954
Group3 6 0.904464624
Group3 8 4.440496785
Group3 10 9.955133699
Group3 12 12.65903948
Group3 14 12.55618903
Group3 16 18.15366903
Group3 18 17.41525983
Group3 20 8.173723845
Group3 22 6.935143599
Group3 24 6.000350635

Ridgeline does not produce the smoothing effect and also I fail to plot all three groups together.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.