p <- ggplot(mpg, aes(class, hwy)) p + geom_boxplot() p + geom_boxplot() + coord_flip() 转载于:https://www.cnblogs.com/yangyongzhi/p/6526068.html