library(ggplot2)
library(ggridges)
## Warning: package 'ggridges' was built under R version 4.1.3
ggplot(iris, aes(x = Sepal.Length, 
                 y = Species, 
                 group = Species, 
                 fill = Species)) +
  geom_density_ridges(stat = "binline", bins = 30, scale = 2) +
  scale_y_discrete(expand = c(0, 0)) +
  scale_x_continuous(expand = c(0, 0)) +
  coord_cartesian(clip = "off") +
  theme_ridges()

ggplot(iris, aes(x = Sepal.Length, 
                 y = Species, 
                 group = Species, 
                 fill = Species)) +
  geom_density_ridges(scale = 2) +
  scale_y_discrete(expand = c(0, 0)) +
  scale_x_continuous(expand = c(0, 0)) +
  coord_cartesian(clip = "off") +
  theme_ridges()
## Picking joint bandwidth of 0.181