You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The base R boxplot has additional control over several graphical features of the boxplots compared to geom_boxplot(). I've searched the issues if this has been mentioned before, but couldn't find it, so I'll summarise here.
These features are:
Staples, the little horizontal lines at the end of the whiskers. Along with staple parameters:
Option for drawing a point at the median, along with parameters:
medpch shape of the median point
medcex size of the median point
medbg fill of the median point
A little bit to my surprise, geom_boxplot()does support the medlwd linewidth of the median line through the fatten argument that is documented in geom_crossbar() (but not in geom_boxplot()).
Probably, it isn't worthwhile to support the median point, because it is easily added with stat_summary(fun = median).
However, I do think it might be worthwhile to implement staples and the extra parameters for whiskers and the median line. These should use e.g. whisker.linetype, median.colour etc. instead of the base R names. Moreover, an alias for fatten might help make it more clear that this refers to the median line.
I don't think these should be mapped aesthetics, rather I'd see them as static parameters similar to the outlier parameters that are inherited from the main boxplot aesthetics by default.
If the maintainers agree, I can put together a PR to review.
The text was updated successfully, but these errors were encountered:
The base R boxplot has additional control over several graphical features of the boxplots compared to
geom_boxplot()
. I've searched the issues if this has been mentioned before, but couldn't find it, so I'll summarise here.These features are:
staplewex
Size of staples relative to box widthstaplelty
Linetype of staplesstaplelwd
Linewidth of staplesstaplecol
Colour of stapleswhisklty
Linetype of whiskerswhisklwd
Linewidth of whiskerswhiskcol
Colour of whiskersmedlty
Linetype of median linemedcol
The colour of the median line (see also Allow independent color modification of median in boxplot #3459)medpch
shape of the median pointmedcex
size of the median pointmedbg
fill of the median pointA little bit to my surprise,
geom_boxplot()
does support themedlwd
linewidth of the median line through thefatten
argument that is documented ingeom_crossbar()
(but not ingeom_boxplot()
).Probably, it isn't worthwhile to support the median point, because it is easily added with
stat_summary(fun = median)
.However, I do think it might be worthwhile to implement staples and the extra parameters for whiskers and the median line. These should use e.g.
whisker.linetype
,median.colour
etc. instead of the base R names. Moreover, an alias forfatten
might help make it more clear that this refers to the median line.I don't think these should be mapped aesthetics, rather I'd see them as static parameters similar to the outlier parameters that are inherited from the main boxplot aesthetics by default.
If the maintainers agree, I can put together a PR to review.
The text was updated successfully, but these errors were encountered: