Issue
how to change the lower and upper point in this stat summary plot to 25% quartile and 75% quartile?
ggplot(data = diamonds) + stat_summary(
mapping = aes(x = cut, y = depth),
fun.ymin = min,
fun.ymax = max,
fun.y = median
)
Solution
Rewriting G5W's solution, using the geom function instead of the stat function:
ggplot(data = diamonds) +
geom_pointrange(mapping = aes(x = cut, y = depth),
stat = "summary",
fun.min = function(z) {quantile(z,0.25)},
fun.max = function(z) {quantile(z,0.75)},
fun = median)
Answered By - mpalanco Answer Checked By - Robin (PHPFixing Admin)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.