44

I would like to increase the boldness of the entire boxplot to be more visible on the hard copy. from Here seems "fatten" parameter change the thickness of the only median line. Is there any other parameter that control the thickness/width of the the whole box plot ?

require(reshape)
require(ggplot2)
cars_melt = melt(cars)

ggplot(aes(x = variable, y = value), data = cars_melt) + 
  geom_boxplot(fatten = 2) 
Community
  • 1
  • 1
Areza
  • 5,623
  • 7
  • 48
  • 79
  • 4
    `geom_boxplot(lwd=3)` ("lwd" for "line width"). Also, if `lwd` makes the median too thick, you can use `lwd` and `fatten` together to make the median line thinner relative to the other lines. – eipi10 May 02 '14 at 17:36
  • omg ! probably because it was that easy, nobody has asked this question before ! – Areza May 02 '14 at 17:49
  • 2
    I'm not sure anything about `R` is easy the first time around. – eipi10 May 02 '14 at 17:55
  • @eipi10 Might as well add that as an answer, no? – joran May 14 '14 at 04:08

2 Answers2

59

Use geom_boxplot(lwd=3) ("lwd" for "line width"). Also, if lwd makes the median too thick, you can use lwd and fatten together to make the median line thinner relative to the other lines.

eipi10
  • 91,525
  • 24
  • 209
  • 285
0

Just a note from the future, 2023... it is now geom_boxplot(linewidth = 3)

kabammi
  • 326
  • 3
  • 14