1

Is there a command to Change the colour of the median line in boxplots that were produced using ggplot2/geom_boxplot?

aosmith
  • 34,856
  • 9
  • 84
  • 118
ChrM
  • 61
  • 3
  • 12
  • 1
    A kind of roundabout solution is provided here [here](http://stackoverflow.com/questions/30002257/change-color-median-line-ggplot-geom-boxplot) – zoneparser Nov 21 '16 at 10:55

1 Answers1

3

if you want to change the colour of all lines, you can use this:

ggplot(mpg, aes(class, hwy))+ geom_boxplot(colour = "red")

if you just want to change the colour of the median, you can use the answer from here:

Change color median line ggplot geom_boxplot()

it adds a layer with geom_segment

Community
  • 1
  • 1
Mario
  • 2,393
  • 2
  • 17
  • 37