如何调整y轴以便在这种情节中正确显示注释?
library(ggplot2)
ggplot(diamonds, aes(x = cut, y = depth)) +
facet_wrap(~ color) +
stat_summary(fun.y = sum, geom="bar", fill = "yellow", aes(label=cut, vjust = 0)) +
stat_summary(fun.y = sum, geom="text", aes(label=cut), vjust = 0)
Run Code Online (Sandbox Code Playgroud)

现在例如在facet G中,'Ideal'的注释没有正确显示.应该动态计算Y轴范围,以便在条形上方始终存在一些注释空间.所以我不能使用固定的y轴范围.
| 归档时间: |
|
| 查看次数: |
1031 次 |
| 最近记录: |