2016-12-10 7 views

答えて

3
ggplot(data = diamonds) + stat_summary(
    mapping = aes(x = cut, y = depth), 
    fun.ymin = function(z) { quantile(z,0.25) }, 
    fun.ymax = function(z) { quantile(z,0.75) }, 
    fun.y = median) 
1

Rewritting G5Wの溶液、STAT関数の代わりにGEOM関数を使用:

ggplot(data = diamonds) + 
    geom_pointrange(mapping = aes(x = cut, y = depth), 
        stat = "summary", 
        fun.ymin = function(z) {quantile(z,0.25)}, 
        fun.ymax = function(z) {quantile(z,0.75)}, 
        fun.y = median) 

enter image description here

関連する問題