Repository navigation
Make sure boxplot check doesn't polute other stats/geoms - #3800
Merged
Merged
Conversation
Member
|
Ah, now I understand your comment on #3764. The example I used was the one that should not be flipped, and I confirmed this PR handles them correctly. Thanks. df <- data.frame(value = 1:3, group = c("a", "a", "b"))
devtools::load_all("~/Documents/repo/ggplot2/")
#> Loading ggplot2
l <- stat_summary(fun = "mean", geom = "bar", position = "dodge")
p1 <- ggplot(df, aes(value, 1, fill = group)) + l
p2 <- ggplot(df, aes(value, 0, fill = group)) + l
patchwork::wrap_plots(p1, p2, ncol = 1)Created on 2020-02-06 by the reprex package (v0.3.0) |
yutannihilation
approved these changes
Feb 6, 2020
yutannihilation
left a comment
Member
There was a problem hiding this comment.
StatBoxplot fills 0 here, so this PR looks the right fix to me (though I still don't understand where all(x = 1) came from...).
Line 51 in 6207d2f
Can we add a simple test for this? If you think it's not worth adding, I'm fine since this seems very corner case anyway.
Member
Author
|
I have no idea how I convinced myself it defaulted to |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Superseedes #3764
This PR introduces a new switch in
has_flipped_aes()which confines the single value check to those requesting it (currently only boxplot)