This page is dedicated to the control of boxplot colors, using the ggplot2 library. The first example on the left shows how to set a uniform color for the whole boxplot. Remember the transparency is set using the alpha argument. The second example set a different color to each group. To get it, simply set the color argument in the aesthetic.

We can use different color palettes. Here are 2 examples using R color brewer. Note that a continuous palette is used on the left, whereas a discrete palette is used on the right. See graph #38 for all the available palette.

If you want to highlight one or several groups:


Not what you are looking for ? Make a new search !

[mediatagger]


Leave a Reply

Be the First to Comment!

avatar
  Subscribe  
Notify of