From 5276609bd349f1e4fb4a10b20412465e227dcc6b Mon Sep 17 00:00:00 2001 From: Thomas Lin Pedersen Date: Mon, 4 Nov 2019 09:02:28 +0100 Subject: [PATCH] Fix #3590 Add `orientation` argument to geom_ribbon doc as it is ambiguous --- R/geom-ribbon.r | 5 +++-- man/geom_ribbon.Rd | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/R/geom-ribbon.r b/R/geom-ribbon.r index 4625cdc2bd..cff9e1dbb1 100644 --- a/R/geom-ribbon.r +++ b/R/geom-ribbon.r @@ -30,8 +30,9 @@ #' h + geom_ribbon(aes(ymin=0, ymax=level)) #' h + geom_area(aes(y = level)) #' -#' # Change orientation be switching the mapping -#' h + geom_area(aes(x = level, y = year)) +#' # Orientation cannot be deduced by mapping, so must be given explicitly for +#' # flipped orientation +#' h + geom_area(aes(x = level, y = year), orientation = "y") #' #' # Add aesthetic mappings #' h + diff --git a/man/geom_ribbon.Rd b/man/geom_ribbon.Rd index 06b5b619d0..db771c5387 100644 --- a/man/geom_ribbon.Rd +++ b/man/geom_ribbon.Rd @@ -114,8 +114,9 @@ h <- ggplot(huron, aes(year)) h + geom_ribbon(aes(ymin=0, ymax=level)) h + geom_area(aes(y = level)) -# Change orientation be switching the mapping -h + geom_area(aes(x = level, y = year)) +# Orientation cannot be deduced by mapping, so must be given explicitly for +# flipped orientation +h + geom_area(aes(x = level, y = year), orientation = "y") # Add aesthetic mappings h +