仅对箱图中的中位数着色 [英] Coloring only the median in the boxplot
本文介绍了仅对箱图中的中位数着色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有没有一种方法可以只对箱线图的中线而不是整个箱线图进行着色。
Is there a way to color only the median line of the boxplot and not the whole boxplot.
当我尝试这种方式时:
boxplot(matrix,col="red")
然后整个盒子变成红色。
我只想给箱线图的中线着色。
then the whole box gets red colored. I want to color only the median line of the boxplot.
在R中有一种方法可以做到吗?
Is there a way to do it in R ??
推荐答案
尝试使用 medcol
boxplot(matrix(rnorm(100), ncol=2), medcol="red")
这篇关于仅对箱图中的中位数着色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文