我想使用geom_函数而不是stat_summary在这里重写绘图.有什么建议?
感谢您的关注.
library(ggplot2)
ggplot(data = mpg)+
stat_summary(
mapping = aes(x = class, y = hwy),
fun.ymin = min,
fun.ymax = max,
fun.y = median
)
Run Code Online (Sandbox Code Playgroud)
ggplot(data = mpg)+
geom_pointrange(
mapping = aes(x = class, y = hwy),
fun.ymin = min, #passed to the stat via the ...
fun.ymax = max, #ditto
fun.y = median, #ditto
stat = "summary"
)
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2048 次 |
| 最近记录: |