我想出了如何从ggplot获取每个bin的计数,是否有人知道如何在图上显示这些数字?
g <- ggplot()+geom_histogram() ggplot_build(g)$data[[1]]$count
r histogram ggplot2
ggplot2 ×1
histogram ×1
r ×1