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)) + 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)) +