Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Coloring only the median in the boxplot

Tags:

r

colors

boxplot

Is there a way to color only the median line of the boxplot and not the whole boxplot.

When I try this :

boxplot(matrix,col="red")

then the whole box gets red colored. I want to color only the median line of the boxplot.

Is there a way to do it in R ??

like image 260
user1021713 Avatar asked Dec 12 '22 03:12

user1021713


1 Answers

Try medcol as in

boxplot(matrix(rnorm(100), ncol=2), medcol="red")

enter image description here

like image 82
Henry Avatar answered Dec 30 '22 10:12

Henry