Skip to content

geom_boxplot fill passed onto outliers #1785

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
schloerke opened this issue Sep 27, 2016 · 2 comments
Closed

geom_boxplot fill passed onto outliers #1785

schloerke opened this issue Sep 27, 2016 · 2 comments
Labels
feature a feature request or enhancement
Milestone

Comments

@schloerke
Copy link
Contributor

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)

screen shot 2016-09-27 at 3 46 25 pm

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)

screen shot 2016-09-27 at 3 45 49 pm

Thank you,
Barret

@hadley
Copy link
Member

hadley commented Sep 27, 2016

Want to do a PR?

@schloerke
Copy link
Contributor Author

Sure. I'll make one shortly. :-)
On Tue, Sep 27, 2016 at 3:52 PM Hadley Wickham [email protected]
wrote:

Want to do a PR?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#1785 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAFsL5Gk47j6KLojnv8Qd6m0aCmdtr4fks5quXPrgaJpZM4KIFB-
.

@hadley hadley added the feature a feature request or enhancement label Oct 5, 2016
@hadley hadley added this to the v2.2.0 milestone Oct 5, 2016
@hadley hadley closed this as completed in 9e4218a Oct 6, 2016
@lock lock bot locked as resolved and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature a feature request or enhancement
Projects
None yet
Development

No branches or pull requests

2 participants