Open mkoohafkan opened 4 years ago
The issue turns out to be that for this dataset, all values of x
at time = 0
are 0, which results in an large (infinite?) value for the ydensity
curve at time 0. However, the ydensity
line for time = 0
isn't plotted (because it's infinite?) so the issue isn't immediately obvious. Filtering the dataset for time > 0
resolves the issue.
Surprisingly, pull https://github.com/clauswilke/ggridges/pull/21 doesn't resolve the issue.
Consider the following simulated data:
I want to plot the distribution of values at select times as density ridgelines. This works perfectly with
geom_vridgeline
when a subset of the data is used:However, it doesn't work so well when I try to this with the full dataset:
The issue seems to be the
scale
argument which ends up expanding the y-axis. If I reduce the value ofscale
, the scale is expanded less but I lose the width of the ridglines:Is this a bug, or am I misunderstanding something about the arguments?