I try to plot density lines with boxplots, but I just get a flat line that does not resemble the data distribution. What did I miss?
library(tidyverse)
as_tibble(iris) %>%
pivot_longer(!Species, names_to = "Measure", values_to = "Value") %>%
ggplot(aes(Value, Measure)) +
geom_density() +
geom_boxplot(width = .25, position = position_nudge(y = -.15), outlier.shape = NA) +
facet_wrap(~ Species, strip.position = "right", nrow = 3)

Created on 2022-08-24 with reprex v2.0.2
