Skip to content

ignore min/max variables when detecting orientation in geom_bar #3882

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

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion R/geom-bar.r
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ GeomBar <- ggproto("GeomBar", GeomRect,
non_missing_aes = c("xmin", "xmax", "ymin", "ymax"),

setup_params = function(data, params) {
params$flipped_aes <- has_flipped_aes(data, params, range_is_orthogonal = FALSE)
params$flipped_aes <- has_flipped_aes(data, params)
params
},

Expand Down
4 changes: 1 addition & 3 deletions R/utilities.r
Original file line number Diff line number Diff line change
Expand Up @@ -461,9 +461,7 @@ switch_orientation <- function(aesthetics) {
#' - `range_is_orthogonal`: This argument controls whether the existance of
#' range-like aesthetics (e.g. `xmin` and `xmax`) represents the main or
#' secondary axis. If `TRUE` then the range is given for the secondary axis as
#' seen in e.g. [geom_ribbon()] and [geom_linerange()]. `FALSE` is less
#' prevalent but can be seen in [geom_bar()] where it may encode the span of
#' each bar.
#' seen in e.g. [geom_ribbon()] and [geom_linerange()].
#' - `group_has_equal`: This argument controls whether to test for equality of
#' all `x` and `y` values inside each group and set the main axis to the one
#' where all is equal. This test is only performed if `TRUE`, and only after
Expand Down
4 changes: 1 addition & 3 deletions man/bidirection.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.