Skip to content

Commit

Permalink
remove width
Browse files Browse the repository at this point in the history
  • Loading branch information
larmarange committed Aug 21, 2024
1 parent 1b1deb8 commit d027e26
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 27 deletions.
19 changes: 6 additions & 13 deletions R/geom_bar_diverging.R
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
#' @param labeller Labeller function to format labels,
#' see [`stat_prop()`]. Passed only if `stat = "prop"`.
#' @inheritParams position_likert
#' @param width Bar width.
#' @export
#' @examples
#' library(ggplot2)
Expand Down Expand Up @@ -71,8 +70,7 @@ geom_bar_diverging <- function(mapping = NULL,
height = "count",
reverse = FALSE,
exclude_fill_values = NULL,
cutoff = NULL,
width = NULL) {
cutoff = NULL) {

args <- list(...)
if (stat == "prop") {
Expand Down Expand Up @@ -104,8 +102,7 @@ geom_bar_likert <- function(mapping = NULL,
height = "prop",
reverse = FALSE,
exclude_fill_values = NULL,
cutoff = NULL,
width = NULL) {
cutoff = NULL) {

args <- c(as.list(environment()), list(...))
do.call(geom_bar_diverging, args)
Expand All @@ -127,8 +124,7 @@ geom_bar_pyramid <- function(mapping = NULL,
height = "prop",
reverse = FALSE,
exclude_fill_values = NULL,
cutoff = NULL,
width = 1) {
cutoff = NULL) {

args <- c(as.list(environment()), list(...))
do.call(geom_bar_diverging, args)
Expand All @@ -153,8 +149,7 @@ geom_text_diverging <- function(mapping = NULL,
labeller = label_number_abs(),
reverse = FALSE,
exclude_fill_values = NULL,
cutoff = NULL,
width = NULL) {
cutoff = NULL) {

args <- list(...)
if (stat == "prop") {
Expand Down Expand Up @@ -191,8 +186,7 @@ geom_text_likert <- function(mapping = NULL,
labeller = label_percent_abs(accuracy = 1),
reverse = FALSE,
exclude_fill_values = NULL,
cutoff = NULL,
width = NULL) {
cutoff = NULL) {

args <- c(as.list(environment()), list(...))
do.call(geom_text_diverging, args)
Expand All @@ -217,8 +211,7 @@ geom_text_pyramid <- function(mapping = NULL,
labeller = label_percent_abs(accuracy = 1),
reverse = FALSE,
exclude_fill_values = NULL,
cutoff = NULL,
width = 1) {
cutoff = NULL) {

args <- c(as.list(environment()), list(...))
do.call(geom_text_diverging, args)
Expand Down
20 changes: 6 additions & 14 deletions man/geom_bar_diverging.Rd

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

0 comments on commit d027e26

Please sign in to comment.