diamonds 是内置数据集
library(ggplot2)
ggplot(diamonds, aes(carat)) +
  geom_density()

R语言ggplot2::geom_density绘制概率密度图

ggplot(diamonds, aes(depth, colour = cut)) +
  geom_density() +
  xlim(55, 70)

R语言ggplot2::geom_density绘制概率密度图

更多示例: https://ggplot2.tidyverse.org/reference/geom_density.html#examples

相关文章:

  • 2022-12-23
  • 2021-07-05
  • 2021-11-16
  • 2022-12-23
  • 2021-11-23
  • 2021-08-07
  • 2021-07-02
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-18
  • 2021-08-20
  • 2021-12-31
  • 2021-05-25
相关资源
相似解决方案