Reputation: 205
I'd like to create boxplot like this:
This plot is created by bwplot in lattice package. Instead using this function, I hope to use boxplot to plot similar thing.
I notice in boxplot we could only change the color of the box body, how could I change the boundary color of the box by boxplot function? Thanks!
Upvotes: 8
Views: 29834
Reputation: 162321
Look at ?boxplot
to find that there's an argument border=
that does what you want. For example:
boxplot(count ~ spray, data = InsectSprays, col = "lightgray",
border=c("blue", "green", "blue", "green", "blue", "green"))
Upvotes: 14