From f444cae26f81387633653460189a8d5900fe4507 Mon Sep 17 00:00:00 2001 From: Kara Woo Date: Thu, 23 May 2019 09:55:25 -0700 Subject: [PATCH 1/2] Fix position_dodge2() example --- R/position-dodge.r | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/R/position-dodge.r b/R/position-dodge.r index 3836b421ad..6ad71f8edf 100644 --- a/R/position-dodge.r +++ b/R/position-dodge.r @@ -17,10 +17,10 @@ #' ggplot(mtcars, aes(factor(cyl), fill = factor(vs))) + #' geom_bar(position = "dodge2") #' -#' # By default, dodging with `position_dodge2()` preserves the width of each -#' # element. You can choose to preserve the total width with: +#' # By default, dodging with `position_dodge2()` preserves the total width of +#' # the elements. You can choose to preserve the width of each element with: #' ggplot(mtcars, aes(factor(cyl), fill = factor(vs))) + -#' geom_bar(position = position_dodge(preserve = "total")) +#' geom_bar(position = position_dodge2(preserve = "single")) #' #' \donttest{ #' ggplot(diamonds, aes(price, fill = cut)) + From ef20ff1061f1c8dbdecc4aa75a0161f9ebc6b395 Mon Sep 17 00:00:00 2001 From: Kara Woo Date: Thu, 23 May 2019 10:04:20 -0700 Subject: [PATCH 2/2] Regenerate docs --- man/position_dodge.Rd | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/man/position_dodge.Rd b/man/position_dodge.Rd index 21122a3055..708a72b4d5 100644 --- a/man/position_dodge.Rd +++ b/man/position_dodge.Rd @@ -34,10 +34,10 @@ also works with bars and rectangles. ggplot(mtcars, aes(factor(cyl), fill = factor(vs))) + geom_bar(position = "dodge2") -# By default, dodging with `position_dodge2()` preserves the width of each -# element. You can choose to preserve the total width with: +# By default, dodging with `position_dodge2()` preserves the total width of +# the elements. You can choose to preserve the width of each element with: ggplot(mtcars, aes(factor(cyl), fill = factor(vs))) + - geom_bar(position = position_dodge(preserve = "total")) + geom_bar(position = position_dodge2(preserve = "single")) \donttest{ ggplot(diamonds, aes(price, fill = cut)) +