You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When combining quantile dotplots and density plots, there isn't a way to automatically make the dotplot scale match that of a density plot.
A workaround could be to compute a density estimate and set scale = 1 and height to the maximum density value of the KDE.
But this approach has issues, when the sample is not as smoothly distributed:
Question / solution
Would it be possible to make the area covered by the quantile dot plot sum to one?
Perhaps by thinking of the dots as squares and using quantiles x binwidth × dot_height = 1 as the target for the dot arrangement?
The text was updated successfully, but these errors were encountered:
Hmm I'm not sure this would solve the problem, as I think the two shapes lining up well also depends on the binwidth being about twice the bandwidth of the density estimator (as in your example with the spike). So you can kind of do it by setting the bandwidth and binwidth manually; e.g.:
Doesn't always work perfectly but I'm not sure there is a solution that will. This uses a combination of setting a lower bound on the binwidth to be twice the bandwidth of the KDE (binwidth = c(2 * bw, Inf)) and telling it to compress the spacing between dots as necessary when the layout would otherwise exceed the bounds of the plot to keep that minimum binwidth (overflow = "compress").
It unfortunately does require specifying the binwidth manually to match the bandwidth of the KDE, though I'm not sure of a way around that...
Problem
When combining quantile dotplots and density plots, there isn't a way to automatically make the dotplot scale match that of a density plot.
A workaround could be to compute a density estimate and set scale = 1 and height to the maximum density value of the KDE.
But this approach has issues, when the sample is not as smoothly distributed:
Question / solution
Would it be possible to make the area covered by the quantile dot plot sum to one?
Perhaps by thinking of the dots as squares and using
quantiles
xbinwidth
× dot_height = 1 as the target for the dot arrangement?The text was updated successfully, but these errors were encountered: