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
In the ?density help page, the description for the bw argument states:
The default, "nrd0", has remained the default for historical and compatibility reasons, rather than as a general recommendation, where e.g., "SJ" would rather fit, see also Venables and Ripley (2002).
stat_density() and stat_ydensity() use density()'s default of "nrd0". Since ggplot2's philosophy is to provide the "best" default wherever possible, it seems like a good idea to change the default for these functions to bw = "SJ".
I'm not an expert in KDE algorithms, so I can't verify if the claim in the ?density page is true or not, but I thought it worth opening up the discussion.
If you decide to change the default for those functions, it also needs changing in the compute_group() and compute_density() methods of the StatDensity and StatYdensity ggproto objects.
The text was updated successfully, but these errors were encountered:
In the
?density
help page, the description for thebw
argument states:stat_density()
andstat_ydensity()
usedensity()
's default of"nrd0"
. Since ggplot2's philosophy is to provide the "best" default wherever possible, it seems like a good idea to change the default for these functions tobw = "SJ"
.I'm not an expert in KDE algorithms, so I can't verify if the claim in the
?density
page is true or not, but I thought it worth opening up the discussion.If you decide to change the default for those functions, it also needs changing in the
compute_group()
andcompute_density()
methods of theStatDensity
andStatYdensity
ggproto objects.The text was updated successfully, but these errors were encountered: