Closed
Description
Is it possible to pass the fill value form geom_boxplot aesthetic to the outlier fill color? This would allow the fill of the outlier points to match the fill of the box plot if the point is set to a shape that allows for a fill.
Line https://github.com/hadley/ggplot2/blob/master/R/geom-boxplot.r#L211 could be something like
# definition
outlier.fill = NULL,
...
# outlier data.frame
fill = outlier.fill %||% data$fill[1]
The example would be
ggplot(iris, aes(Species, Sepal.Length, fill = Species)) + geom_boxplot(outlier.shape = 21)
The legend isn't correct, but the desired output would be something like...
ggplot(iris, aes(Species, Sepal.Length)) + geom_boxplot(mapping = aes(color = Species)) + geom_boxplot(outlier.shape = 21, fill = NULL)
Thank you,
Barret