Closed as not planned
Description
(See #3708 (comment))
Compared to the base R's density plot, geom_density()
draws in a narrower range. As a result, the line doesn't touch the X-axis. Though it needs a lot of care to extrapolate the data correctly, it's nice if geom_density()
can draw the bottom right one below.
plot(density(diamonds$carat, adjust = 5))
p <- ggplot(diamonds, aes(carat)) +
geom_density(adjust = 5)
patchwork::wrap_plots(
p + ggtitle("(default)"),
p + ggtitle("(expanded)") + expand_limits(x = -0.5)
)