From a4e7497958082e0bedf663e668dfbaf30d991184 Mon Sep 17 00:00:00 2001 From: Teun van den Brand Date: Wed, 5 Nov 2025 13:44:42 +0100 Subject: [PATCH 1/6] collect universal arguments in separate Rd --- R/geom-point.R | 29 +----- R/layer.R | 168 +++++++++++++++++++++------------ man/annotate.Rd | 44 +++++---- man/annotation_borders.Rd | 72 +++++++------- man/geom_abline.Rd | 118 +++++++++++------------ man/geom_bar.Rd | 100 +++++++++----------- man/geom_bin_2d.Rd | 104 ++++++++++---------- man/geom_blank.Rd | 108 ++++++++++----------- man/geom_boxplot.Rd | 102 ++++++++++---------- man/geom_contour.Rd | 124 ++++++++++++------------ man/geom_count.Rd | 104 ++++++++++---------- man/geom_density.Rd | 104 ++++++++++---------- man/geom_density_2d.Rd | 64 ++++++------- man/geom_dotplot.Rd | 104 ++++++++++---------- man/geom_function.Rd | 105 ++++++++++----------- man/geom_hex.Rd | 104 ++++++++++---------- man/geom_histogram.Rd | 104 ++++++++++---------- man/geom_jitter.Rd | 112 +++++++++++----------- man/geom_linerange.Rd | 112 +++++++++++----------- man/geom_map.Rd | 106 ++++++++++----------- man/geom_path.Rd | 112 +++++++++++----------- man/geom_point.Rd | 116 +++++++++++------------ man/geom_polygon.Rd | 116 +++++++++++------------ man/geom_qq.Rd | 116 +++++++++++------------ man/geom_quantile.Rd | 104 ++++++++++---------- man/geom_ribbon.Rd | 130 ++++++++++++------------- man/geom_rug.Rd | 116 +++++++++++------------ man/geom_segment.Rd | 116 +++++++++++------------ man/geom_smooth.Rd | 102 ++++++++++---------- man/geom_spoke.Rd | 116 +++++++++++------------ man/geom_text.Rd | 116 +++++++++++------------ man/geom_tile.Rd | 116 +++++++++++------------ man/geom_violin.Rd | 102 ++++++++++---------- man/ggsf.Rd | 111 +++++++++++----------- man/layer.Rd | 80 ++++++++-------- man/layer_sf.Rd | 80 ++++++++-------- man/shared_layer_parameters.Rd | 107 +++++++++++++++++++++ man/stat_connect.Rd | 112 +++++++++++----------- man/stat_ecdf.Rd | 110 ++++++++++----------- man/stat_ellipse.Rd | 116 +++++++++++------------ man/stat_identity.Rd | 112 +++++++++++----------- man/stat_manual.Rd | 116 +++++++++++------------ man/stat_sf_coordinates.Rd | 112 +++++++++++----------- man/stat_summary.Rd | 114 +++++++++++----------- man/stat_summary_2d.Rd | 116 +++++++++++------------ man/stat_unique.Rd | 112 +++++++++++----------- 46 files changed, 2375 insertions(+), 2489 deletions(-) create mode 100644 man/shared_layer_parameters.Rd diff --git a/R/geom-point.R b/R/geom-point.R index f03d1a9917..6df965d51f 100644 --- a/R/geom-point.R +++ b/R/geom-point.R @@ -67,34 +67,7 @@ GeomPoint <- ggproto( #' #' @aesthetics GeomPoint #' The `fill` aesthetic only applies to shapes 21-25. -#' @inheritParams layer -#' @param na.rm If `FALSE`, the default, missing values are removed with -#' a warning. If `TRUE`, missing values are silently removed. -#' @param ... Other arguments passed on to [layer()]'s `params` argument. These -#' arguments broadly fall into one of 4 categories below. Notably, further -#' arguments to the `position` argument, or aesthetics that are required -#' can *not* be passed through `...`. Unknown arguments that are not part -#' of the 4 categories below are ignored. -#' * Static aesthetics that are not mapped to a scale, but are at a fixed -#' value and apply to the layer as a whole. For example, `colour = "red"` -#' or `linewidth = 3`. The geom's documentation has an **Aesthetics** -#' section that lists the available options. The 'required' aesthetics -#' cannot be passed on to the `params`. Please note that while passing -#' unmapped aesthetics as vectors is technically possible, the order and -#' required length is not guaranteed to be parallel to the input data. -#' * When constructing a layer using -#' a `stat_*()` function, the `...` argument can be used to pass on -#' parameters to the `geom` part of the layer. An example of this is -#' `stat_density(geom = "area", outline.type = "both")`. The geom's -#' documentation lists which parameters it can accept. -#' * Inversely, when constructing a layer using a -#' `geom_*()` function, the `...` argument can be used to pass on parameters -#' to the `stat` part of the layer. An example of this is -#' `geom_area(stat = "density", adjust = 0.5)`. The stat's documentation -#' lists which parameters it can accept. -#' * The `key_glyph` argument of [`layer()`] may also be passed on through -#' `...`. This can be one of the functions described as -#' [key glyphs][draw_key], to change the display of the layer in the legend. +#' @inheritParams shared_layer_parameters #' #' @export #' @examples diff --git a/R/layer.R b/R/layer.R index 179f519441..c54975b5aa 100644 --- a/R/layer.R +++ b/R/layer.R @@ -1,3 +1,110 @@ +#' @name shared_layer_parameters +#' @title Shared layer parameters +#' @description +#' This is a central place for describing typical layer parameters. +#' It prevents cluttered definitions all over the place. +#' +#' @param mapping +#' Set of aesthetic mappings created by [aes()]. If specified and `inherit.aes = +#' TRUE` (the default), it is combined with the default mapping at the top level +#' of the plot. You must supply `mapping` if there is no plot mapping. +#' +#' @param data +#' The data to be displayed in this layer. There are three options: +#' * `NULL` (default): the data is inherited from the plot data as specified +#' in the call to [ggplot()]. +#' * A `data.frame`, or other object, will override the plot data. All objects +#' will be fortified to produce a data frame. See [fortify()] for which +#' variables will be created. +#' * A `function` will be called with a single argument, the plot data. The return +#' value must be a `data.frame`, and will be used as the layer data. A +#' `function` can be created from a `formula` (e.g. `~ head(.x, 10)`). +#' +#' @param geom +#' The geometric object to use to display the data for this layer. When using a +#' `stat_*()` function to construct a layer, the `geom` argument can be used to +#' override the default coupling between stats and geoms. The `geom` argument +#' accepts the following: +#' * A `Geom` ggproto subclass, for example `GeomPoint`. +#' * A string naming the geom. To give the geom as a string, strip the +#' function name of the `geom_` prefix. For example, to use `geom_point()`, +#' give the geom as `"point"`. +#' * For more information and other ways to specify the geom, see the +#' [layer geom][layer_geoms] documentation. +#' +#' @param stat +#' The statistical transformation to use on the data for this layer. When using +#' a `geom_*()` function to construct a layer, the `stat` argument can be used +#' to override the default coupling between geoms and stats. The `stat` argument +#' accepts the following: +#' * A `Stat` ggproto subclass, for example `StatCount`. +#' * A string naming the stat. To give the stat as a string, strip the +#' function name of the `stat_` prefix. For example, to use `stat_count()`, +#' give the stat as `"count"`. +#' * For more information and other ways to specify the stat, see the +#' [layer stat][layer_stats] documentation. +#' +#' @param position +#' A position adjustment to use on the data for this layer. This can be used in +#' various ways, including to prevent overplotting and improving the display. +#' The `position` argument accepts the following: +#' * The result of calling a position function, such as `position_jitter()`. +#' This method allows for passing extra arguments to the position. +#' * A string naming the position adjustment. To give the position as a +#' string, strip the function name of the `position_` prefix. For example, to +#' use `position_jitter()`, give the position as `"jitter"`. +#' * For more information and other ways to specify the position, see the +#' [layer position][layer_positions] documentation. +#' +#' @param na.rm +#' If `FALSE`, the default, missing values are removed with a warning. If +#' `TRUE`, missing values are silently removed. +#' +#' @param show.legend +#' Logical. Should this layer be included in the legends? `NA`, the default, +#' includes if any aesthetics are mapped. `FALSE` never includes, and `TRUE` +#' always includes. It can also be a named logical vector to finely select the +#' aesthetics to display. To include legend keys for all levels, even when no +#' data exists, use `TRUE`. If `NA`, all levels are shown in legend, but +#' unobserved levels are omitted. +#' +#' @param inherit.aes +#' If `FALSE`, overrides the default aesthetics, rather than combining with +#' them. This is most useful for helper functions that define both data and +#' aesthetics and shouldn't inherit behaviour from the default plot +#' specification, e.g. [annotation_borders()]. +#' +#' @param ... +#' Other arguments passed on to [layer()]'s `params` argument. These arguments +#' broadly fall into one of 4 categories below. Notably, further arguments to +#' the `position` argument, or aesthetics that are required can +#' *not* be passed through `...`. Unknown arguments that are not part of the 4 +#' categories below are ignored. +#' * Static aesthetics that are not mapped to a scale, but are at a fixed +#' value and apply to the layer as a whole. For example, `colour = "red"` or +#' `linewidth = 3`. The geom's documentation has an **Aesthetics** section +#' that lists the available options. The 'required' aesthetics cannot be +#' passed on to the `params`. Please note that while passing unmapped +#' aesthetics as vectors is technically possible, the order and required +#' length is not guaranteed to be parallel to the input data. +#' * When constructing a layer using +#' a `stat_*()` function, the `...` argument can be used to pass on parameters +#' to the `geom` part of the layer. An example of this is +#' `stat_density(geom = "area", outline.type = "both")`. The geom's +#' documentation lists which parameters it can accept. +#' * Inversely, when constructing a layer using a +#' `geom_*()` function, the `...` argument can be used to pass on parameters +#' to the `stat` part of the layer. An example of this is +#' `geom_area(stat = "density", adjust = 0.5)`. The stat's documentation lists +#' which parameters it can accept. +#' * The `key_glyph` argument of [`layer()`] may also be passed on through +#' `...`. This can be one of the functions described as +#' [key glyphs][draw_key], to change the display of the layer in the legend. +#' +#' @keywords internal +#' @aliases NULL +NULL + #' Create a new layer #' #' A layer is a combination of data, stat and geom with a potential position @@ -5,66 +112,7 @@ #' calls but it can also be created directly using this function. #' #' @export -#' @param mapping Set of aesthetic mappings created by [aes()]. If specified and -#' `inherit.aes = TRUE` (the default), it is combined with the default mapping -#' at the top level of the plot. You must supply `mapping` if there is no plot -#' mapping. -#' @param data The data to be displayed in this layer. There are three -#' options: -#' -#' If `NULL`, the default, the data is inherited from the plot -#' data as specified in the call to [ggplot()]. -#' -#' A `data.frame`, or other object, will override the plot -#' data. All objects will be fortified to produce a data frame. See -#' [fortify()] for which variables will be created. -#' -#' A `function` will be called with a single argument, -#' the plot data. The return value must be a `data.frame`, and -#' will be used as the layer data. A `function` can be created -#' from a `formula` (e.g. `~ head(.x, 10)`). -#' -#' @param geom The geometric object to use to display the data for this layer. -#' When using a `stat_*()` function to construct a layer, the `geom` argument -#' can be used to override the default coupling between stats and geoms. The -#' `geom` argument accepts the following: -#' * A `Geom` ggproto subclass, for example `GeomPoint`. -#' * A string naming the geom. To give the geom as a string, strip the -#' function name of the `geom_` prefix. For example, to use `geom_point()`, -#' give the geom as `"point"`. -#' * For more information and other ways to specify the geom, see the -#' [layer geom][layer_geoms] documentation. -#' @param stat The statistical transformation to use on the data for this layer. -#' When using a `geom_*()` function to construct a layer, the `stat` -#' argument can be used to override the default coupling between geoms and -#' stats. The `stat` argument accepts the following: -#' * A `Stat` ggproto subclass, for example `StatCount`. -#' * A string naming the stat. To give the stat as a string, strip the -#' function name of the `stat_` prefix. For example, to use `stat_count()`, -#' give the stat as `"count"`. -#' * For more information and other ways to specify the stat, see the -#' [layer stat][layer_stats] documentation. -#' @param position A position adjustment to use on the data for this layer. This -#' can be used in various ways, including to prevent overplotting and -#' improving the display. The `position` argument accepts the following: -#' * The result of calling a position function, such as `position_jitter()`. -#' This method allows for passing extra arguments to the position. -#' * A string naming the position adjustment. To give the position as a -#' string, strip the function name of the `position_` prefix. For example, -#' to use `position_jitter()`, give the position as `"jitter"`. -#' * For more information and other ways to specify the position, see the -#' [layer position][layer_positions] documentation. -#' @param show.legend logical. Should this layer be included in the legends? -#' `NA`, the default, includes if any aesthetics are mapped. -#' `FALSE` never includes, and `TRUE` always includes. -#' It can also be a named logical vector to finely select the aesthetics to -#' display. To include legend keys for all levels, even -#' when no data exists, use `TRUE`. If `NA`, all levels are shown in legend, -#' but unobserved levels are omitted. -#' @param inherit.aes If `FALSE`, overrides the default aesthetics, -#' rather than combining with them. This is most useful for helper functions -#' that define both data and aesthetics and shouldn't inherit behaviour from -#' the default plot specification, e.g. [annotation_borders()]. +#' @inheritParams shared_layer_parameters #' @param check.aes,check.param If `TRUE`, the default, will check that #' supplied parameters and aesthetics are understood by the `geom` or #' `stat`. Use `FALSE` to suppress the checks. diff --git a/man/annotate.Rd b/man/annotate.Rd index c5117fa236..a3c3a8ca9a 100644 --- a/man/annotate.Rd +++ b/man/annotate.Rd @@ -24,36 +24,34 @@ annotate( \item{x, y, xmin, ymin, xmax, ymax, xend, yend}{positioning aesthetics - you must specify at least one of these.} -\item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These -arguments broadly fall into one of 4 categories below. Notably, further -arguments to the \code{position} argument, or aesthetics that are required -can \emph{not} be passed through \code{...}. Unknown arguments that are not part -of the 4 categories below are ignored. +\item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These arguments +broadly fall into one of 4 categories below. Notably, further arguments to +the \code{position} argument, or aesthetics that are required can \emph{not} be passed +through \code{...}. Unknown arguments that are not part of the 4 categories below +are ignored. \itemize{ \item Static aesthetics that are not mapped to a scale, but are at a fixed -value and apply to the layer as a whole. For example, \code{colour = "red"} -or \code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} -section that lists the available options. The 'required' aesthetics -cannot be passed on to the \code{params}. Please note that while passing -unmapped aesthetics as vectors is technically possible, the order and -required length is not guaranteed to be parallel to the input data. +value and apply to the layer as a whole. For example, \code{colour = "red"} or +\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section that +lists the available options. The 'required' aesthetics cannot be passed on to +the \code{params}. Please note that while passing unmapped aesthetics as vectors +is technically possible, the order and required length is not guaranteed to +be parallel to the input data. \item When constructing a layer using -a \verb{stat_*()} function, the \code{...} argument can be used to pass on -parameters to the \code{geom} part of the layer. An example of this is -\code{stat_density(geom = "area", outline.type = "both")}. The geom's -documentation lists which parameters it can accept. +a \verb{stat_*()} function, the \code{...} argument can be used to pass on parameters +to the \code{geom} part of the layer. An example of this is \code{stat_density(geom = "area", outline.type = "both")}. The geom's documentation lists which +parameters it can accept. \item Inversely, when constructing a layer using a -\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters -to the \code{stat} part of the layer. An example of this is -\code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation -lists which parameters it can accept. +\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters to +the \code{stat} part of the layer. An example of this is \code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists which parameters it +can accept. \item The \code{key_glyph} argument of \code{\link[=layer]{layer()}} may also be passed on through -\code{...}. This can be one of the functions described as -\link[=draw_key]{key glyphs}, to change the display of the layer in the legend. +\code{...}. This can be one of the functions described as \link[=draw_key]{key glyphs}, +to change the display of the layer in the legend. }} -\item{na.rm}{If \code{FALSE}, the default, missing values are removed with -a warning. If \code{TRUE}, missing values are silently removed.} +\item{na.rm}{If \code{FALSE}, the default, missing values are removed with a warning. If +\code{TRUE}, missing values are silently removed.} } \description{ This function adds geoms to a plot, but unlike a typical geom function, diff --git a/man/annotation_borders.Rd b/man/annotation_borders.Rd index 4133e0693e..198b44109c 100644 --- a/man/annotation_borders.Rd +++ b/man/annotation_borders.Rd @@ -43,57 +43,53 @@ an explanation.} \code{inherit.aes = TRUE} (the default), it is combined with the default mapping at the top level of the plot. You must supply \code{mapping} if there is no plot mapping.} - \item{\code{data}}{The data to be displayed in this layer. There are three -options: - -If \code{NULL}, the default, the data is inherited from the plot -data as specified in the call to \code{\link[=ggplot]{ggplot()}}. - -A \code{data.frame}, or other object, will override the plot -data. All objects will be fortified to produce a data frame. See -\code{\link[=fortify]{fortify()}} for which variables will be created. - -A \code{function} will be called with a single argument, -the plot data. The return value must be a \code{data.frame}, and -will be used as the layer data. A \code{function} can be created -from a \code{formula} (e.g. \code{~ head(.x, 10)}).} - \item{\code{stat}}{The statistical transformation to use on the data for this layer. -When using a \verb{geom_*()} function to construct a layer, the \code{stat} -argument can be used to override the default coupling between geoms and -stats. The \code{stat} argument accepts the following: + \item{\code{data}}{The data to be displayed in this layer. There are three options: +\itemize{ +\item \code{NULL} (default): the data is inherited from the plot data as specified +in the call to \code{\link[=ggplot]{ggplot()}}. +\item A \code{data.frame}, or other object, will override the plot data. All objects +will be fortified to produce a data frame. See \code{\link[=fortify]{fortify()}} for which +variables will be created. +\item A \code{function} will be called with a single argument, the plot data. The return +value must be a \code{data.frame}, and will be used as the layer data. A +\code{function} can be created from a \code{formula} (e.g. \code{~ head(.x, 10)}). +}} + \item{\code{stat}}{The statistical transformation to use on the data for this layer. When using +a \verb{geom_*()} function to construct a layer, the \code{stat} argument can be used +to override the default coupling between geoms and stats. The \code{stat} argument +accepts the following: \itemize{ \item A \code{Stat} ggproto subclass, for example \code{StatCount}. \item A string naming the stat. To give the stat as a string, strip the -function name of the \code{stat_} prefix. For example, to use \code{stat_count()}, -give the stat as \code{"count"}. +function name of the \code{stat_} prefix. For example, to use \code{stat_count()}, give +the stat as \code{"count"}. \item For more information and other ways to specify the stat, see the \link[=layer_stats]{layer stat} documentation. }} - \item{\code{position}}{A position adjustment to use on the data for this layer. This -can be used in various ways, including to prevent overplotting and -improving the display. The \code{position} argument accepts the following: + \item{\code{position}}{A position adjustment to use on the data for this layer. This can be used in +various ways, including to prevent overplotting and improving the display. +The \code{position} argument accepts the following: \itemize{ \item The result of calling a position function, such as \code{position_jitter()}. This method allows for passing extra arguments to the position. \item A string naming the position adjustment. To give the position as a -string, strip the function name of the \code{position_} prefix. For example, -to use \code{position_jitter()}, give the position as \code{"jitter"}. +string, strip the function name of the \code{position_} prefix. For example, to +use \code{position_jitter()}, give the position as \code{"jitter"}. \item For more information and other ways to specify the position, see the \link[=layer_positions]{layer position} documentation. }} - \item{\code{show.legend}}{logical. Should this layer be included in the legends? -\code{NA}, the default, includes if any aesthetics are mapped. -\code{FALSE} never includes, and \code{TRUE} always includes. -It can also be a named logical vector to finely select the aesthetics to -display. To include legend keys for all levels, even -when no data exists, use \code{TRUE}. If \code{NA}, all levels are shown in legend, -but unobserved levels are omitted.} - \item{\code{inherit.aes}}{If \code{FALSE}, overrides the default aesthetics, -rather than combining with them. This is most useful for helper functions -that define both data and aesthetics and shouldn't inherit behaviour from -the default plot specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} - \item{\code{na.rm}}{If \code{FALSE}, the default, missing values are removed with -a warning. If \code{TRUE}, missing values are silently removed.} + \item{\code{show.legend}}{Logical. Should this layer be included in the legends? \code{NA}, the default, +includes if any aesthetics are mapped. \code{FALSE} never includes, and \code{TRUE} +always includes. It can also be a named logical vector to finely select the +aesthetics to display. To include legend keys for all levels, even when no +data exists, use \code{TRUE}. If \code{NA}, all levels are shown in legend, but +unobserved levels are omitted.} + \item{\code{inherit.aes}}{If \code{FALSE}, overrides the default aesthetics, rather than combining with +them. This is most useful for helper functions that define both data and +aesthetics and shouldn't inherit behaviour from the default plot +specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} + \item{\code{na.rm}}{If \code{FALSE}, the default, missing values are removed with a warning. If +\code{TRUE}, missing values are silently removed.} }} } \description{ diff --git a/man/geom_abline.Rd b/man/geom_abline.Rd index 06392312b7..b18a03b929 100644 --- a/man/geom_abline.Rd +++ b/man/geom_abline.Rd @@ -45,87 +45,81 @@ geom_vline( \arguments{ \item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}.} -\item{data}{The data to be displayed in this layer. There are three -options: - -If \code{NULL}, the default, the data is inherited from the plot -data as specified in the call to \code{\link[=ggplot]{ggplot()}}. - -A \code{data.frame}, or other object, will override the plot -data. All objects will be fortified to produce a data frame. See -\code{\link[=fortify]{fortify()}} for which variables will be created. - -A \code{function} will be called with a single argument, -the plot data. The return value must be a \code{data.frame}, and -will be used as the layer data. A \code{function} can be created -from a \code{formula} (e.g. \code{~ head(.x, 10)}).} +\item{data}{The data to be displayed in this layer. There are three options: +\itemize{ +\item \code{NULL} (default): the data is inherited from the plot data as specified +in the call to \code{\link[=ggplot]{ggplot()}}. +\item A \code{data.frame}, or other object, will override the plot data. All objects +will be fortified to produce a data frame. See \code{\link[=fortify]{fortify()}} for which +variables will be created. +\item A \code{function} will be called with a single argument, the plot data. The return +value must be a \code{data.frame}, and will be used as the layer data. A +\code{function} can be created from a \code{formula} (e.g. \code{~ head(.x, 10)}). +}} -\item{stat}{The statistical transformation to use on the data for this layer. -When using a \verb{geom_*()} function to construct a layer, the \code{stat} -argument can be used to override the default coupling between geoms and -stats. The \code{stat} argument accepts the following: +\item{stat}{The statistical transformation to use on the data for this layer. When using +a \verb{geom_*()} function to construct a layer, the \code{stat} argument can be used +to override the default coupling between geoms and stats. The \code{stat} argument +accepts the following: \itemize{ \item A \code{Stat} ggproto subclass, for example \code{StatCount}. \item A string naming the stat. To give the stat as a string, strip the -function name of the \code{stat_} prefix. For example, to use \code{stat_count()}, -give the stat as \code{"count"}. +function name of the \code{stat_} prefix. For example, to use \code{stat_count()}, give +the stat as \code{"count"}. \item For more information and other ways to specify the stat, see the \link[=layer_stats]{layer stat} documentation. }} -\item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These -arguments broadly fall into one of 4 categories below. Notably, further -arguments to the \code{position} argument, or aesthetics that are required -can \emph{not} be passed through \code{...}. Unknown arguments that are not part -of the 4 categories below are ignored. +\item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These arguments +broadly fall into one of 4 categories below. Notably, further arguments to +the \code{position} argument, or aesthetics that are required can \emph{not} be passed +through \code{...}. Unknown arguments that are not part of the 4 categories below +are ignored. \itemize{ \item Static aesthetics that are not mapped to a scale, but are at a fixed -value and apply to the layer as a whole. For example, \code{colour = "red"} -or \code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} -section that lists the available options. The 'required' aesthetics -cannot be passed on to the \code{params}. Please note that while passing -unmapped aesthetics as vectors is technically possible, the order and -required length is not guaranteed to be parallel to the input data. +value and apply to the layer as a whole. For example, \code{colour = "red"} or +\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section that +lists the available options. The 'required' aesthetics cannot be passed on to +the \code{params}. Please note that while passing unmapped aesthetics as vectors +is technically possible, the order and required length is not guaranteed to +be parallel to the input data. \item When constructing a layer using -a \verb{stat_*()} function, the \code{...} argument can be used to pass on -parameters to the \code{geom} part of the layer. An example of this is -\code{stat_density(geom = "area", outline.type = "both")}. The geom's -documentation lists which parameters it can accept. +a \verb{stat_*()} function, the \code{...} argument can be used to pass on parameters +to the \code{geom} part of the layer. An example of this is \code{stat_density(geom = "area", outline.type = "both")}. The geom's documentation lists which +parameters it can accept. \item Inversely, when constructing a layer using a -\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters -to the \code{stat} part of the layer. An example of this is -\code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation -lists which parameters it can accept. +\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters to +the \code{stat} part of the layer. An example of this is \code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists which parameters it +can accept. \item The \code{key_glyph} argument of \code{\link[=layer]{layer()}} may also be passed on through -\code{...}. This can be one of the functions described as -\link[=draw_key]{key glyphs}, to change the display of the layer in the legend. +\code{...}. This can be one of the functions described as \link[=draw_key]{key glyphs}, +to change the display of the layer in the legend. }} -\item{na.rm}{If \code{FALSE}, the default, missing values are removed with -a warning. If \code{TRUE}, missing values are silently removed.} - -\item{show.legend}{logical. Should this layer be included in the legends? -\code{NA}, the default, includes if any aesthetics are mapped. -\code{FALSE} never includes, and \code{TRUE} always includes. -It can also be a named logical vector to finely select the aesthetics to -display. To include legend keys for all levels, even -when no data exists, use \code{TRUE}. If \code{NA}, all levels are shown in legend, -but unobserved levels are omitted.} - -\item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics, -rather than combining with them. This is most useful for helper functions -that define both data and aesthetics and shouldn't inherit behaviour from -the default plot specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} - -\item{position}{A position adjustment to use on the data for this layer. This -can be used in various ways, including to prevent overplotting and -improving the display. The \code{position} argument accepts the following: +\item{na.rm}{If \code{FALSE}, the default, missing values are removed with a warning. If +\code{TRUE}, missing values are silently removed.} + +\item{show.legend}{Logical. Should this layer be included in the legends? \code{NA}, the default, +includes if any aesthetics are mapped. \code{FALSE} never includes, and \code{TRUE} +always includes. It can also be a named logical vector to finely select the +aesthetics to display. To include legend keys for all levels, even when no +data exists, use \code{TRUE}. If \code{NA}, all levels are shown in legend, but +unobserved levels are omitted.} + +\item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics, rather than combining with +them. This is most useful for helper functions that define both data and +aesthetics and shouldn't inherit behaviour from the default plot +specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} + +\item{position}{A position adjustment to use on the data for this layer. This can be used in +various ways, including to prevent overplotting and improving the display. +The \code{position} argument accepts the following: \itemize{ \item The result of calling a position function, such as \code{position_jitter()}. This method allows for passing extra arguments to the position. \item A string naming the position adjustment. To give the position as a -string, strip the function name of the \code{position_} prefix. For example, -to use \code{position_jitter()}, give the position as \code{"jitter"}. +string, strip the function name of the \code{position_} prefix. For example, to +use \code{position_jitter()}, give the position as \code{"jitter"}. \item For more information and other ways to specify the position, see the \link[=layer_positions]{layer position} documentation. }} diff --git a/man/geom_bar.Rd b/man/geom_bar.Rd index c6573959ae..44b1831881 100644 --- a/man/geom_bar.Rd +++ b/man/geom_bar.Rd @@ -52,60 +52,55 @@ stat_count( at the top level of the plot. You must supply \code{mapping} if there is no plot mapping.} -\item{data}{The data to be displayed in this layer. There are three -options: - -If \code{NULL}, the default, the data is inherited from the plot -data as specified in the call to \code{\link[=ggplot]{ggplot()}}. - -A \code{data.frame}, or other object, will override the plot -data. All objects will be fortified to produce a data frame. See -\code{\link[=fortify]{fortify()}} for which variables will be created. - -A \code{function} will be called with a single argument, -the plot data. The return value must be a \code{data.frame}, and -will be used as the layer data. A \code{function} can be created -from a \code{formula} (e.g. \code{~ head(.x, 10)}).} +\item{data}{The data to be displayed in this layer. There are three options: +\itemize{ +\item \code{NULL} (default): the data is inherited from the plot data as specified +in the call to \code{\link[=ggplot]{ggplot()}}. +\item A \code{data.frame}, or other object, will override the plot data. All objects +will be fortified to produce a data frame. See \code{\link[=fortify]{fortify()}} for which +variables will be created. +\item A \code{function} will be called with a single argument, the plot data. The return +value must be a \code{data.frame}, and will be used as the layer data. A +\code{function} can be created from a \code{formula} (e.g. \code{~ head(.x, 10)}). +}} -\item{position}{A position adjustment to use on the data for this layer. This -can be used in various ways, including to prevent overplotting and -improving the display. The \code{position} argument accepts the following: +\item{position}{A position adjustment to use on the data for this layer. This can be used in +various ways, including to prevent overplotting and improving the display. +The \code{position} argument accepts the following: \itemize{ \item The result of calling a position function, such as \code{position_jitter()}. This method allows for passing extra arguments to the position. \item A string naming the position adjustment. To give the position as a -string, strip the function name of the \code{position_} prefix. For example, -to use \code{position_jitter()}, give the position as \code{"jitter"}. +string, strip the function name of the \code{position_} prefix. For example, to +use \code{position_jitter()}, give the position as \code{"jitter"}. \item For more information and other ways to specify the position, see the \link[=layer_positions]{layer position} documentation. }} -\item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These -arguments broadly fall into one of 4 categories below. Notably, further -arguments to the \code{position} argument, or aesthetics that are required -can \emph{not} be passed through \code{...}. Unknown arguments that are not part -of the 4 categories below are ignored. +\item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These arguments +broadly fall into one of 4 categories below. Notably, further arguments to +the \code{position} argument, or aesthetics that are required can \emph{not} be passed +through \code{...}. Unknown arguments that are not part of the 4 categories below +are ignored. \itemize{ \item Static aesthetics that are not mapped to a scale, but are at a fixed -value and apply to the layer as a whole. For example, \code{colour = "red"} -or \code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} -section that lists the available options. The 'required' aesthetics -cannot be passed on to the \code{params}. Please note that while passing -unmapped aesthetics as vectors is technically possible, the order and -required length is not guaranteed to be parallel to the input data. +value and apply to the layer as a whole. For example, \code{colour = "red"} or +\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section that +lists the available options. The 'required' aesthetics cannot be passed on to +the \code{params}. Please note that while passing unmapped aesthetics as vectors +is technically possible, the order and required length is not guaranteed to +be parallel to the input data. \item When constructing a layer using -a \verb{stat_*()} function, the \code{...} argument can be used to pass on -parameters to the \code{geom} part of the layer. An example of this is -\code{stat_density(geom = "area", outline.type = "both")}. The geom's -documentation lists which parameters it can accept. +a \verb{stat_*()} function, the \code{...} argument can be used to pass on parameters +to the \code{geom} part of the layer. An example of this is \code{stat_density(geom = "area", outline.type = "both")}. The geom's documentation lists which +parameters it can accept. \item Inversely, when constructing a layer using a -\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters -to the \code{stat} part of the layer. An example of this is -\code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation -lists which parameters it can accept. +\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters to +the \code{stat} part of the layer. An example of this is \code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists which parameters it +can accept. \item The \code{key_glyph} argument of \code{\link[=layer]{layer()}} may also be passed on through -\code{...}. This can be one of the functions described as -\link[=draw_key]{key glyphs}, to change the display of the layer in the legend. +\code{...}. This can be one of the functions described as \link[=draw_key]{key glyphs}, +to change the display of the layer in the legend. }} \item{just}{Adjustment for column placement. Set to \code{0.5} by default, meaning @@ -118,21 +113,20 @@ unintended behaviour when used with alternative positions, e.g. \item{linejoin}{Line join style (round, mitre, bevel).} -\item{na.rm}{If \code{FALSE}, the default, missing values are removed with -a warning. If \code{TRUE}, missing values are silently removed.} +\item{na.rm}{If \code{FALSE}, the default, missing values are removed with a warning. If +\code{TRUE}, missing values are silently removed.} -\item{show.legend}{logical. Should this layer be included in the legends? -\code{NA}, the default, includes if any aesthetics are mapped. -\code{FALSE} never includes, and \code{TRUE} always includes. -It can also be a named logical vector to finely select the aesthetics to -display. To include legend keys for all levels, even -when no data exists, use \code{TRUE}. If \code{NA}, all levels are shown in legend, -but unobserved levels are omitted.} +\item{show.legend}{Logical. Should this layer be included in the legends? \code{NA}, the default, +includes if any aesthetics are mapped. \code{FALSE} never includes, and \code{TRUE} +always includes. It can also be a named logical vector to finely select the +aesthetics to display. To include legend keys for all levels, even when no +data exists, use \code{TRUE}. If \code{NA}, all levels are shown in legend, but +unobserved levels are omitted.} -\item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics, -rather than combining with them. This is most useful for helper functions -that define both data and aesthetics and shouldn't inherit behaviour from -the default plot specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} +\item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics, rather than combining with +them. This is most useful for helper functions that define both data and +aesthetics and shouldn't inherit behaviour from the default plot +specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} \item{geom, stat}{Override the default connection between \code{geom_bar()} and \code{stat_count()}. For more information about overriding these connections, diff --git a/man/geom_bin_2d.Rd b/man/geom_bin_2d.Rd index 4d77521fcf..4493e037e6 100644 --- a/man/geom_bin_2d.Rd +++ b/man/geom_bin_2d.Rd @@ -44,81 +44,75 @@ stat_bin_2d( at the top level of the plot. You must supply \code{mapping} if there is no plot mapping.} -\item{data}{The data to be displayed in this layer. There are three -options: - -If \code{NULL}, the default, the data is inherited from the plot -data as specified in the call to \code{\link[=ggplot]{ggplot()}}. - -A \code{data.frame}, or other object, will override the plot -data. All objects will be fortified to produce a data frame. See -\code{\link[=fortify]{fortify()}} for which variables will be created. - -A \code{function} will be called with a single argument, -the plot data. The return value must be a \code{data.frame}, and -will be used as the layer data. A \code{function} can be created -from a \code{formula} (e.g. \code{~ head(.x, 10)}).} +\item{data}{The data to be displayed in this layer. There are three options: +\itemize{ +\item \code{NULL} (default): the data is inherited from the plot data as specified +in the call to \code{\link[=ggplot]{ggplot()}}. +\item A \code{data.frame}, or other object, will override the plot data. All objects +will be fortified to produce a data frame. See \code{\link[=fortify]{fortify()}} for which +variables will be created. +\item A \code{function} will be called with a single argument, the plot data. The return +value must be a \code{data.frame}, and will be used as the layer data. A +\code{function} can be created from a \code{formula} (e.g. \code{~ head(.x, 10)}). +}} -\item{position}{A position adjustment to use on the data for this layer. This -can be used in various ways, including to prevent overplotting and -improving the display. The \code{position} argument accepts the following: +\item{position}{A position adjustment to use on the data for this layer. This can be used in +various ways, including to prevent overplotting and improving the display. +The \code{position} argument accepts the following: \itemize{ \item The result of calling a position function, such as \code{position_jitter()}. This method allows for passing extra arguments to the position. \item A string naming the position adjustment. To give the position as a -string, strip the function name of the \code{position_} prefix. For example, -to use \code{position_jitter()}, give the position as \code{"jitter"}. +string, strip the function name of the \code{position_} prefix. For example, to +use \code{position_jitter()}, give the position as \code{"jitter"}. \item For more information and other ways to specify the position, see the \link[=layer_positions]{layer position} documentation. }} -\item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These -arguments broadly fall into one of 4 categories below. Notably, further -arguments to the \code{position} argument, or aesthetics that are required -can \emph{not} be passed through \code{...}. Unknown arguments that are not part -of the 4 categories below are ignored. +\item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These arguments +broadly fall into one of 4 categories below. Notably, further arguments to +the \code{position} argument, or aesthetics that are required can \emph{not} be passed +through \code{...}. Unknown arguments that are not part of the 4 categories below +are ignored. \itemize{ \item Static aesthetics that are not mapped to a scale, but are at a fixed -value and apply to the layer as a whole. For example, \code{colour = "red"} -or \code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} -section that lists the available options. The 'required' aesthetics -cannot be passed on to the \code{params}. Please note that while passing -unmapped aesthetics as vectors is technically possible, the order and -required length is not guaranteed to be parallel to the input data. +value and apply to the layer as a whole. For example, \code{colour = "red"} or +\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section that +lists the available options. The 'required' aesthetics cannot be passed on to +the \code{params}. Please note that while passing unmapped aesthetics as vectors +is technically possible, the order and required length is not guaranteed to +be parallel to the input data. \item When constructing a layer using -a \verb{stat_*()} function, the \code{...} argument can be used to pass on -parameters to the \code{geom} part of the layer. An example of this is -\code{stat_density(geom = "area", outline.type = "both")}. The geom's -documentation lists which parameters it can accept. +a \verb{stat_*()} function, the \code{...} argument can be used to pass on parameters +to the \code{geom} part of the layer. An example of this is \code{stat_density(geom = "area", outline.type = "both")}. The geom's documentation lists which +parameters it can accept. \item Inversely, when constructing a layer using a -\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters -to the \code{stat} part of the layer. An example of this is -\code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation -lists which parameters it can accept. +\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters to +the \code{stat} part of the layer. An example of this is \code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists which parameters it +can accept. \item The \code{key_glyph} argument of \code{\link[=layer]{layer()}} may also be passed on through -\code{...}. This can be one of the functions described as -\link[=draw_key]{key glyphs}, to change the display of the layer in the legend. +\code{...}. This can be one of the functions described as \link[=draw_key]{key glyphs}, +to change the display of the layer in the legend. }} \item{lineend}{Line end style (round, butt, square).} \item{linejoin}{Line join style (round, mitre, bevel).} -\item{na.rm}{If \code{FALSE}, the default, missing values are removed with -a warning. If \code{TRUE}, missing values are silently removed.} - -\item{show.legend}{logical. Should this layer be included in the legends? -\code{NA}, the default, includes if any aesthetics are mapped. -\code{FALSE} never includes, and \code{TRUE} always includes. -It can also be a named logical vector to finely select the aesthetics to -display. To include legend keys for all levels, even -when no data exists, use \code{TRUE}. If \code{NA}, all levels are shown in legend, -but unobserved levels are omitted.} - -\item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics, -rather than combining with them. This is most useful for helper functions -that define both data and aesthetics and shouldn't inherit behaviour from -the default plot specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} +\item{na.rm}{If \code{FALSE}, the default, missing values are removed with a warning. If +\code{TRUE}, missing values are silently removed.} + +\item{show.legend}{Logical. Should this layer be included in the legends? \code{NA}, the default, +includes if any aesthetics are mapped. \code{FALSE} never includes, and \code{TRUE} +always includes. It can also be a named logical vector to finely select the +aesthetics to display. To include legend keys for all levels, even when no +data exists, use \code{TRUE}. If \code{NA}, all levels are shown in legend, but +unobserved levels are omitted.} + +\item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics, rather than combining with +them. This is most useful for helper functions that define both data and +aesthetics and shouldn't inherit behaviour from the default plot +specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} \item{geom, stat}{Use to override the default connection between \code{geom_bin_2d()} and \code{stat_bin_2d()}. For more information about overriding diff --git a/man/geom_blank.Rd b/man/geom_blank.Rd index 51606bb14b..91cb3d6e3b 100644 --- a/man/geom_blank.Rd +++ b/man/geom_blank.Rd @@ -20,87 +20,81 @@ geom_blank( at the top level of the plot. You must supply \code{mapping} if there is no plot mapping.} -\item{data}{The data to be displayed in this layer. There are three -options: - -If \code{NULL}, the default, the data is inherited from the plot -data as specified in the call to \code{\link[=ggplot]{ggplot()}}. - -A \code{data.frame}, or other object, will override the plot -data. All objects will be fortified to produce a data frame. See -\code{\link[=fortify]{fortify()}} for which variables will be created. - -A \code{function} will be called with a single argument, -the plot data. The return value must be a \code{data.frame}, and -will be used as the layer data. A \code{function} can be created -from a \code{formula} (e.g. \code{~ head(.x, 10)}).} +\item{data}{The data to be displayed in this layer. There are three options: +\itemize{ +\item \code{NULL} (default): the data is inherited from the plot data as specified +in the call to \code{\link[=ggplot]{ggplot()}}. +\item A \code{data.frame}, or other object, will override the plot data. All objects +will be fortified to produce a data frame. See \code{\link[=fortify]{fortify()}} for which +variables will be created. +\item A \code{function} will be called with a single argument, the plot data. The return +value must be a \code{data.frame}, and will be used as the layer data. A +\code{function} can be created from a \code{formula} (e.g. \code{~ head(.x, 10)}). +}} -\item{stat}{The statistical transformation to use on the data for this layer. -When using a \verb{geom_*()} function to construct a layer, the \code{stat} -argument can be used to override the default coupling between geoms and -stats. The \code{stat} argument accepts the following: +\item{stat}{The statistical transformation to use on the data for this layer. When using +a \verb{geom_*()} function to construct a layer, the \code{stat} argument can be used +to override the default coupling between geoms and stats. The \code{stat} argument +accepts the following: \itemize{ \item A \code{Stat} ggproto subclass, for example \code{StatCount}. \item A string naming the stat. To give the stat as a string, strip the -function name of the \code{stat_} prefix. For example, to use \code{stat_count()}, -give the stat as \code{"count"}. +function name of the \code{stat_} prefix. For example, to use \code{stat_count()}, give +the stat as \code{"count"}. \item For more information and other ways to specify the stat, see the \link[=layer_stats]{layer stat} documentation. }} -\item{position}{A position adjustment to use on the data for this layer. This -can be used in various ways, including to prevent overplotting and -improving the display. The \code{position} argument accepts the following: +\item{position}{A position adjustment to use on the data for this layer. This can be used in +various ways, including to prevent overplotting and improving the display. +The \code{position} argument accepts the following: \itemize{ \item The result of calling a position function, such as \code{position_jitter()}. This method allows for passing extra arguments to the position. \item A string naming the position adjustment. To give the position as a -string, strip the function name of the \code{position_} prefix. For example, -to use \code{position_jitter()}, give the position as \code{"jitter"}. +string, strip the function name of the \code{position_} prefix. For example, to +use \code{position_jitter()}, give the position as \code{"jitter"}. \item For more information and other ways to specify the position, see the \link[=layer_positions]{layer position} documentation. }} -\item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These -arguments broadly fall into one of 4 categories below. Notably, further -arguments to the \code{position} argument, or aesthetics that are required -can \emph{not} be passed through \code{...}. Unknown arguments that are not part -of the 4 categories below are ignored. +\item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These arguments +broadly fall into one of 4 categories below. Notably, further arguments to +the \code{position} argument, or aesthetics that are required can \emph{not} be passed +through \code{...}. Unknown arguments that are not part of the 4 categories below +are ignored. \itemize{ \item Static aesthetics that are not mapped to a scale, but are at a fixed -value and apply to the layer as a whole. For example, \code{colour = "red"} -or \code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} -section that lists the available options. The 'required' aesthetics -cannot be passed on to the \code{params}. Please note that while passing -unmapped aesthetics as vectors is technically possible, the order and -required length is not guaranteed to be parallel to the input data. +value and apply to the layer as a whole. For example, \code{colour = "red"} or +\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section that +lists the available options. The 'required' aesthetics cannot be passed on to +the \code{params}. Please note that while passing unmapped aesthetics as vectors +is technically possible, the order and required length is not guaranteed to +be parallel to the input data. \item When constructing a layer using -a \verb{stat_*()} function, the \code{...} argument can be used to pass on -parameters to the \code{geom} part of the layer. An example of this is -\code{stat_density(geom = "area", outline.type = "both")}. The geom's -documentation lists which parameters it can accept. +a \verb{stat_*()} function, the \code{...} argument can be used to pass on parameters +to the \code{geom} part of the layer. An example of this is \code{stat_density(geom = "area", outline.type = "both")}. The geom's documentation lists which +parameters it can accept. \item Inversely, when constructing a layer using a -\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters -to the \code{stat} part of the layer. An example of this is -\code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation -lists which parameters it can accept. +\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters to +the \code{stat} part of the layer. An example of this is \code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists which parameters it +can accept. \item The \code{key_glyph} argument of \code{\link[=layer]{layer()}} may also be passed on through -\code{...}. This can be one of the functions described as -\link[=draw_key]{key glyphs}, to change the display of the layer in the legend. +\code{...}. This can be one of the functions described as \link[=draw_key]{key glyphs}, +to change the display of the layer in the legend. }} -\item{show.legend}{logical. Should this layer be included in the legends? -\code{NA}, the default, includes if any aesthetics are mapped. -\code{FALSE} never includes, and \code{TRUE} always includes. -It can also be a named logical vector to finely select the aesthetics to -display. To include legend keys for all levels, even -when no data exists, use \code{TRUE}. If \code{NA}, all levels are shown in legend, -but unobserved levels are omitted.} +\item{show.legend}{Logical. Should this layer be included in the legends? \code{NA}, the default, +includes if any aesthetics are mapped. \code{FALSE} never includes, and \code{TRUE} +always includes. It can also be a named logical vector to finely select the +aesthetics to display. To include legend keys for all levels, even when no +data exists, use \code{TRUE}. If \code{NA}, all levels are shown in legend, but +unobserved levels are omitted.} -\item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics, -rather than combining with them. This is most useful for helper functions -that define both data and aesthetics and shouldn't inherit behaviour from -the default plot specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} +\item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics, rather than combining with +them. This is most useful for helper functions that define both data and +aesthetics and shouldn't inherit behaviour from the default plot +specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} } \description{ The blank geom draws nothing, but can be a useful way of ensuring common diff --git a/man/geom_boxplot.Rd b/man/geom_boxplot.Rd index 9556904fd3..fb7b75b0b5 100644 --- a/man/geom_boxplot.Rd +++ b/man/geom_boxplot.Rd @@ -64,60 +64,55 @@ stat_boxplot( at the top level of the plot. You must supply \code{mapping} if there is no plot mapping.} -\item{data}{The data to be displayed in this layer. There are three -options: - -If \code{NULL}, the default, the data is inherited from the plot -data as specified in the call to \code{\link[=ggplot]{ggplot()}}. - -A \code{data.frame}, or other object, will override the plot -data. All objects will be fortified to produce a data frame. See -\code{\link[=fortify]{fortify()}} for which variables will be created. - -A \code{function} will be called with a single argument, -the plot data. The return value must be a \code{data.frame}, and -will be used as the layer data. A \code{function} can be created -from a \code{formula} (e.g. \code{~ head(.x, 10)}).} +\item{data}{The data to be displayed in this layer. There are three options: +\itemize{ +\item \code{NULL} (default): the data is inherited from the plot data as specified +in the call to \code{\link[=ggplot]{ggplot()}}. +\item A \code{data.frame}, or other object, will override the plot data. All objects +will be fortified to produce a data frame. See \code{\link[=fortify]{fortify()}} for which +variables will be created. +\item A \code{function} will be called with a single argument, the plot data. The return +value must be a \code{data.frame}, and will be used as the layer data. A +\code{function} can be created from a \code{formula} (e.g. \code{~ head(.x, 10)}). +}} -\item{position}{A position adjustment to use on the data for this layer. This -can be used in various ways, including to prevent overplotting and -improving the display. The \code{position} argument accepts the following: +\item{position}{A position adjustment to use on the data for this layer. This can be used in +various ways, including to prevent overplotting and improving the display. +The \code{position} argument accepts the following: \itemize{ \item The result of calling a position function, such as \code{position_jitter()}. This method allows for passing extra arguments to the position. \item A string naming the position adjustment. To give the position as a -string, strip the function name of the \code{position_} prefix. For example, -to use \code{position_jitter()}, give the position as \code{"jitter"}. +string, strip the function name of the \code{position_} prefix. For example, to +use \code{position_jitter()}, give the position as \code{"jitter"}. \item For more information and other ways to specify the position, see the \link[=layer_positions]{layer position} documentation. }} -\item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These -arguments broadly fall into one of 4 categories below. Notably, further -arguments to the \code{position} argument, or aesthetics that are required -can \emph{not} be passed through \code{...}. Unknown arguments that are not part -of the 4 categories below are ignored. +\item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These arguments +broadly fall into one of 4 categories below. Notably, further arguments to +the \code{position} argument, or aesthetics that are required can \emph{not} be passed +through \code{...}. Unknown arguments that are not part of the 4 categories below +are ignored. \itemize{ \item Static aesthetics that are not mapped to a scale, but are at a fixed -value and apply to the layer as a whole. For example, \code{colour = "red"} -or \code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} -section that lists the available options. The 'required' aesthetics -cannot be passed on to the \code{params}. Please note that while passing -unmapped aesthetics as vectors is technically possible, the order and -required length is not guaranteed to be parallel to the input data. +value and apply to the layer as a whole. For example, \code{colour = "red"} or +\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section that +lists the available options. The 'required' aesthetics cannot be passed on to +the \code{params}. Please note that while passing unmapped aesthetics as vectors +is technically possible, the order and required length is not guaranteed to +be parallel to the input data. \item When constructing a layer using -a \verb{stat_*()} function, the \code{...} argument can be used to pass on -parameters to the \code{geom} part of the layer. An example of this is -\code{stat_density(geom = "area", outline.type = "both")}. The geom's -documentation lists which parameters it can accept. +a \verb{stat_*()} function, the \code{...} argument can be used to pass on parameters +to the \code{geom} part of the layer. An example of this is \code{stat_density(geom = "area", outline.type = "both")}. The geom's documentation lists which +parameters it can accept. \item Inversely, when constructing a layer using a -\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters -to the \code{stat} part of the layer. An example of this is -\code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation -lists which parameters it can accept. +\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters to +the \code{stat} part of the layer. An example of this is \code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists which parameters it +can accept. \item The \code{key_glyph} argument of \code{\link[=layer]{layer()}} may also be passed on through -\code{...}. This can be one of the functions described as -\link[=draw_key]{key glyphs}, to change the display of the layer in the legend. +\code{...}. This can be one of the functions described as \link[=draw_key]{key glyphs}, +to change the display of the layer in the legend. }} \item{outliers}{Whether to display (\code{TRUE}) or discard (\code{FALSE}) outliers @@ -159,26 +154,25 @@ Staples mark the ends of the whiskers with a line.} square-roots of the number of observations in the groups (possibly weighted, using the \code{weight} aesthetic).} -\item{na.rm}{If \code{FALSE}, the default, missing values are removed with -a warning. If \code{TRUE}, missing values are silently removed.} +\item{na.rm}{If \code{FALSE}, the default, missing values are removed with a warning. If +\code{TRUE}, missing values are silently removed.} \item{orientation}{The orientation of the layer. The default (\code{NA}) automatically determines the orientation from the aesthetic mapping. In the rare event that this fails it can be given explicitly by setting \code{orientation} to either \code{"x"} or \code{"y"}. See the \emph{Orientation} section for more detail.} -\item{show.legend}{logical. Should this layer be included in the legends? -\code{NA}, the default, includes if any aesthetics are mapped. -\code{FALSE} never includes, and \code{TRUE} always includes. -It can also be a named logical vector to finely select the aesthetics to -display. To include legend keys for all levels, even -when no data exists, use \code{TRUE}. If \code{NA}, all levels are shown in legend, -but unobserved levels are omitted.} - -\item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics, -rather than combining with them. This is most useful for helper functions -that define both data and aesthetics and shouldn't inherit behaviour from -the default plot specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} +\item{show.legend}{Logical. Should this layer be included in the legends? \code{NA}, the default, +includes if any aesthetics are mapped. \code{FALSE} never includes, and \code{TRUE} +always includes. It can also be a named logical vector to finely select the +aesthetics to display. To include legend keys for all levels, even when no +data exists, use \code{TRUE}. If \code{NA}, all levels are shown in legend, but +unobserved levels are omitted.} + +\item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics, rather than combining with +them. This is most useful for helper functions that define both data and +aesthetics and shouldn't inherit behaviour from the default plot +specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} \item{geom, stat}{Use to override the default connection between \code{geom_boxplot()} and \code{stat_boxplot()}. For more information about diff --git a/man/geom_contour.Rd b/man/geom_contour.Rd index c1b4461a15..eb325d60e1 100644 --- a/man/geom_contour.Rd +++ b/man/geom_contour.Rd @@ -78,73 +78,68 @@ stat_contour_filled( at the top level of the plot. You must supply \code{mapping} if there is no plot mapping.} -\item{data}{The data to be displayed in this layer. There are three -options: - -If \code{NULL}, the default, the data is inherited from the plot -data as specified in the call to \code{\link[=ggplot]{ggplot()}}. - -A \code{data.frame}, or other object, will override the plot -data. All objects will be fortified to produce a data frame. See -\code{\link[=fortify]{fortify()}} for which variables will be created. - -A \code{function} will be called with a single argument, -the plot data. The return value must be a \code{data.frame}, and -will be used as the layer data. A \code{function} can be created -from a \code{formula} (e.g. \code{~ head(.x, 10)}).} +\item{data}{The data to be displayed in this layer. There are three options: +\itemize{ +\item \code{NULL} (default): the data is inherited from the plot data as specified +in the call to \code{\link[=ggplot]{ggplot()}}. +\item A \code{data.frame}, or other object, will override the plot data. All objects +will be fortified to produce a data frame. See \code{\link[=fortify]{fortify()}} for which +variables will be created. +\item A \code{function} will be called with a single argument, the plot data. The return +value must be a \code{data.frame}, and will be used as the layer data. A +\code{function} can be created from a \code{formula} (e.g. \code{~ head(.x, 10)}). +}} -\item{stat}{The statistical transformation to use on the data for this layer. -When using a \verb{geom_*()} function to construct a layer, the \code{stat} -argument can be used to override the default coupling between geoms and -stats. The \code{stat} argument accepts the following: +\item{stat}{The statistical transformation to use on the data for this layer. When using +a \verb{geom_*()} function to construct a layer, the \code{stat} argument can be used +to override the default coupling between geoms and stats. The \code{stat} argument +accepts the following: \itemize{ \item A \code{Stat} ggproto subclass, for example \code{StatCount}. \item A string naming the stat. To give the stat as a string, strip the -function name of the \code{stat_} prefix. For example, to use \code{stat_count()}, -give the stat as \code{"count"}. +function name of the \code{stat_} prefix. For example, to use \code{stat_count()}, give +the stat as \code{"count"}. \item For more information and other ways to specify the stat, see the \link[=layer_stats]{layer stat} documentation. }} -\item{position}{A position adjustment to use on the data for this layer. This -can be used in various ways, including to prevent overplotting and -improving the display. The \code{position} argument accepts the following: +\item{position}{A position adjustment to use on the data for this layer. This can be used in +various ways, including to prevent overplotting and improving the display. +The \code{position} argument accepts the following: \itemize{ \item The result of calling a position function, such as \code{position_jitter()}. This method allows for passing extra arguments to the position. \item A string naming the position adjustment. To give the position as a -string, strip the function name of the \code{position_} prefix. For example, -to use \code{position_jitter()}, give the position as \code{"jitter"}. +string, strip the function name of the \code{position_} prefix. For example, to +use \code{position_jitter()}, give the position as \code{"jitter"}. \item For more information and other ways to specify the position, see the \link[=layer_positions]{layer position} documentation. }} -\item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These -arguments broadly fall into one of 4 categories below. Notably, further -arguments to the \code{position} argument, or aesthetics that are required -can \emph{not} be passed through \code{...}. Unknown arguments that are not part -of the 4 categories below are ignored. +\item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These arguments +broadly fall into one of 4 categories below. Notably, further arguments to +the \code{position} argument, or aesthetics that are required can \emph{not} be passed +through \code{...}. Unknown arguments that are not part of the 4 categories below +are ignored. \itemize{ \item Static aesthetics that are not mapped to a scale, but are at a fixed -value and apply to the layer as a whole. For example, \code{colour = "red"} -or \code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} -section that lists the available options. The 'required' aesthetics -cannot be passed on to the \code{params}. Please note that while passing -unmapped aesthetics as vectors is technically possible, the order and -required length is not guaranteed to be parallel to the input data. +value and apply to the layer as a whole. For example, \code{colour = "red"} or +\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section that +lists the available options. The 'required' aesthetics cannot be passed on to +the \code{params}. Please note that while passing unmapped aesthetics as vectors +is technically possible, the order and required length is not guaranteed to +be parallel to the input data. \item When constructing a layer using -a \verb{stat_*()} function, the \code{...} argument can be used to pass on -parameters to the \code{geom} part of the layer. An example of this is -\code{stat_density(geom = "area", outline.type = "both")}. The geom's -documentation lists which parameters it can accept. +a \verb{stat_*()} function, the \code{...} argument can be used to pass on parameters +to the \code{geom} part of the layer. An example of this is \code{stat_density(geom = "area", outline.type = "both")}. The geom's documentation lists which +parameters it can accept. \item Inversely, when constructing a layer using a -\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters -to the \code{stat} part of the layer. An example of this is -\code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation -lists which parameters it can accept. +\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters to +the \code{stat} part of the layer. An example of this is \code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists which parameters it +can accept. \item The \code{key_glyph} argument of \code{\link[=layer]{layer()}} may also be passed on through -\code{...}. This can be one of the functions described as -\link[=draw_key]{key glyphs}, to change the display of the layer in the legend. +\code{...}. This can be one of the functions described as \link[=draw_key]{key glyphs}, +to change the display of the layer in the legend. }} \item{bins}{Number of contour bins. Overridden by \code{breaks}.} @@ -173,36 +168,35 @@ means use \code{colour} aesthetic.} \item{linemitre}{Line mitre limit (number greater than 1).} -\item{na.rm}{If \code{FALSE}, the default, missing values are removed with -a warning. If \code{TRUE}, missing values are silently removed.} +\item{na.rm}{If \code{FALSE}, the default, missing values are removed with a warning. If +\code{TRUE}, missing values are silently removed.} -\item{show.legend}{logical. Should this layer be included in the legends? -\code{NA}, the default, includes if any aesthetics are mapped. -\code{FALSE} never includes, and \code{TRUE} always includes. -It can also be a named logical vector to finely select the aesthetics to -display. To include legend keys for all levels, even -when no data exists, use \code{TRUE}. If \code{NA}, all levels are shown in legend, -but unobserved levels are omitted.} +\item{show.legend}{Logical. Should this layer be included in the legends? \code{NA}, the default, +includes if any aesthetics are mapped. \code{FALSE} never includes, and \code{TRUE} +always includes. It can also be a named logical vector to finely select the +aesthetics to display. To include legend keys for all levels, even when no +data exists, use \code{TRUE}. If \code{NA}, all levels are shown in legend, but +unobserved levels are omitted.} -\item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics, -rather than combining with them. This is most useful for helper functions -that define both data and aesthetics and shouldn't inherit behaviour from -the default plot specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} +\item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics, rather than combining with +them. This is most useful for helper functions that define both data and +aesthetics and shouldn't inherit behaviour from the default plot +specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} \item{rule}{Either \code{"evenodd"} or \code{"winding"}. If polygons with holes are being drawn (using the \code{subgroup} aesthetic) this argument defines how the hole coordinates are interpreted. See the examples in \code{\link[grid:grid.path]{grid::pathGrob()}} for an explanation.} -\item{geom}{The geometric object to use to display the data for this layer. -When using a \verb{stat_*()} function to construct a layer, the \code{geom} argument -can be used to override the default coupling between stats and geoms. The -\code{geom} argument accepts the following: +\item{geom}{The geometric object to use to display the data for this layer. When using a +\verb{stat_*()} function to construct a layer, the \code{geom} argument can be used to +override the default coupling between stats and geoms. The \code{geom} argument +accepts the following: \itemize{ \item A \code{Geom} ggproto subclass, for example \code{GeomPoint}. \item A string naming the geom. To give the geom as a string, strip the -function name of the \code{geom_} prefix. For example, to use \code{geom_point()}, -give the geom as \code{"point"}. +function name of the \code{geom_} prefix. For example, to use \code{geom_point()}, give +the geom as \code{"point"}. \item For more information and other ways to specify the geom, see the \link[=layer_geoms]{layer geom} documentation. }} diff --git a/man/geom_count.Rd b/man/geom_count.Rd index 50493992df..c0242b91b3 100644 --- a/man/geom_count.Rd +++ b/man/geom_count.Rd @@ -33,77 +33,71 @@ stat_sum( at the top level of the plot. You must supply \code{mapping} if there is no plot mapping.} -\item{data}{The data to be displayed in this layer. There are three -options: - -If \code{NULL}, the default, the data is inherited from the plot -data as specified in the call to \code{\link[=ggplot]{ggplot()}}. - -A \code{data.frame}, or other object, will override the plot -data. All objects will be fortified to produce a data frame. See -\code{\link[=fortify]{fortify()}} for which variables will be created. - -A \code{function} will be called with a single argument, -the plot data. The return value must be a \code{data.frame}, and -will be used as the layer data. A \code{function} can be created -from a \code{formula} (e.g. \code{~ head(.x, 10)}).} +\item{data}{The data to be displayed in this layer. There are three options: +\itemize{ +\item \code{NULL} (default): the data is inherited from the plot data as specified +in the call to \code{\link[=ggplot]{ggplot()}}. +\item A \code{data.frame}, or other object, will override the plot data. All objects +will be fortified to produce a data frame. See \code{\link[=fortify]{fortify()}} for which +variables will be created. +\item A \code{function} will be called with a single argument, the plot data. The return +value must be a \code{data.frame}, and will be used as the layer data. A +\code{function} can be created from a \code{formula} (e.g. \code{~ head(.x, 10)}). +}} -\item{position}{A position adjustment to use on the data for this layer. This -can be used in various ways, including to prevent overplotting and -improving the display. The \code{position} argument accepts the following: +\item{position}{A position adjustment to use on the data for this layer. This can be used in +various ways, including to prevent overplotting and improving the display. +The \code{position} argument accepts the following: \itemize{ \item The result of calling a position function, such as \code{position_jitter()}. This method allows for passing extra arguments to the position. \item A string naming the position adjustment. To give the position as a -string, strip the function name of the \code{position_} prefix. For example, -to use \code{position_jitter()}, give the position as \code{"jitter"}. +string, strip the function name of the \code{position_} prefix. For example, to +use \code{position_jitter()}, give the position as \code{"jitter"}. \item For more information and other ways to specify the position, see the \link[=layer_positions]{layer position} documentation. }} -\item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These -arguments broadly fall into one of 4 categories below. Notably, further -arguments to the \code{position} argument, or aesthetics that are required -can \emph{not} be passed through \code{...}. Unknown arguments that are not part -of the 4 categories below are ignored. +\item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These arguments +broadly fall into one of 4 categories below. Notably, further arguments to +the \code{position} argument, or aesthetics that are required can \emph{not} be passed +through \code{...}. Unknown arguments that are not part of the 4 categories below +are ignored. \itemize{ \item Static aesthetics that are not mapped to a scale, but are at a fixed -value and apply to the layer as a whole. For example, \code{colour = "red"} -or \code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} -section that lists the available options. The 'required' aesthetics -cannot be passed on to the \code{params}. Please note that while passing -unmapped aesthetics as vectors is technically possible, the order and -required length is not guaranteed to be parallel to the input data. +value and apply to the layer as a whole. For example, \code{colour = "red"} or +\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section that +lists the available options. The 'required' aesthetics cannot be passed on to +the \code{params}. Please note that while passing unmapped aesthetics as vectors +is technically possible, the order and required length is not guaranteed to +be parallel to the input data. \item When constructing a layer using -a \verb{stat_*()} function, the \code{...} argument can be used to pass on -parameters to the \code{geom} part of the layer. An example of this is -\code{stat_density(geom = "area", outline.type = "both")}. The geom's -documentation lists which parameters it can accept. +a \verb{stat_*()} function, the \code{...} argument can be used to pass on parameters +to the \code{geom} part of the layer. An example of this is \code{stat_density(geom = "area", outline.type = "both")}. The geom's documentation lists which +parameters it can accept. \item Inversely, when constructing a layer using a -\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters -to the \code{stat} part of the layer. An example of this is -\code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation -lists which parameters it can accept. +\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters to +the \code{stat} part of the layer. An example of this is \code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists which parameters it +can accept. \item The \code{key_glyph} argument of \code{\link[=layer]{layer()}} may also be passed on through -\code{...}. This can be one of the functions described as -\link[=draw_key]{key glyphs}, to change the display of the layer in the legend. +\code{...}. This can be one of the functions described as \link[=draw_key]{key glyphs}, +to change the display of the layer in the legend. }} -\item{na.rm}{If \code{FALSE}, the default, missing values are removed with -a warning. If \code{TRUE}, missing values are silently removed.} - -\item{show.legend}{logical. Should this layer be included in the legends? -\code{NA}, the default, includes if any aesthetics are mapped. -\code{FALSE} never includes, and \code{TRUE} always includes. -It can also be a named logical vector to finely select the aesthetics to -display. To include legend keys for all levels, even -when no data exists, use \code{TRUE}. If \code{NA}, all levels are shown in legend, -but unobserved levels are omitted.} - -\item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics, -rather than combining with them. This is most useful for helper functions -that define both data and aesthetics and shouldn't inherit behaviour from -the default plot specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} +\item{na.rm}{If \code{FALSE}, the default, missing values are removed with a warning. If +\code{TRUE}, missing values are silently removed.} + +\item{show.legend}{Logical. Should this layer be included in the legends? \code{NA}, the default, +includes if any aesthetics are mapped. \code{FALSE} never includes, and \code{TRUE} +always includes. It can also be a named logical vector to finely select the +aesthetics to display. To include legend keys for all levels, even when no +data exists, use \code{TRUE}. If \code{NA}, all levels are shown in legend, but +unobserved levels are omitted.} + +\item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics, rather than combining with +them. This is most useful for helper functions that define both data and +aesthetics and shouldn't inherit behaviour from the default plot +specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} \item{geom, stat}{Use to override the default connection between \code{geom_count()} and \code{stat_sum()}. For more information about overriding diff --git a/man/geom_density.Rd b/man/geom_density.Rd index 30ec7391c7..ec6181b54d 100644 --- a/man/geom_density.Rd +++ b/man/geom_density.Rd @@ -44,60 +44,55 @@ stat_density( at the top level of the plot. You must supply \code{mapping} if there is no plot mapping.} -\item{data}{The data to be displayed in this layer. There are three -options: - -If \code{NULL}, the default, the data is inherited from the plot -data as specified in the call to \code{\link[=ggplot]{ggplot()}}. - -A \code{data.frame}, or other object, will override the plot -data. All objects will be fortified to produce a data frame. See -\code{\link[=fortify]{fortify()}} for which variables will be created. - -A \code{function} will be called with a single argument, -the plot data. The return value must be a \code{data.frame}, and -will be used as the layer data. A \code{function} can be created -from a \code{formula} (e.g. \code{~ head(.x, 10)}).} +\item{data}{The data to be displayed in this layer. There are three options: +\itemize{ +\item \code{NULL} (default): the data is inherited from the plot data as specified +in the call to \code{\link[=ggplot]{ggplot()}}. +\item A \code{data.frame}, or other object, will override the plot data. All objects +will be fortified to produce a data frame. See \code{\link[=fortify]{fortify()}} for which +variables will be created. +\item A \code{function} will be called with a single argument, the plot data. The return +value must be a \code{data.frame}, and will be used as the layer data. A +\code{function} can be created from a \code{formula} (e.g. \code{~ head(.x, 10)}). +}} -\item{position}{A position adjustment to use on the data for this layer. This -can be used in various ways, including to prevent overplotting and -improving the display. The \code{position} argument accepts the following: +\item{position}{A position adjustment to use on the data for this layer. This can be used in +various ways, including to prevent overplotting and improving the display. +The \code{position} argument accepts the following: \itemize{ \item The result of calling a position function, such as \code{position_jitter()}. This method allows for passing extra arguments to the position. \item A string naming the position adjustment. To give the position as a -string, strip the function name of the \code{position_} prefix. For example, -to use \code{position_jitter()}, give the position as \code{"jitter"}. +string, strip the function name of the \code{position_} prefix. For example, to +use \code{position_jitter()}, give the position as \code{"jitter"}. \item For more information and other ways to specify the position, see the \link[=layer_positions]{layer position} documentation. }} -\item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These -arguments broadly fall into one of 4 categories below. Notably, further -arguments to the \code{position} argument, or aesthetics that are required -can \emph{not} be passed through \code{...}. Unknown arguments that are not part -of the 4 categories below are ignored. +\item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These arguments +broadly fall into one of 4 categories below. Notably, further arguments to +the \code{position} argument, or aesthetics that are required can \emph{not} be passed +through \code{...}. Unknown arguments that are not part of the 4 categories below +are ignored. \itemize{ \item Static aesthetics that are not mapped to a scale, but are at a fixed -value and apply to the layer as a whole. For example, \code{colour = "red"} -or \code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} -section that lists the available options. The 'required' aesthetics -cannot be passed on to the \code{params}. Please note that while passing -unmapped aesthetics as vectors is technically possible, the order and -required length is not guaranteed to be parallel to the input data. +value and apply to the layer as a whole. For example, \code{colour = "red"} or +\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section that +lists the available options. The 'required' aesthetics cannot be passed on to +the \code{params}. Please note that while passing unmapped aesthetics as vectors +is technically possible, the order and required length is not guaranteed to +be parallel to the input data. \item When constructing a layer using -a \verb{stat_*()} function, the \code{...} argument can be used to pass on -parameters to the \code{geom} part of the layer. An example of this is -\code{stat_density(geom = "area", outline.type = "both")}. The geom's -documentation lists which parameters it can accept. +a \verb{stat_*()} function, the \code{...} argument can be used to pass on parameters +to the \code{geom} part of the layer. An example of this is \code{stat_density(geom = "area", outline.type = "both")}. The geom's documentation lists which +parameters it can accept. \item Inversely, when constructing a layer using a -\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters -to the \code{stat} part of the layer. An example of this is -\code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation -lists which parameters it can accept. +\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters to +the \code{stat} part of the layer. An example of this is \code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists which parameters it +can accept. \item The \code{key_glyph} argument of \code{\link[=layer]{layer()}} may also be passed on through -\code{...}. This can be one of the functions described as -\link[=draw_key]{key glyphs}, to change the display of the layer in the legend. +\code{...}. This can be one of the functions described as \link[=draw_key]{key glyphs}, +to change the display of the layer in the legend. }} \item{outline.type}{Type of the outline of the area; \code{"both"} draws both the @@ -110,21 +105,20 @@ upper and lower lines, \code{"upper"}/\code{"lower"} draws the respective lines \item{linemitre}{Line mitre limit (number greater than 1).} -\item{na.rm}{If \code{FALSE}, the default, missing values are removed with -a warning. If \code{TRUE}, missing values are silently removed.} - -\item{show.legend}{logical. Should this layer be included in the legends? -\code{NA}, the default, includes if any aesthetics are mapped. -\code{FALSE} never includes, and \code{TRUE} always includes. -It can also be a named logical vector to finely select the aesthetics to -display. To include legend keys for all levels, even -when no data exists, use \code{TRUE}. If \code{NA}, all levels are shown in legend, -but unobserved levels are omitted.} - -\item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics, -rather than combining with them. This is most useful for helper functions -that define both data and aesthetics and shouldn't inherit behaviour from -the default plot specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} +\item{na.rm}{If \code{FALSE}, the default, missing values are removed with a warning. If +\code{TRUE}, missing values are silently removed.} + +\item{show.legend}{Logical. Should this layer be included in the legends? \code{NA}, the default, +includes if any aesthetics are mapped. \code{FALSE} never includes, and \code{TRUE} +always includes. It can also be a named logical vector to finely select the +aesthetics to display. To include legend keys for all levels, even when no +data exists, use \code{TRUE}. If \code{NA}, all levels are shown in legend, but +unobserved levels are omitted.} + +\item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics, rather than combining with +them. This is most useful for helper functions that define both data and +aesthetics and shouldn't inherit behaviour from the default plot +specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} \item{geom, stat}{Use to override the default connection between \code{geom_density()} and \code{stat_density()}. For more information about diff --git a/man/geom_density_2d.Rd b/man/geom_density_2d.Rd index 95b9cc3bac..6af5a9f459 100644 --- a/man/geom_density_2d.Rd +++ b/man/geom_density_2d.Rd @@ -76,30 +76,27 @@ stat_density_2d_filled( at the top level of the plot. You must supply \code{mapping} if there is no plot mapping.} -\item{data}{The data to be displayed in this layer. There are three -options: - -If \code{NULL}, the default, the data is inherited from the plot -data as specified in the call to \code{\link[=ggplot]{ggplot()}}. - -A \code{data.frame}, or other object, will override the plot -data. All objects will be fortified to produce a data frame. See -\code{\link[=fortify]{fortify()}} for which variables will be created. - -A \code{function} will be called with a single argument, -the plot data. The return value must be a \code{data.frame}, and -will be used as the layer data. A \code{function} can be created -from a \code{formula} (e.g. \code{~ head(.x, 10)}).} +\item{data}{The data to be displayed in this layer. There are three options: +\itemize{ +\item \code{NULL} (default): the data is inherited from the plot data as specified +in the call to \code{\link[=ggplot]{ggplot()}}. +\item A \code{data.frame}, or other object, will override the plot data. All objects +will be fortified to produce a data frame. See \code{\link[=fortify]{fortify()}} for which +variables will be created. +\item A \code{function} will be called with a single argument, the plot data. The return +value must be a \code{data.frame}, and will be used as the layer data. A +\code{function} can be created from a \code{formula} (e.g. \code{~ head(.x, 10)}). +}} -\item{position}{A position adjustment to use on the data for this layer. This -can be used in various ways, including to prevent overplotting and -improving the display. The \code{position} argument accepts the following: +\item{position}{A position adjustment to use on the data for this layer. This can be used in +various ways, including to prevent overplotting and improving the display. +The \code{position} argument accepts the following: \itemize{ \item The result of calling a position function, such as \code{position_jitter()}. This method allows for passing extra arguments to the position. \item A string naming the position adjustment. To give the position as a -string, strip the function name of the \code{position_} prefix. For example, -to use \code{position_jitter()}, give the position as \code{"jitter"}. +string, strip the function name of the \code{position_} prefix. For example, to +use \code{position_jitter()}, give the position as \code{"jitter"}. \item For more information and other ways to specify the position, see the \link[=layer_positions]{layer position} documentation. }} @@ -131,21 +128,20 @@ on computed variables for details.} \item{linemitre}{Line mitre limit (number greater than 1).} -\item{na.rm}{If \code{FALSE}, the default, missing values are removed with -a warning. If \code{TRUE}, missing values are silently removed.} - -\item{show.legend}{logical. Should this layer be included in the legends? -\code{NA}, the default, includes if any aesthetics are mapped. -\code{FALSE} never includes, and \code{TRUE} always includes. -It can also be a named logical vector to finely select the aesthetics to -display. To include legend keys for all levels, even -when no data exists, use \code{TRUE}. If \code{NA}, all levels are shown in legend, -but unobserved levels are omitted.} - -\item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics, -rather than combining with them. This is most useful for helper functions -that define both data and aesthetics and shouldn't inherit behaviour from -the default plot specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} +\item{na.rm}{If \code{FALSE}, the default, missing values are removed with a warning. If +\code{TRUE}, missing values are silently removed.} + +\item{show.legend}{Logical. Should this layer be included in the legends? \code{NA}, the default, +includes if any aesthetics are mapped. \code{FALSE} never includes, and \code{TRUE} +always includes. It can also be a named logical vector to finely select the +aesthetics to display. To include legend keys for all levels, even when no +data exists, use \code{TRUE}. If \code{NA}, all levels are shown in legend, but +unobserved levels are omitted.} + +\item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics, rather than combining with +them. This is most useful for helper functions that define both data and +aesthetics and shouldn't inherit behaviour from the default plot +specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} \item{geom, stat}{Use to override the default connection between \code{geom_density_2d()} and \code{stat_density_2d()}. For more information at diff --git a/man/geom_dotplot.Rd b/man/geom_dotplot.Rd index ff8972de22..0587e53510 100644 --- a/man/geom_dotplot.Rd +++ b/man/geom_dotplot.Rd @@ -32,60 +32,55 @@ geom_dotplot( at the top level of the plot. You must supply \code{mapping} if there is no plot mapping.} -\item{data}{The data to be displayed in this layer. There are three -options: - -If \code{NULL}, the default, the data is inherited from the plot -data as specified in the call to \code{\link[=ggplot]{ggplot()}}. - -A \code{data.frame}, or other object, will override the plot -data. All objects will be fortified to produce a data frame. See -\code{\link[=fortify]{fortify()}} for which variables will be created. - -A \code{function} will be called with a single argument, -the plot data. The return value must be a \code{data.frame}, and -will be used as the layer data. A \code{function} can be created -from a \code{formula} (e.g. \code{~ head(.x, 10)}).} +\item{data}{The data to be displayed in this layer. There are three options: +\itemize{ +\item \code{NULL} (default): the data is inherited from the plot data as specified +in the call to \code{\link[=ggplot]{ggplot()}}. +\item A \code{data.frame}, or other object, will override the plot data. All objects +will be fortified to produce a data frame. See \code{\link[=fortify]{fortify()}} for which +variables will be created. +\item A \code{function} will be called with a single argument, the plot data. The return +value must be a \code{data.frame}, and will be used as the layer data. A +\code{function} can be created from a \code{formula} (e.g. \code{~ head(.x, 10)}). +}} -\item{position}{A position adjustment to use on the data for this layer. This -can be used in various ways, including to prevent overplotting and -improving the display. The \code{position} argument accepts the following: +\item{position}{A position adjustment to use on the data for this layer. This can be used in +various ways, including to prevent overplotting and improving the display. +The \code{position} argument accepts the following: \itemize{ \item The result of calling a position function, such as \code{position_jitter()}. This method allows for passing extra arguments to the position. \item A string naming the position adjustment. To give the position as a -string, strip the function name of the \code{position_} prefix. For example, -to use \code{position_jitter()}, give the position as \code{"jitter"}. +string, strip the function name of the \code{position_} prefix. For example, to +use \code{position_jitter()}, give the position as \code{"jitter"}. \item For more information and other ways to specify the position, see the \link[=layer_positions]{layer position} documentation. }} -\item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These -arguments broadly fall into one of 4 categories below. Notably, further -arguments to the \code{position} argument, or aesthetics that are required -can \emph{not} be passed through \code{...}. Unknown arguments that are not part -of the 4 categories below are ignored. +\item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These arguments +broadly fall into one of 4 categories below. Notably, further arguments to +the \code{position} argument, or aesthetics that are required can \emph{not} be passed +through \code{...}. Unknown arguments that are not part of the 4 categories below +are ignored. \itemize{ \item Static aesthetics that are not mapped to a scale, but are at a fixed -value and apply to the layer as a whole. For example, \code{colour = "red"} -or \code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} -section that lists the available options. The 'required' aesthetics -cannot be passed on to the \code{params}. Please note that while passing -unmapped aesthetics as vectors is technically possible, the order and -required length is not guaranteed to be parallel to the input data. +value and apply to the layer as a whole. For example, \code{colour = "red"} or +\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section that +lists the available options. The 'required' aesthetics cannot be passed on to +the \code{params}. Please note that while passing unmapped aesthetics as vectors +is technically possible, the order and required length is not guaranteed to +be parallel to the input data. \item When constructing a layer using -a \verb{stat_*()} function, the \code{...} argument can be used to pass on -parameters to the \code{geom} part of the layer. An example of this is -\code{stat_density(geom = "area", outline.type = "both")}. The geom's -documentation lists which parameters it can accept. +a \verb{stat_*()} function, the \code{...} argument can be used to pass on parameters +to the \code{geom} part of the layer. An example of this is \code{stat_density(geom = "area", outline.type = "both")}. The geom's documentation lists which +parameters it can accept. \item Inversely, when constructing a layer using a -\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters -to the \code{stat} part of the layer. An example of this is -\code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation -lists which parameters it can accept. +\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters to +the \code{stat} part of the layer. An example of this is \code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists which parameters it +can accept. \item The \code{key_glyph} argument of \code{\link[=layer]{layer()}} may also be passed on through -\code{...}. This can be one of the functions described as -\link[=draw_key]{key glyphs}, to change the display of the layer in the legend. +\code{...}. This can be one of the functions described as \link[=draw_key]{key glyphs}, +to change the display of the layer in the legend. }} \item{binwidth}{When \code{method} is "dotdensity", this specifies maximum bin @@ -124,21 +119,20 @@ for dodging.} \item{drop}{If TRUE, remove all bins with zero counts} -\item{na.rm}{If \code{FALSE}, the default, missing values are removed with -a warning. If \code{TRUE}, missing values are silently removed.} - -\item{show.legend}{logical. Should this layer be included in the legends? -\code{NA}, the default, includes if any aesthetics are mapped. -\code{FALSE} never includes, and \code{TRUE} always includes. -It can also be a named logical vector to finely select the aesthetics to -display. To include legend keys for all levels, even -when no data exists, use \code{TRUE}. If \code{NA}, all levels are shown in legend, -but unobserved levels are omitted.} - -\item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics, -rather than combining with them. This is most useful for helper functions -that define both data and aesthetics and shouldn't inherit behaviour from -the default plot specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} +\item{na.rm}{If \code{FALSE}, the default, missing values are removed with a warning. If +\code{TRUE}, missing values are silently removed.} + +\item{show.legend}{Logical. Should this layer be included in the legends? \code{NA}, the default, +includes if any aesthetics are mapped. \code{FALSE} never includes, and \code{TRUE} +always includes. It can also be a named logical vector to finely select the +aesthetics to display. To include legend keys for all levels, even when no +data exists, use \code{TRUE}. If \code{NA}, all levels are shown in legend, but +unobserved levels are omitted.} + +\item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics, rather than combining with +them. This is most useful for helper functions that define both data and +aesthetics and shouldn't inherit behaviour from the default plot +specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} } \description{ In a dot plot, the width of a dot corresponds to the bin width diff --git a/man/geom_function.Rd b/man/geom_function.Rd index 379aa7a382..2522947675 100644 --- a/man/geom_function.Rd +++ b/man/geom_function.Rd @@ -44,58 +44,56 @@ mapping.} \item{data}{Ignored by \code{stat_function()}, do not use.} -\item{stat}{The statistical transformation to use on the data for this layer. -When using a \verb{geom_*()} function to construct a layer, the \code{stat} -argument can be used to override the default coupling between geoms and -stats. The \code{stat} argument accepts the following: +\item{stat}{The statistical transformation to use on the data for this layer. When using +a \verb{geom_*()} function to construct a layer, the \code{stat} argument can be used +to override the default coupling between geoms and stats. The \code{stat} argument +accepts the following: \itemize{ \item A \code{Stat} ggproto subclass, for example \code{StatCount}. \item A string naming the stat. To give the stat as a string, strip the -function name of the \code{stat_} prefix. For example, to use \code{stat_count()}, -give the stat as \code{"count"}. +function name of the \code{stat_} prefix. For example, to use \code{stat_count()}, give +the stat as \code{"count"}. \item For more information and other ways to specify the stat, see the \link[=layer_stats]{layer stat} documentation. }} -\item{position}{A position adjustment to use on the data for this layer. This -can be used in various ways, including to prevent overplotting and -improving the display. The \code{position} argument accepts the following: +\item{position}{A position adjustment to use on the data for this layer. This can be used in +various ways, including to prevent overplotting and improving the display. +The \code{position} argument accepts the following: \itemize{ \item The result of calling a position function, such as \code{position_jitter()}. This method allows for passing extra arguments to the position. \item A string naming the position adjustment. To give the position as a -string, strip the function name of the \code{position_} prefix. For example, -to use \code{position_jitter()}, give the position as \code{"jitter"}. +string, strip the function name of the \code{position_} prefix. For example, to +use \code{position_jitter()}, give the position as \code{"jitter"}. \item For more information and other ways to specify the position, see the \link[=layer_positions]{layer position} documentation. }} -\item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These -arguments broadly fall into one of 4 categories below. Notably, further -arguments to the \code{position} argument, or aesthetics that are required -can \emph{not} be passed through \code{...}. Unknown arguments that are not part -of the 4 categories below are ignored. +\item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These arguments +broadly fall into one of 4 categories below. Notably, further arguments to +the \code{position} argument, or aesthetics that are required can \emph{not} be passed +through \code{...}. Unknown arguments that are not part of the 4 categories below +are ignored. \itemize{ \item Static aesthetics that are not mapped to a scale, but are at a fixed -value and apply to the layer as a whole. For example, \code{colour = "red"} -or \code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} -section that lists the available options. The 'required' aesthetics -cannot be passed on to the \code{params}. Please note that while passing -unmapped aesthetics as vectors is technically possible, the order and -required length is not guaranteed to be parallel to the input data. +value and apply to the layer as a whole. For example, \code{colour = "red"} or +\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section that +lists the available options. The 'required' aesthetics cannot be passed on to +the \code{params}. Please note that while passing unmapped aesthetics as vectors +is technically possible, the order and required length is not guaranteed to +be parallel to the input data. \item When constructing a layer using -a \verb{stat_*()} function, the \code{...} argument can be used to pass on -parameters to the \code{geom} part of the layer. An example of this is -\code{stat_density(geom = "area", outline.type = "both")}. The geom's -documentation lists which parameters it can accept. +a \verb{stat_*()} function, the \code{...} argument can be used to pass on parameters +to the \code{geom} part of the layer. An example of this is \code{stat_density(geom = "area", outline.type = "both")}. The geom's documentation lists which +parameters it can accept. \item Inversely, when constructing a layer using a -\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters -to the \code{stat} part of the layer. An example of this is -\code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation -lists which parameters it can accept. +\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters to +the \code{stat} part of the layer. An example of this is \code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists which parameters it +can accept. \item The \code{key_glyph} argument of \code{\link[=layer]{layer()}} may also be passed on through -\code{...}. This can be one of the functions described as -\link[=draw_key]{key glyphs}, to change the display of the layer in the legend. +\code{...}. This can be one of the functions described as \link[=draw_key]{key glyphs}, +to change the display of the layer in the legend. }} \item{arrow}{Arrow specification, as created by \code{\link[grid:arrow]{grid::arrow()}}.} @@ -109,31 +107,30 @@ means use \code{colour} aesthetic.} \item{linemitre}{Line mitre limit (number greater than 1).} -\item{na.rm}{If \code{FALSE}, the default, missing values are removed with -a warning. If \code{TRUE}, missing values are silently removed.} - -\item{show.legend}{logical. Should this layer be included in the legends? -\code{NA}, the default, includes if any aesthetics are mapped. -\code{FALSE} never includes, and \code{TRUE} always includes. -It can also be a named logical vector to finely select the aesthetics to -display. To include legend keys for all levels, even -when no data exists, use \code{TRUE}. If \code{NA}, all levels are shown in legend, -but unobserved levels are omitted.} - -\item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics, -rather than combining with them. This is most useful for helper functions -that define both data and aesthetics and shouldn't inherit behaviour from -the default plot specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} - -\item{geom}{The geometric object to use to display the data for this layer. -When using a \verb{stat_*()} function to construct a layer, the \code{geom} argument -can be used to override the default coupling between stats and geoms. The -\code{geom} argument accepts the following: +\item{na.rm}{If \code{FALSE}, the default, missing values are removed with a warning. If +\code{TRUE}, missing values are silently removed.} + +\item{show.legend}{Logical. Should this layer be included in the legends? \code{NA}, the default, +includes if any aesthetics are mapped. \code{FALSE} never includes, and \code{TRUE} +always includes. It can also be a named logical vector to finely select the +aesthetics to display. To include legend keys for all levels, even when no +data exists, use \code{TRUE}. If \code{NA}, all levels are shown in legend, but +unobserved levels are omitted.} + +\item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics, rather than combining with +them. This is most useful for helper functions that define both data and +aesthetics and shouldn't inherit behaviour from the default plot +specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} + +\item{geom}{The geometric object to use to display the data for this layer. When using a +\verb{stat_*()} function to construct a layer, the \code{geom} argument can be used to +override the default coupling between stats and geoms. The \code{geom} argument +accepts the following: \itemize{ \item A \code{Geom} ggproto subclass, for example \code{GeomPoint}. \item A string naming the geom. To give the geom as a string, strip the -function name of the \code{geom_} prefix. For example, to use \code{geom_point()}, -give the geom as \code{"point"}. +function name of the \code{geom_} prefix. For example, to use \code{geom_point()}, give +the geom as \code{"point"}. \item For more information and other ways to specify the geom, see the \link[=layer_geoms]{layer geom} documentation. }} diff --git a/man/geom_hex.Rd b/man/geom_hex.Rd index fce589bbff..b9a69a3f6e 100644 --- a/man/geom_hex.Rd +++ b/man/geom_hex.Rd @@ -39,60 +39,55 @@ stat_bin_hex( at the top level of the plot. You must supply \code{mapping} if there is no plot mapping.} -\item{data}{The data to be displayed in this layer. There are three -options: - -If \code{NULL}, the default, the data is inherited from the plot -data as specified in the call to \code{\link[=ggplot]{ggplot()}}. - -A \code{data.frame}, or other object, will override the plot -data. All objects will be fortified to produce a data frame. See -\code{\link[=fortify]{fortify()}} for which variables will be created. - -A \code{function} will be called with a single argument, -the plot data. The return value must be a \code{data.frame}, and -will be used as the layer data. A \code{function} can be created -from a \code{formula} (e.g. \code{~ head(.x, 10)}).} +\item{data}{The data to be displayed in this layer. There are three options: +\itemize{ +\item \code{NULL} (default): the data is inherited from the plot data as specified +in the call to \code{\link[=ggplot]{ggplot()}}. +\item A \code{data.frame}, or other object, will override the plot data. All objects +will be fortified to produce a data frame. See \code{\link[=fortify]{fortify()}} for which +variables will be created. +\item A \code{function} will be called with a single argument, the plot data. The return +value must be a \code{data.frame}, and will be used as the layer data. A +\code{function} can be created from a \code{formula} (e.g. \code{~ head(.x, 10)}). +}} -\item{position}{A position adjustment to use on the data for this layer. This -can be used in various ways, including to prevent overplotting and -improving the display. The \code{position} argument accepts the following: +\item{position}{A position adjustment to use on the data for this layer. This can be used in +various ways, including to prevent overplotting and improving the display. +The \code{position} argument accepts the following: \itemize{ \item The result of calling a position function, such as \code{position_jitter()}. This method allows for passing extra arguments to the position. \item A string naming the position adjustment. To give the position as a -string, strip the function name of the \code{position_} prefix. For example, -to use \code{position_jitter()}, give the position as \code{"jitter"}. +string, strip the function name of the \code{position_} prefix. For example, to +use \code{position_jitter()}, give the position as \code{"jitter"}. \item For more information and other ways to specify the position, see the \link[=layer_positions]{layer position} documentation. }} -\item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These -arguments broadly fall into one of 4 categories below. Notably, further -arguments to the \code{position} argument, or aesthetics that are required -can \emph{not} be passed through \code{...}. Unknown arguments that are not part -of the 4 categories below are ignored. +\item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These arguments +broadly fall into one of 4 categories below. Notably, further arguments to +the \code{position} argument, or aesthetics that are required can \emph{not} be passed +through \code{...}. Unknown arguments that are not part of the 4 categories below +are ignored. \itemize{ \item Static aesthetics that are not mapped to a scale, but are at a fixed -value and apply to the layer as a whole. For example, \code{colour = "red"} -or \code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} -section that lists the available options. The 'required' aesthetics -cannot be passed on to the \code{params}. Please note that while passing -unmapped aesthetics as vectors is technically possible, the order and -required length is not guaranteed to be parallel to the input data. +value and apply to the layer as a whole. For example, \code{colour = "red"} or +\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section that +lists the available options. The 'required' aesthetics cannot be passed on to +the \code{params}. Please note that while passing unmapped aesthetics as vectors +is technically possible, the order and required length is not guaranteed to +be parallel to the input data. \item When constructing a layer using -a \verb{stat_*()} function, the \code{...} argument can be used to pass on -parameters to the \code{geom} part of the layer. An example of this is -\code{stat_density(geom = "area", outline.type = "both")}. The geom's -documentation lists which parameters it can accept. +a \verb{stat_*()} function, the \code{...} argument can be used to pass on parameters +to the \code{geom} part of the layer. An example of this is \code{stat_density(geom = "area", outline.type = "both")}. The geom's documentation lists which +parameters it can accept. \item Inversely, when constructing a layer using a -\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters -to the \code{stat} part of the layer. An example of this is -\code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation -lists which parameters it can accept. +\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters to +the \code{stat} part of the layer. An example of this is \code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists which parameters it +can accept. \item The \code{key_glyph} argument of \code{\link[=layer]{layer()}} may also be passed on through -\code{...}. This can be one of the functions described as -\link[=draw_key]{key glyphs}, to change the display of the layer in the legend. +\code{...}. This can be one of the functions described as \link[=draw_key]{key glyphs}, +to change the display of the layer in the legend. }} \item{lineend}{Line end style (round, butt, square).} @@ -101,21 +96,20 @@ lists which parameters it can accept. \item{linemitre}{Line mitre limit (number greater than 1).} -\item{na.rm}{If \code{FALSE}, the default, missing values are removed with -a warning. If \code{TRUE}, missing values are silently removed.} - -\item{show.legend}{logical. Should this layer be included in the legends? -\code{NA}, the default, includes if any aesthetics are mapped. -\code{FALSE} never includes, and \code{TRUE} always includes. -It can also be a named logical vector to finely select the aesthetics to -display. To include legend keys for all levels, even -when no data exists, use \code{TRUE}. If \code{NA}, all levels are shown in legend, -but unobserved levels are omitted.} - -\item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics, -rather than combining with them. This is most useful for helper functions -that define both data and aesthetics and shouldn't inherit behaviour from -the default plot specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} +\item{na.rm}{If \code{FALSE}, the default, missing values are removed with a warning. If +\code{TRUE}, missing values are silently removed.} + +\item{show.legend}{Logical. Should this layer be included in the legends? \code{NA}, the default, +includes if any aesthetics are mapped. \code{FALSE} never includes, and \code{TRUE} +always includes. It can also be a named logical vector to finely select the +aesthetics to display. To include legend keys for all levels, even when no +data exists, use \code{TRUE}. If \code{NA}, all levels are shown in legend, but +unobserved levels are omitted.} + +\item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics, rather than combining with +them. This is most useful for helper functions that define both data and +aesthetics and shouldn't inherit behaviour from the default plot +specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} \item{geom, stat}{Override the default connection between \code{geom_hex()} and \code{stat_bin_hex()}. For more information about overriding these connections, diff --git a/man/geom_histogram.Rd b/man/geom_histogram.Rd index b298a092a2..42fe58ee55 100644 --- a/man/geom_histogram.Rd +++ b/man/geom_histogram.Rd @@ -60,77 +60,71 @@ stat_bin( at the top level of the plot. You must supply \code{mapping} if there is no plot mapping.} -\item{data}{The data to be displayed in this layer. There are three -options: - -If \code{NULL}, the default, the data is inherited from the plot -data as specified in the call to \code{\link[=ggplot]{ggplot()}}. - -A \code{data.frame}, or other object, will override the plot -data. All objects will be fortified to produce a data frame. See -\code{\link[=fortify]{fortify()}} for which variables will be created. - -A \code{function} will be called with a single argument, -the plot data. The return value must be a \code{data.frame}, and -will be used as the layer data. A \code{function} can be created -from a \code{formula} (e.g. \code{~ head(.x, 10)}).} +\item{data}{The data to be displayed in this layer. There are three options: +\itemize{ +\item \code{NULL} (default): the data is inherited from the plot data as specified +in the call to \code{\link[=ggplot]{ggplot()}}. +\item A \code{data.frame}, or other object, will override the plot data. All objects +will be fortified to produce a data frame. See \code{\link[=fortify]{fortify()}} for which +variables will be created. +\item A \code{function} will be called with a single argument, the plot data. The return +value must be a \code{data.frame}, and will be used as the layer data. A +\code{function} can be created from a \code{formula} (e.g. \code{~ head(.x, 10)}). +}} -\item{position}{A position adjustment to use on the data for this layer. This -can be used in various ways, including to prevent overplotting and -improving the display. The \code{position} argument accepts the following: +\item{position}{A position adjustment to use on the data for this layer. This can be used in +various ways, including to prevent overplotting and improving the display. +The \code{position} argument accepts the following: \itemize{ \item The result of calling a position function, such as \code{position_jitter()}. This method allows for passing extra arguments to the position. \item A string naming the position adjustment. To give the position as a -string, strip the function name of the \code{position_} prefix. For example, -to use \code{position_jitter()}, give the position as \code{"jitter"}. +string, strip the function name of the \code{position_} prefix. For example, to +use \code{position_jitter()}, give the position as \code{"jitter"}. \item For more information and other ways to specify the position, see the \link[=layer_positions]{layer position} documentation. }} -\item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These -arguments broadly fall into one of 4 categories below. Notably, further -arguments to the \code{position} argument, or aesthetics that are required -can \emph{not} be passed through \code{...}. Unknown arguments that are not part -of the 4 categories below are ignored. +\item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These arguments +broadly fall into one of 4 categories below. Notably, further arguments to +the \code{position} argument, or aesthetics that are required can \emph{not} be passed +through \code{...}. Unknown arguments that are not part of the 4 categories below +are ignored. \itemize{ \item Static aesthetics that are not mapped to a scale, but are at a fixed -value and apply to the layer as a whole. For example, \code{colour = "red"} -or \code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} -section that lists the available options. The 'required' aesthetics -cannot be passed on to the \code{params}. Please note that while passing -unmapped aesthetics as vectors is technically possible, the order and -required length is not guaranteed to be parallel to the input data. +value and apply to the layer as a whole. For example, \code{colour = "red"} or +\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section that +lists the available options. The 'required' aesthetics cannot be passed on to +the \code{params}. Please note that while passing unmapped aesthetics as vectors +is technically possible, the order and required length is not guaranteed to +be parallel to the input data. \item When constructing a layer using -a \verb{stat_*()} function, the \code{...} argument can be used to pass on -parameters to the \code{geom} part of the layer. An example of this is -\code{stat_density(geom = "area", outline.type = "both")}. The geom's -documentation lists which parameters it can accept. +a \verb{stat_*()} function, the \code{...} argument can be used to pass on parameters +to the \code{geom} part of the layer. An example of this is \code{stat_density(geom = "area", outline.type = "both")}. The geom's documentation lists which +parameters it can accept. \item Inversely, when constructing a layer using a -\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters -to the \code{stat} part of the layer. An example of this is -\code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation -lists which parameters it can accept. +\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters to +the \code{stat} part of the layer. An example of this is \code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists which parameters it +can accept. \item The \code{key_glyph} argument of \code{\link[=layer]{layer()}} may also be passed on through -\code{...}. This can be one of the functions described as -\link[=draw_key]{key glyphs}, to change the display of the layer in the legend. +\code{...}. This can be one of the functions described as \link[=draw_key]{key glyphs}, +to change the display of the layer in the legend. }} -\item{na.rm}{If \code{FALSE}, the default, missing values are removed with -a warning. If \code{TRUE}, missing values are silently removed.} - -\item{show.legend}{logical. Should this layer be included in the legends? -\code{NA}, the default, includes if any aesthetics are mapped. -\code{FALSE} never includes, and \code{TRUE} always includes. -It can also be a named logical vector to finely select the aesthetics to -display. To include legend keys for all levels, even -when no data exists, use \code{TRUE}. If \code{NA}, all levels are shown in legend, -but unobserved levels are omitted.} - -\item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics, -rather than combining with them. This is most useful for helper functions -that define both data and aesthetics and shouldn't inherit behaviour from -the default plot specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} +\item{na.rm}{If \code{FALSE}, the default, missing values are removed with a warning. If +\code{TRUE}, missing values are silently removed.} + +\item{show.legend}{Logical. Should this layer be included in the legends? \code{NA}, the default, +includes if any aesthetics are mapped. \code{FALSE} never includes, and \code{TRUE} +always includes. It can also be a named logical vector to finely select the +aesthetics to display. To include legend keys for all levels, even when no +data exists, use \code{TRUE}. If \code{NA}, all levels are shown in legend, but +unobserved levels are omitted.} + +\item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics, rather than combining with +them. This is most useful for helper functions that define both data and +aesthetics and shouldn't inherit behaviour from the default plot +specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} \item{binwidth}{The width of the bins. Can be specified as a numeric value or as a function that takes x after scale transformation as input and diff --git a/man/geom_jitter.Rd b/man/geom_jitter.Rd index 909192bca8..029d273694 100644 --- a/man/geom_jitter.Rd +++ b/man/geom_jitter.Rd @@ -23,73 +23,68 @@ geom_jitter( at the top level of the plot. You must supply \code{mapping} if there is no plot mapping.} -\item{data}{The data to be displayed in this layer. There are three -options: - -If \code{NULL}, the default, the data is inherited from the plot -data as specified in the call to \code{\link[=ggplot]{ggplot()}}. - -A \code{data.frame}, or other object, will override the plot -data. All objects will be fortified to produce a data frame. See -\code{\link[=fortify]{fortify()}} for which variables will be created. - -A \code{function} will be called with a single argument, -the plot data. The return value must be a \code{data.frame}, and -will be used as the layer data. A \code{function} can be created -from a \code{formula} (e.g. \code{~ head(.x, 10)}).} +\item{data}{The data to be displayed in this layer. There are three options: +\itemize{ +\item \code{NULL} (default): the data is inherited from the plot data as specified +in the call to \code{\link[=ggplot]{ggplot()}}. +\item A \code{data.frame}, or other object, will override the plot data. All objects +will be fortified to produce a data frame. See \code{\link[=fortify]{fortify()}} for which +variables will be created. +\item A \code{function} will be called with a single argument, the plot data. The return +value must be a \code{data.frame}, and will be used as the layer data. A +\code{function} can be created from a \code{formula} (e.g. \code{~ head(.x, 10)}). +}} -\item{stat}{The statistical transformation to use on the data for this layer. -When using a \verb{geom_*()} function to construct a layer, the \code{stat} -argument can be used to override the default coupling between geoms and -stats. The \code{stat} argument accepts the following: +\item{stat}{The statistical transformation to use on the data for this layer. When using +a \verb{geom_*()} function to construct a layer, the \code{stat} argument can be used +to override the default coupling between geoms and stats. The \code{stat} argument +accepts the following: \itemize{ \item A \code{Stat} ggproto subclass, for example \code{StatCount}. \item A string naming the stat. To give the stat as a string, strip the -function name of the \code{stat_} prefix. For example, to use \code{stat_count()}, -give the stat as \code{"count"}. +function name of the \code{stat_} prefix. For example, to use \code{stat_count()}, give +the stat as \code{"count"}. \item For more information and other ways to specify the stat, see the \link[=layer_stats]{layer stat} documentation. }} -\item{position}{A position adjustment to use on the data for this layer. This -can be used in various ways, including to prevent overplotting and -improving the display. The \code{position} argument accepts the following: +\item{position}{A position adjustment to use on the data for this layer. This can be used in +various ways, including to prevent overplotting and improving the display. +The \code{position} argument accepts the following: \itemize{ \item The result of calling a position function, such as \code{position_jitter()}. This method allows for passing extra arguments to the position. \item A string naming the position adjustment. To give the position as a -string, strip the function name of the \code{position_} prefix. For example, -to use \code{position_jitter()}, give the position as \code{"jitter"}. +string, strip the function name of the \code{position_} prefix. For example, to +use \code{position_jitter()}, give the position as \code{"jitter"}. \item For more information and other ways to specify the position, see the \link[=layer_positions]{layer position} documentation. }} -\item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These -arguments broadly fall into one of 4 categories below. Notably, further -arguments to the \code{position} argument, or aesthetics that are required -can \emph{not} be passed through \code{...}. Unknown arguments that are not part -of the 4 categories below are ignored. +\item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These arguments +broadly fall into one of 4 categories below. Notably, further arguments to +the \code{position} argument, or aesthetics that are required can \emph{not} be passed +through \code{...}. Unknown arguments that are not part of the 4 categories below +are ignored. \itemize{ \item Static aesthetics that are not mapped to a scale, but are at a fixed -value and apply to the layer as a whole. For example, \code{colour = "red"} -or \code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} -section that lists the available options. The 'required' aesthetics -cannot be passed on to the \code{params}. Please note that while passing -unmapped aesthetics as vectors is technically possible, the order and -required length is not guaranteed to be parallel to the input data. +value and apply to the layer as a whole. For example, \code{colour = "red"} or +\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section that +lists the available options. The 'required' aesthetics cannot be passed on to +the \code{params}. Please note that while passing unmapped aesthetics as vectors +is technically possible, the order and required length is not guaranteed to +be parallel to the input data. \item When constructing a layer using -a \verb{stat_*()} function, the \code{...} argument can be used to pass on -parameters to the \code{geom} part of the layer. An example of this is -\code{stat_density(geom = "area", outline.type = "both")}. The geom's -documentation lists which parameters it can accept. +a \verb{stat_*()} function, the \code{...} argument can be used to pass on parameters +to the \code{geom} part of the layer. An example of this is \code{stat_density(geom = "area", outline.type = "both")}. The geom's documentation lists which +parameters it can accept. \item Inversely, when constructing a layer using a -\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters -to the \code{stat} part of the layer. An example of this is -\code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation -lists which parameters it can accept. +\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters to +the \code{stat} part of the layer. An example of this is \code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists which parameters it +can accept. \item The \code{key_glyph} argument of \code{\link[=layer]{layer()}} may also be passed on through -\code{...}. This can be one of the functions described as -\link[=draw_key]{key glyphs}, to change the display of the layer in the legend. +\code{...}. This can be one of the functions described as \link[=draw_key]{key glyphs}, +to change the display of the layer in the legend. }} \item{width, height}{Amount of vertical and horizontal jitter. The jitter @@ -101,21 +96,20 @@ jitter values will occupy 80\% of the implied bins. Categorical data is aligned on the integers, so a width or height of 0.5 will spread the data so it's not possible to see the distinction between the categories.} -\item{na.rm}{If \code{FALSE}, the default, missing values are removed with -a warning. If \code{TRUE}, missing values are silently removed.} +\item{na.rm}{If \code{FALSE}, the default, missing values are removed with a warning. If +\code{TRUE}, missing values are silently removed.} -\item{show.legend}{logical. Should this layer be included in the legends? -\code{NA}, the default, includes if any aesthetics are mapped. -\code{FALSE} never includes, and \code{TRUE} always includes. -It can also be a named logical vector to finely select the aesthetics to -display. To include legend keys for all levels, even -when no data exists, use \code{TRUE}. If \code{NA}, all levels are shown in legend, -but unobserved levels are omitted.} +\item{show.legend}{Logical. Should this layer be included in the legends? \code{NA}, the default, +includes if any aesthetics are mapped. \code{FALSE} never includes, and \code{TRUE} +always includes. It can also be a named logical vector to finely select the +aesthetics to display. To include legend keys for all levels, even when no +data exists, use \code{TRUE}. If \code{NA}, all levels are shown in legend, but +unobserved levels are omitted.} -\item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics, -rather than combining with them. This is most useful for helper functions -that define both data and aesthetics and shouldn't inherit behaviour from -the default plot specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} +\item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics, rather than combining with +them. This is most useful for helper functions that define both data and +aesthetics and shouldn't inherit behaviour from the default plot +specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} } \description{ The jitter geom is a convenient shortcut for diff --git a/man/geom_linerange.Rd b/man/geom_linerange.Rd index d064de5ebe..6136cc80d9 100644 --- a/man/geom_linerange.Rd +++ b/man/geom_linerange.Rd @@ -78,73 +78,68 @@ geom_pointrange( at the top level of the plot. You must supply \code{mapping} if there is no plot mapping.} -\item{data}{The data to be displayed in this layer. There are three -options: - -If \code{NULL}, the default, the data is inherited from the plot -data as specified in the call to \code{\link[=ggplot]{ggplot()}}. - -A \code{data.frame}, or other object, will override the plot -data. All objects will be fortified to produce a data frame. See -\code{\link[=fortify]{fortify()}} for which variables will be created. - -A \code{function} will be called with a single argument, -the plot data. The return value must be a \code{data.frame}, and -will be used as the layer data. A \code{function} can be created -from a \code{formula} (e.g. \code{~ head(.x, 10)}).} +\item{data}{The data to be displayed in this layer. There are three options: +\itemize{ +\item \code{NULL} (default): the data is inherited from the plot data as specified +in the call to \code{\link[=ggplot]{ggplot()}}. +\item A \code{data.frame}, or other object, will override the plot data. All objects +will be fortified to produce a data frame. See \code{\link[=fortify]{fortify()}} for which +variables will be created. +\item A \code{function} will be called with a single argument, the plot data. The return +value must be a \code{data.frame}, and will be used as the layer data. A +\code{function} can be created from a \code{formula} (e.g. \code{~ head(.x, 10)}). +}} -\item{stat}{The statistical transformation to use on the data for this layer. -When using a \verb{geom_*()} function to construct a layer, the \code{stat} -argument can be used to override the default coupling between geoms and -stats. The \code{stat} argument accepts the following: +\item{stat}{The statistical transformation to use on the data for this layer. When using +a \verb{geom_*()} function to construct a layer, the \code{stat} argument can be used +to override the default coupling between geoms and stats. The \code{stat} argument +accepts the following: \itemize{ \item A \code{Stat} ggproto subclass, for example \code{StatCount}. \item A string naming the stat. To give the stat as a string, strip the -function name of the \code{stat_} prefix. For example, to use \code{stat_count()}, -give the stat as \code{"count"}. +function name of the \code{stat_} prefix. For example, to use \code{stat_count()}, give +the stat as \code{"count"}. \item For more information and other ways to specify the stat, see the \link[=layer_stats]{layer stat} documentation. }} -\item{position}{A position adjustment to use on the data for this layer. This -can be used in various ways, including to prevent overplotting and -improving the display. The \code{position} argument accepts the following: +\item{position}{A position adjustment to use on the data for this layer. This can be used in +various ways, including to prevent overplotting and improving the display. +The \code{position} argument accepts the following: \itemize{ \item The result of calling a position function, such as \code{position_jitter()}. This method allows for passing extra arguments to the position. \item A string naming the position adjustment. To give the position as a -string, strip the function name of the \code{position_} prefix. For example, -to use \code{position_jitter()}, give the position as \code{"jitter"}. +string, strip the function name of the \code{position_} prefix. For example, to +use \code{position_jitter()}, give the position as \code{"jitter"}. \item For more information and other ways to specify the position, see the \link[=layer_positions]{layer position} documentation. }} -\item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These -arguments broadly fall into one of 4 categories below. Notably, further -arguments to the \code{position} argument, or aesthetics that are required -can \emph{not} be passed through \code{...}. Unknown arguments that are not part -of the 4 categories below are ignored. +\item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These arguments +broadly fall into one of 4 categories below. Notably, further arguments to +the \code{position} argument, or aesthetics that are required can \emph{not} be passed +through \code{...}. Unknown arguments that are not part of the 4 categories below +are ignored. \itemize{ \item Static aesthetics that are not mapped to a scale, but are at a fixed -value and apply to the layer as a whole. For example, \code{colour = "red"} -or \code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} -section that lists the available options. The 'required' aesthetics -cannot be passed on to the \code{params}. Please note that while passing -unmapped aesthetics as vectors is technically possible, the order and -required length is not guaranteed to be parallel to the input data. +value and apply to the layer as a whole. For example, \code{colour = "red"} or +\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section that +lists the available options. The 'required' aesthetics cannot be passed on to +the \code{params}. Please note that while passing unmapped aesthetics as vectors +is technically possible, the order and required length is not guaranteed to +be parallel to the input data. \item When constructing a layer using -a \verb{stat_*()} function, the \code{...} argument can be used to pass on -parameters to the \code{geom} part of the layer. An example of this is -\code{stat_density(geom = "area", outline.type = "both")}. The geom's -documentation lists which parameters it can accept. +a \verb{stat_*()} function, the \code{...} argument can be used to pass on parameters +to the \code{geom} part of the layer. An example of this is \code{stat_density(geom = "area", outline.type = "both")}. The geom's documentation lists which +parameters it can accept. \item Inversely, when constructing a layer using a -\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters -to the \code{stat} part of the layer. An example of this is -\code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation -lists which parameters it can accept. +\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters to +the \code{stat} part of the layer. An example of this is \code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists which parameters it +can accept. \item The \code{key_glyph} argument of \code{\link[=layer]{layer()}} may also be passed on through -\code{...}. This can be one of the functions described as -\link[=draw_key]{key glyphs}, to change the display of the layer in the legend. +\code{...}. This can be one of the functions described as \link[=draw_key]{key glyphs}, +to change the display of the layer in the legend. }} \item{middle.colour, middle.color, middle.linetype, middle.linewidth}{Default aesthetics for the middle line. Set to \code{NULL} to inherit from the @@ -157,26 +152,25 @@ data's aesthetics.} used to increase the size of the middle bar in \code{geom_crossbar()} and the middle point in \code{geom_pointrange()}.} -\item{na.rm}{If \code{FALSE}, the default, missing values are removed with -a warning. If \code{TRUE}, missing values are silently removed.} +\item{na.rm}{If \code{FALSE}, the default, missing values are removed with a warning. If +\code{TRUE}, missing values are silently removed.} \item{orientation}{The orientation of the layer. The default (\code{NA}) automatically determines the orientation from the aesthetic mapping. In the rare event that this fails it can be given explicitly by setting \code{orientation} to either \code{"x"} or \code{"y"}. See the \emph{Orientation} section for more detail.} -\item{show.legend}{logical. Should this layer be included in the legends? -\code{NA}, the default, includes if any aesthetics are mapped. -\code{FALSE} never includes, and \code{TRUE} always includes. -It can also be a named logical vector to finely select the aesthetics to -display. To include legend keys for all levels, even -when no data exists, use \code{TRUE}. If \code{NA}, all levels are shown in legend, -but unobserved levels are omitted.} +\item{show.legend}{Logical. Should this layer be included in the legends? \code{NA}, the default, +includes if any aesthetics are mapped. \code{FALSE} never includes, and \code{TRUE} +always includes. It can also be a named logical vector to finely select the +aesthetics to display. To include legend keys for all levels, even when no +data exists, use \code{TRUE}. If \code{NA}, all levels are shown in legend, but +unobserved levels are omitted.} -\item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics, -rather than combining with them. This is most useful for helper functions -that define both data and aesthetics and shouldn't inherit behaviour from -the default plot specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} +\item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics, rather than combining with +them. This is most useful for helper functions that define both data and +aesthetics and shouldn't inherit behaviour from the default plot +specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} \item{lineend}{Line end style (round, butt, square).} } diff --git a/man/geom_map.Rd b/man/geom_map.Rd index 0f2081f451..c4444e8086 100644 --- a/man/geom_map.Rd +++ b/man/geom_map.Rd @@ -21,60 +21,55 @@ geom_map( at the top level of the plot. You must supply \code{mapping} if there is no plot mapping.} -\item{data}{The data to be displayed in this layer. There are three -options: - -If \code{NULL}, the default, the data is inherited from the plot -data as specified in the call to \code{\link[=ggplot]{ggplot()}}. - -A \code{data.frame}, or other object, will override the plot -data. All objects will be fortified to produce a data frame. See -\code{\link[=fortify]{fortify()}} for which variables will be created. - -A \code{function} will be called with a single argument, -the plot data. The return value must be a \code{data.frame}, and -will be used as the layer data. A \code{function} can be created -from a \code{formula} (e.g. \code{~ head(.x, 10)}).} +\item{data}{The data to be displayed in this layer. There are three options: +\itemize{ +\item \code{NULL} (default): the data is inherited from the plot data as specified +in the call to \code{\link[=ggplot]{ggplot()}}. +\item A \code{data.frame}, or other object, will override the plot data. All objects +will be fortified to produce a data frame. See \code{\link[=fortify]{fortify()}} for which +variables will be created. +\item A \code{function} will be called with a single argument, the plot data. The return +value must be a \code{data.frame}, and will be used as the layer data. A +\code{function} can be created from a \code{formula} (e.g. \code{~ head(.x, 10)}). +}} -\item{stat}{The statistical transformation to use on the data for this layer. -When using a \verb{geom_*()} function to construct a layer, the \code{stat} -argument can be used to override the default coupling between geoms and -stats. The \code{stat} argument accepts the following: +\item{stat}{The statistical transformation to use on the data for this layer. When using +a \verb{geom_*()} function to construct a layer, the \code{stat} argument can be used +to override the default coupling between geoms and stats. The \code{stat} argument +accepts the following: \itemize{ \item A \code{Stat} ggproto subclass, for example \code{StatCount}. \item A string naming the stat. To give the stat as a string, strip the -function name of the \code{stat_} prefix. For example, to use \code{stat_count()}, -give the stat as \code{"count"}. +function name of the \code{stat_} prefix. For example, to use \code{stat_count()}, give +the stat as \code{"count"}. \item For more information and other ways to specify the stat, see the \link[=layer_stats]{layer stat} documentation. }} -\item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These -arguments broadly fall into one of 4 categories below. Notably, further -arguments to the \code{position} argument, or aesthetics that are required -can \emph{not} be passed through \code{...}. Unknown arguments that are not part -of the 4 categories below are ignored. +\item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These arguments +broadly fall into one of 4 categories below. Notably, further arguments to +the \code{position} argument, or aesthetics that are required can \emph{not} be passed +through \code{...}. Unknown arguments that are not part of the 4 categories below +are ignored. \itemize{ \item Static aesthetics that are not mapped to a scale, but are at a fixed -value and apply to the layer as a whole. For example, \code{colour = "red"} -or \code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} -section that lists the available options. The 'required' aesthetics -cannot be passed on to the \code{params}. Please note that while passing -unmapped aesthetics as vectors is technically possible, the order and -required length is not guaranteed to be parallel to the input data. +value and apply to the layer as a whole. For example, \code{colour = "red"} or +\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section that +lists the available options. The 'required' aesthetics cannot be passed on to +the \code{params}. Please note that while passing unmapped aesthetics as vectors +is technically possible, the order and required length is not guaranteed to +be parallel to the input data. \item When constructing a layer using -a \verb{stat_*()} function, the \code{...} argument can be used to pass on -parameters to the \code{geom} part of the layer. An example of this is -\code{stat_density(geom = "area", outline.type = "both")}. The geom's -documentation lists which parameters it can accept. +a \verb{stat_*()} function, the \code{...} argument can be used to pass on parameters +to the \code{geom} part of the layer. An example of this is \code{stat_density(geom = "area", outline.type = "both")}. The geom's documentation lists which +parameters it can accept. \item Inversely, when constructing a layer using a -\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters -to the \code{stat} part of the layer. An example of this is -\code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation -lists which parameters it can accept. +\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters to +the \code{stat} part of the layer. An example of this is \code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists which parameters it +can accept. \item The \code{key_glyph} argument of \code{\link[=layer]{layer()}} may also be passed on through -\code{...}. This can be one of the functions described as -\link[=draw_key]{key glyphs}, to change the display of the layer in the legend. +\code{...}. This can be one of the functions described as \link[=draw_key]{key glyphs}, +to change the display of the layer in the legend. }} \item{map}{Data frame that contains the map coordinates. This will @@ -82,21 +77,20 @@ typically be created using \code{\link[=fortify]{fortify()}} on a spatial object It must contain columns \code{x} or \code{long}, \code{y} or \code{lat}, and \code{region} or \code{id}.} -\item{na.rm}{If \code{FALSE}, the default, missing values are removed with -a warning. If \code{TRUE}, missing values are silently removed.} - -\item{show.legend}{logical. Should this layer be included in the legends? -\code{NA}, the default, includes if any aesthetics are mapped. -\code{FALSE} never includes, and \code{TRUE} always includes. -It can also be a named logical vector to finely select the aesthetics to -display. To include legend keys for all levels, even -when no data exists, use \code{TRUE}. If \code{NA}, all levels are shown in legend, -but unobserved levels are omitted.} - -\item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics, -rather than combining with them. This is most useful for helper functions -that define both data and aesthetics and shouldn't inherit behaviour from -the default plot specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} +\item{na.rm}{If \code{FALSE}, the default, missing values are removed with a warning. If +\code{TRUE}, missing values are silently removed.} + +\item{show.legend}{Logical. Should this layer be included in the legends? \code{NA}, the default, +includes if any aesthetics are mapped. \code{FALSE} never includes, and \code{TRUE} +always includes. It can also be a named logical vector to finely select the +aesthetics to display. To include legend keys for all levels, even when no +data exists, use \code{TRUE}. If \code{NA}, all levels are shown in legend, but +unobserved levels are omitted.} + +\item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics, rather than combining with +them. This is most useful for helper functions that define both data and +aesthetics and shouldn't inherit behaviour from the default plot +specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} } \description{ Display polygons as a map. This is meant as annotation, so it does not diff --git a/man/geom_path.Rd b/man/geom_path.Rd index 6e22325673..4a9d3af377 100644 --- a/man/geom_path.Rd +++ b/man/geom_path.Rd @@ -63,73 +63,68 @@ geom_step( at the top level of the plot. You must supply \code{mapping} if there is no plot mapping.} -\item{data}{The data to be displayed in this layer. There are three -options: - -If \code{NULL}, the default, the data is inherited from the plot -data as specified in the call to \code{\link[=ggplot]{ggplot()}}. - -A \code{data.frame}, or other object, will override the plot -data. All objects will be fortified to produce a data frame. See -\code{\link[=fortify]{fortify()}} for which variables will be created. - -A \code{function} will be called with a single argument, -the plot data. The return value must be a \code{data.frame}, and -will be used as the layer data. A \code{function} can be created -from a \code{formula} (e.g. \code{~ head(.x, 10)}).} +\item{data}{The data to be displayed in this layer. There are three options: +\itemize{ +\item \code{NULL} (default): the data is inherited from the plot data as specified +in the call to \code{\link[=ggplot]{ggplot()}}. +\item A \code{data.frame}, or other object, will override the plot data. All objects +will be fortified to produce a data frame. See \code{\link[=fortify]{fortify()}} for which +variables will be created. +\item A \code{function} will be called with a single argument, the plot data. The return +value must be a \code{data.frame}, and will be used as the layer data. A +\code{function} can be created from a \code{formula} (e.g. \code{~ head(.x, 10)}). +}} -\item{stat}{The statistical transformation to use on the data for this layer. -When using a \verb{geom_*()} function to construct a layer, the \code{stat} -argument can be used to override the default coupling between geoms and -stats. The \code{stat} argument accepts the following: +\item{stat}{The statistical transformation to use on the data for this layer. When using +a \verb{geom_*()} function to construct a layer, the \code{stat} argument can be used +to override the default coupling between geoms and stats. The \code{stat} argument +accepts the following: \itemize{ \item A \code{Stat} ggproto subclass, for example \code{StatCount}. \item A string naming the stat. To give the stat as a string, strip the -function name of the \code{stat_} prefix. For example, to use \code{stat_count()}, -give the stat as \code{"count"}. +function name of the \code{stat_} prefix. For example, to use \code{stat_count()}, give +the stat as \code{"count"}. \item For more information and other ways to specify the stat, see the \link[=layer_stats]{layer stat} documentation. }} -\item{position}{A position adjustment to use on the data for this layer. This -can be used in various ways, including to prevent overplotting and -improving the display. The \code{position} argument accepts the following: +\item{position}{A position adjustment to use on the data for this layer. This can be used in +various ways, including to prevent overplotting and improving the display. +The \code{position} argument accepts the following: \itemize{ \item The result of calling a position function, such as \code{position_jitter()}. This method allows for passing extra arguments to the position. \item A string naming the position adjustment. To give the position as a -string, strip the function name of the \code{position_} prefix. For example, -to use \code{position_jitter()}, give the position as \code{"jitter"}. +string, strip the function name of the \code{position_} prefix. For example, to +use \code{position_jitter()}, give the position as \code{"jitter"}. \item For more information and other ways to specify the position, see the \link[=layer_positions]{layer position} documentation. }} -\item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These -arguments broadly fall into one of 4 categories below. Notably, further -arguments to the \code{position} argument, or aesthetics that are required -can \emph{not} be passed through \code{...}. Unknown arguments that are not part -of the 4 categories below are ignored. +\item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These arguments +broadly fall into one of 4 categories below. Notably, further arguments to +the \code{position} argument, or aesthetics that are required can \emph{not} be passed +through \code{...}. Unknown arguments that are not part of the 4 categories below +are ignored. \itemize{ \item Static aesthetics that are not mapped to a scale, but are at a fixed -value and apply to the layer as a whole. For example, \code{colour = "red"} -or \code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} -section that lists the available options. The 'required' aesthetics -cannot be passed on to the \code{params}. Please note that while passing -unmapped aesthetics as vectors is technically possible, the order and -required length is not guaranteed to be parallel to the input data. +value and apply to the layer as a whole. For example, \code{colour = "red"} or +\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section that +lists the available options. The 'required' aesthetics cannot be passed on to +the \code{params}. Please note that while passing unmapped aesthetics as vectors +is technically possible, the order and required length is not guaranteed to +be parallel to the input data. \item When constructing a layer using -a \verb{stat_*()} function, the \code{...} argument can be used to pass on -parameters to the \code{geom} part of the layer. An example of this is -\code{stat_density(geom = "area", outline.type = "both")}. The geom's -documentation lists which parameters it can accept. +a \verb{stat_*()} function, the \code{...} argument can be used to pass on parameters +to the \code{geom} part of the layer. An example of this is \code{stat_density(geom = "area", outline.type = "both")}. The geom's documentation lists which +parameters it can accept. \item Inversely, when constructing a layer using a -\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters -to the \code{stat} part of the layer. An example of this is -\code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation -lists which parameters it can accept. +\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters to +the \code{stat} part of the layer. An example of this is \code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists which parameters it +can accept. \item The \code{key_glyph} argument of \code{\link[=layer]{layer()}} may also be passed on through -\code{...}. This can be one of the functions described as -\link[=draw_key]{key glyphs}, to change the display of the layer in the legend. +\code{...}. This can be one of the functions described as \link[=draw_key]{key glyphs}, +to change the display of the layer in the legend. }} \item{arrow}{Arrow specification, as created by \code{\link[grid:arrow]{grid::arrow()}}.} @@ -143,21 +138,20 @@ means use \code{colour} aesthetic.} \item{linemitre}{Line mitre limit (number greater than 1).} -\item{na.rm}{If \code{FALSE}, the default, missing values are removed with -a warning. If \code{TRUE}, missing values are silently removed.} +\item{na.rm}{If \code{FALSE}, the default, missing values are removed with a warning. If +\code{TRUE}, missing values are silently removed.} -\item{show.legend}{logical. Should this layer be included in the legends? -\code{NA}, the default, includes if any aesthetics are mapped. -\code{FALSE} never includes, and \code{TRUE} always includes. -It can also be a named logical vector to finely select the aesthetics to -display. To include legend keys for all levels, even -when no data exists, use \code{TRUE}. If \code{NA}, all levels are shown in legend, -but unobserved levels are omitted.} +\item{show.legend}{Logical. Should this layer be included in the legends? \code{NA}, the default, +includes if any aesthetics are mapped. \code{FALSE} never includes, and \code{TRUE} +always includes. It can also be a named logical vector to finely select the +aesthetics to display. To include legend keys for all levels, even when no +data exists, use \code{TRUE}. If \code{NA}, all levels are shown in legend, but +unobserved levels are omitted.} -\item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics, -rather than combining with them. This is most useful for helper functions -that define both data and aesthetics and shouldn't inherit behaviour from -the default plot specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} +\item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics, rather than combining with +them. This is most useful for helper functions that define both data and +aesthetics and shouldn't inherit behaviour from the default plot +specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} \item{orientation}{The orientation of the layer. The default (\code{NA}) automatically determines the orientation from the aesthetic mapping. In the diff --git a/man/geom_point.Rd b/man/geom_point.Rd index 91bc77da3d..6cb853b615 100644 --- a/man/geom_point.Rd +++ b/man/geom_point.Rd @@ -21,90 +21,84 @@ geom_point( at the top level of the plot. You must supply \code{mapping} if there is no plot mapping.} -\item{data}{The data to be displayed in this layer. There are three -options: - -If \code{NULL}, the default, the data is inherited from the plot -data as specified in the call to \code{\link[=ggplot]{ggplot()}}. - -A \code{data.frame}, or other object, will override the plot -data. All objects will be fortified to produce a data frame. See -\code{\link[=fortify]{fortify()}} for which variables will be created. - -A \code{function} will be called with a single argument, -the plot data. The return value must be a \code{data.frame}, and -will be used as the layer data. A \code{function} can be created -from a \code{formula} (e.g. \code{~ head(.x, 10)}).} +\item{data}{The data to be displayed in this layer. There are three options: +\itemize{ +\item \code{NULL} (default): the data is inherited from the plot data as specified +in the call to \code{\link[=ggplot]{ggplot()}}. +\item A \code{data.frame}, or other object, will override the plot data. All objects +will be fortified to produce a data frame. See \code{\link[=fortify]{fortify()}} for which +variables will be created. +\item A \code{function} will be called with a single argument, the plot data. The return +value must be a \code{data.frame}, and will be used as the layer data. A +\code{function} can be created from a \code{formula} (e.g. \code{~ head(.x, 10)}). +}} -\item{stat}{The statistical transformation to use on the data for this layer. -When using a \verb{geom_*()} function to construct a layer, the \code{stat} -argument can be used to override the default coupling between geoms and -stats. The \code{stat} argument accepts the following: +\item{stat}{The statistical transformation to use on the data for this layer. When using +a \verb{geom_*()} function to construct a layer, the \code{stat} argument can be used +to override the default coupling between geoms and stats. The \code{stat} argument +accepts the following: \itemize{ \item A \code{Stat} ggproto subclass, for example \code{StatCount}. \item A string naming the stat. To give the stat as a string, strip the -function name of the \code{stat_} prefix. For example, to use \code{stat_count()}, -give the stat as \code{"count"}. +function name of the \code{stat_} prefix. For example, to use \code{stat_count()}, give +the stat as \code{"count"}. \item For more information and other ways to specify the stat, see the \link[=layer_stats]{layer stat} documentation. }} -\item{position}{A position adjustment to use on the data for this layer. This -can be used in various ways, including to prevent overplotting and -improving the display. The \code{position} argument accepts the following: +\item{position}{A position adjustment to use on the data for this layer. This can be used in +various ways, including to prevent overplotting and improving the display. +The \code{position} argument accepts the following: \itemize{ \item The result of calling a position function, such as \code{position_jitter()}. This method allows for passing extra arguments to the position. \item A string naming the position adjustment. To give the position as a -string, strip the function name of the \code{position_} prefix. For example, -to use \code{position_jitter()}, give the position as \code{"jitter"}. +string, strip the function name of the \code{position_} prefix. For example, to +use \code{position_jitter()}, give the position as \code{"jitter"}. \item For more information and other ways to specify the position, see the \link[=layer_positions]{layer position} documentation. }} -\item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These -arguments broadly fall into one of 4 categories below. Notably, further -arguments to the \code{position} argument, or aesthetics that are required -can \emph{not} be passed through \code{...}. Unknown arguments that are not part -of the 4 categories below are ignored. +\item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These arguments +broadly fall into one of 4 categories below. Notably, further arguments to +the \code{position} argument, or aesthetics that are required can \emph{not} be passed +through \code{...}. Unknown arguments that are not part of the 4 categories below +are ignored. \itemize{ \item Static aesthetics that are not mapped to a scale, but are at a fixed -value and apply to the layer as a whole. For example, \code{colour = "red"} -or \code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} -section that lists the available options. The 'required' aesthetics -cannot be passed on to the \code{params}. Please note that while passing -unmapped aesthetics as vectors is technically possible, the order and -required length is not guaranteed to be parallel to the input data. +value and apply to the layer as a whole. For example, \code{colour = "red"} or +\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section that +lists the available options. The 'required' aesthetics cannot be passed on to +the \code{params}. Please note that while passing unmapped aesthetics as vectors +is technically possible, the order and required length is not guaranteed to +be parallel to the input data. \item When constructing a layer using -a \verb{stat_*()} function, the \code{...} argument can be used to pass on -parameters to the \code{geom} part of the layer. An example of this is -\code{stat_density(geom = "area", outline.type = "both")}. The geom's -documentation lists which parameters it can accept. +a \verb{stat_*()} function, the \code{...} argument can be used to pass on parameters +to the \code{geom} part of the layer. An example of this is \code{stat_density(geom = "area", outline.type = "both")}. The geom's documentation lists which +parameters it can accept. \item Inversely, when constructing a layer using a -\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters -to the \code{stat} part of the layer. An example of this is -\code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation -lists which parameters it can accept. +\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters to +the \code{stat} part of the layer. An example of this is \code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists which parameters it +can accept. \item The \code{key_glyph} argument of \code{\link[=layer]{layer()}} may also be passed on through -\code{...}. This can be one of the functions described as -\link[=draw_key]{key glyphs}, to change the display of the layer in the legend. +\code{...}. This can be one of the functions described as \link[=draw_key]{key glyphs}, +to change the display of the layer in the legend. }} -\item{na.rm}{If \code{FALSE}, the default, missing values are removed with -a warning. If \code{TRUE}, missing values are silently removed.} - -\item{show.legend}{logical. Should this layer be included in the legends? -\code{NA}, the default, includes if any aesthetics are mapped. -\code{FALSE} never includes, and \code{TRUE} always includes. -It can also be a named logical vector to finely select the aesthetics to -display. To include legend keys for all levels, even -when no data exists, use \code{TRUE}. If \code{NA}, all levels are shown in legend, -but unobserved levels are omitted.} - -\item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics, -rather than combining with them. This is most useful for helper functions -that define both data and aesthetics and shouldn't inherit behaviour from -the default plot specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} +\item{na.rm}{If \code{FALSE}, the default, missing values are removed with a warning. If +\code{TRUE}, missing values are silently removed.} + +\item{show.legend}{Logical. Should this layer be included in the legends? \code{NA}, the default, +includes if any aesthetics are mapped. \code{FALSE} never includes, and \code{TRUE} +always includes. It can also be a named logical vector to finely select the +aesthetics to display. To include legend keys for all levels, even when no +data exists, use \code{TRUE}. If \code{NA}, all levels are shown in legend, but +unobserved levels are omitted.} + +\item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics, rather than combining with +them. This is most useful for helper functions that define both data and +aesthetics and shouldn't inherit behaviour from the default plot +specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} } \description{ The point geom is used to create scatterplots. The scatterplot is most diff --git a/man/geom_polygon.Rd b/man/geom_polygon.Rd index 9058d19259..368d0bcf76 100644 --- a/man/geom_polygon.Rd +++ b/man/geom_polygon.Rd @@ -25,73 +25,68 @@ geom_polygon( at the top level of the plot. You must supply \code{mapping} if there is no plot mapping.} -\item{data}{The data to be displayed in this layer. There are three -options: - -If \code{NULL}, the default, the data is inherited from the plot -data as specified in the call to \code{\link[=ggplot]{ggplot()}}. - -A \code{data.frame}, or other object, will override the plot -data. All objects will be fortified to produce a data frame. See -\code{\link[=fortify]{fortify()}} for which variables will be created. - -A \code{function} will be called with a single argument, -the plot data. The return value must be a \code{data.frame}, and -will be used as the layer data. A \code{function} can be created -from a \code{formula} (e.g. \code{~ head(.x, 10)}).} +\item{data}{The data to be displayed in this layer. There are three options: +\itemize{ +\item \code{NULL} (default): the data is inherited from the plot data as specified +in the call to \code{\link[=ggplot]{ggplot()}}. +\item A \code{data.frame}, or other object, will override the plot data. All objects +will be fortified to produce a data frame. See \code{\link[=fortify]{fortify()}} for which +variables will be created. +\item A \code{function} will be called with a single argument, the plot data. The return +value must be a \code{data.frame}, and will be used as the layer data. A +\code{function} can be created from a \code{formula} (e.g. \code{~ head(.x, 10)}). +}} -\item{stat}{The statistical transformation to use on the data for this layer. -When using a \verb{geom_*()} function to construct a layer, the \code{stat} -argument can be used to override the default coupling between geoms and -stats. The \code{stat} argument accepts the following: +\item{stat}{The statistical transformation to use on the data for this layer. When using +a \verb{geom_*()} function to construct a layer, the \code{stat} argument can be used +to override the default coupling between geoms and stats. The \code{stat} argument +accepts the following: \itemize{ \item A \code{Stat} ggproto subclass, for example \code{StatCount}. \item A string naming the stat. To give the stat as a string, strip the -function name of the \code{stat_} prefix. For example, to use \code{stat_count()}, -give the stat as \code{"count"}. +function name of the \code{stat_} prefix. For example, to use \code{stat_count()}, give +the stat as \code{"count"}. \item For more information and other ways to specify the stat, see the \link[=layer_stats]{layer stat} documentation. }} -\item{position}{A position adjustment to use on the data for this layer. This -can be used in various ways, including to prevent overplotting and -improving the display. The \code{position} argument accepts the following: +\item{position}{A position adjustment to use on the data for this layer. This can be used in +various ways, including to prevent overplotting and improving the display. +The \code{position} argument accepts the following: \itemize{ \item The result of calling a position function, such as \code{position_jitter()}. This method allows for passing extra arguments to the position. \item A string naming the position adjustment. To give the position as a -string, strip the function name of the \code{position_} prefix. For example, -to use \code{position_jitter()}, give the position as \code{"jitter"}. +string, strip the function name of the \code{position_} prefix. For example, to +use \code{position_jitter()}, give the position as \code{"jitter"}. \item For more information and other ways to specify the position, see the \link[=layer_positions]{layer position} documentation. }} -\item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These -arguments broadly fall into one of 4 categories below. Notably, further -arguments to the \code{position} argument, or aesthetics that are required -can \emph{not} be passed through \code{...}. Unknown arguments that are not part -of the 4 categories below are ignored. +\item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These arguments +broadly fall into one of 4 categories below. Notably, further arguments to +the \code{position} argument, or aesthetics that are required can \emph{not} be passed +through \code{...}. Unknown arguments that are not part of the 4 categories below +are ignored. \itemize{ \item Static aesthetics that are not mapped to a scale, but are at a fixed -value and apply to the layer as a whole. For example, \code{colour = "red"} -or \code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} -section that lists the available options. The 'required' aesthetics -cannot be passed on to the \code{params}. Please note that while passing -unmapped aesthetics as vectors is technically possible, the order and -required length is not guaranteed to be parallel to the input data. +value and apply to the layer as a whole. For example, \code{colour = "red"} or +\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section that +lists the available options. The 'required' aesthetics cannot be passed on to +the \code{params}. Please note that while passing unmapped aesthetics as vectors +is technically possible, the order and required length is not guaranteed to +be parallel to the input data. \item When constructing a layer using -a \verb{stat_*()} function, the \code{...} argument can be used to pass on -parameters to the \code{geom} part of the layer. An example of this is -\code{stat_density(geom = "area", outline.type = "both")}. The geom's -documentation lists which parameters it can accept. +a \verb{stat_*()} function, the \code{...} argument can be used to pass on parameters +to the \code{geom} part of the layer. An example of this is \code{stat_density(geom = "area", outline.type = "both")}. The geom's documentation lists which +parameters it can accept. \item Inversely, when constructing a layer using a -\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters -to the \code{stat} part of the layer. An example of this is -\code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation -lists which parameters it can accept. +\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters to +the \code{stat} part of the layer. An example of this is \code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists which parameters it +can accept. \item The \code{key_glyph} argument of \code{\link[=layer]{layer()}} may also be passed on through -\code{...}. This can be one of the functions described as -\link[=draw_key]{key glyphs}, to change the display of the layer in the legend. +\code{...}. This can be one of the functions described as \link[=draw_key]{key glyphs}, +to change the display of the layer in the legend. }} \item{rule}{Either \code{"evenodd"} or \code{"winding"}. If polygons with holes are @@ -105,21 +100,20 @@ an explanation.} \item{linemitre}{Line mitre limit (number greater than 1).} -\item{na.rm}{If \code{FALSE}, the default, missing values are removed with -a warning. If \code{TRUE}, missing values are silently removed.} - -\item{show.legend}{logical. Should this layer be included in the legends? -\code{NA}, the default, includes if any aesthetics are mapped. -\code{FALSE} never includes, and \code{TRUE} always includes. -It can also be a named logical vector to finely select the aesthetics to -display. To include legend keys for all levels, even -when no data exists, use \code{TRUE}. If \code{NA}, all levels are shown in legend, -but unobserved levels are omitted.} - -\item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics, -rather than combining with them. This is most useful for helper functions -that define both data and aesthetics and shouldn't inherit behaviour from -the default plot specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} +\item{na.rm}{If \code{FALSE}, the default, missing values are removed with a warning. If +\code{TRUE}, missing values are silently removed.} + +\item{show.legend}{Logical. Should this layer be included in the legends? \code{NA}, the default, +includes if any aesthetics are mapped. \code{FALSE} never includes, and \code{TRUE} +always includes. It can also be a named logical vector to finely select the +aesthetics to display. To include legend keys for all levels, even when no +data exists, use \code{TRUE}. If \code{NA}, all levels are shown in legend, but +unobserved levels are omitted.} + +\item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics, rather than combining with +them. This is most useful for helper functions that define both data and +aesthetics and shouldn't inherit behaviour from the default plot +specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} } \description{ Polygons are very similar to paths (as drawn by \code{\link[=geom_path]{geom_path()}}) diff --git a/man/geom_qq.Rd b/man/geom_qq.Rd index b24151e50e..3631d32229 100644 --- a/man/geom_qq.Rd +++ b/man/geom_qq.Rd @@ -69,73 +69,68 @@ stat_qq( at the top level of the plot. You must supply \code{mapping} if there is no plot mapping.} -\item{data}{The data to be displayed in this layer. There are three -options: - -If \code{NULL}, the default, the data is inherited from the plot -data as specified in the call to \code{\link[=ggplot]{ggplot()}}. - -A \code{data.frame}, or other object, will override the plot -data. All objects will be fortified to produce a data frame. See -\code{\link[=fortify]{fortify()}} for which variables will be created. - -A \code{function} will be called with a single argument, -the plot data. The return value must be a \code{data.frame}, and -will be used as the layer data. A \code{function} can be created -from a \code{formula} (e.g. \code{~ head(.x, 10)}).} +\item{data}{The data to be displayed in this layer. There are three options: +\itemize{ +\item \code{NULL} (default): the data is inherited from the plot data as specified +in the call to \code{\link[=ggplot]{ggplot()}}. +\item A \code{data.frame}, or other object, will override the plot data. All objects +will be fortified to produce a data frame. See \code{\link[=fortify]{fortify()}} for which +variables will be created. +\item A \code{function} will be called with a single argument, the plot data. The return +value must be a \code{data.frame}, and will be used as the layer data. A +\code{function} can be created from a \code{formula} (e.g. \code{~ head(.x, 10)}). +}} -\item{geom}{The geometric object to use to display the data for this layer. -When using a \verb{stat_*()} function to construct a layer, the \code{geom} argument -can be used to override the default coupling between stats and geoms. The -\code{geom} argument accepts the following: +\item{geom}{The geometric object to use to display the data for this layer. When using a +\verb{stat_*()} function to construct a layer, the \code{geom} argument can be used to +override the default coupling between stats and geoms. The \code{geom} argument +accepts the following: \itemize{ \item A \code{Geom} ggproto subclass, for example \code{GeomPoint}. \item A string naming the geom. To give the geom as a string, strip the -function name of the \code{geom_} prefix. For example, to use \code{geom_point()}, -give the geom as \code{"point"}. +function name of the \code{geom_} prefix. For example, to use \code{geom_point()}, give +the geom as \code{"point"}. \item For more information and other ways to specify the geom, see the \link[=layer_geoms]{layer geom} documentation. }} -\item{position}{A position adjustment to use on the data for this layer. This -can be used in various ways, including to prevent overplotting and -improving the display. The \code{position} argument accepts the following: +\item{position}{A position adjustment to use on the data for this layer. This can be used in +various ways, including to prevent overplotting and improving the display. +The \code{position} argument accepts the following: \itemize{ \item The result of calling a position function, such as \code{position_jitter()}. This method allows for passing extra arguments to the position. \item A string naming the position adjustment. To give the position as a -string, strip the function name of the \code{position_} prefix. For example, -to use \code{position_jitter()}, give the position as \code{"jitter"}. +string, strip the function name of the \code{position_} prefix. For example, to +use \code{position_jitter()}, give the position as \code{"jitter"}. \item For more information and other ways to specify the position, see the \link[=layer_positions]{layer position} documentation. }} -\item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These -arguments broadly fall into one of 4 categories below. Notably, further -arguments to the \code{position} argument, or aesthetics that are required -can \emph{not} be passed through \code{...}. Unknown arguments that are not part -of the 4 categories below are ignored. +\item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These arguments +broadly fall into one of 4 categories below. Notably, further arguments to +the \code{position} argument, or aesthetics that are required can \emph{not} be passed +through \code{...}. Unknown arguments that are not part of the 4 categories below +are ignored. \itemize{ \item Static aesthetics that are not mapped to a scale, but are at a fixed -value and apply to the layer as a whole. For example, \code{colour = "red"} -or \code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} -section that lists the available options. The 'required' aesthetics -cannot be passed on to the \code{params}. Please note that while passing -unmapped aesthetics as vectors is technically possible, the order and -required length is not guaranteed to be parallel to the input data. +value and apply to the layer as a whole. For example, \code{colour = "red"} or +\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section that +lists the available options. The 'required' aesthetics cannot be passed on to +the \code{params}. Please note that while passing unmapped aesthetics as vectors +is technically possible, the order and required length is not guaranteed to +be parallel to the input data. \item When constructing a layer using -a \verb{stat_*()} function, the \code{...} argument can be used to pass on -parameters to the \code{geom} part of the layer. An example of this is -\code{stat_density(geom = "area", outline.type = "both")}. The geom's -documentation lists which parameters it can accept. +a \verb{stat_*()} function, the \code{...} argument can be used to pass on parameters +to the \code{geom} part of the layer. An example of this is \code{stat_density(geom = "area", outline.type = "both")}. The geom's documentation lists which +parameters it can accept. \item Inversely, when constructing a layer using a -\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters -to the \code{stat} part of the layer. An example of this is -\code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation -lists which parameters it can accept. +\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters to +the \code{stat} part of the layer. An example of this is \code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists which parameters it +can accept. \item The \code{key_glyph} argument of \code{\link[=layer]{layer()}} may also be passed on through -\code{...}. This can be one of the functions described as -\link[=draw_key]{key glyphs}, to change the display of the layer in the legend. +\code{...}. This can be one of the functions described as \link[=draw_key]{key glyphs}, +to change the display of the layer in the legend. }} \item{distribution}{Distribution function to use, if x not specified} @@ -149,21 +144,20 @@ defaults to \code{c(.25, .75)}.} \item{fullrange}{Should the q-q line span the full range of the plot, or just the data} -\item{na.rm}{If \code{FALSE}, the default, missing values are removed with -a warning. If \code{TRUE}, missing values are silently removed.} - -\item{show.legend}{logical. Should this layer be included in the legends? -\code{NA}, the default, includes if any aesthetics are mapped. -\code{FALSE} never includes, and \code{TRUE} always includes. -It can also be a named logical vector to finely select the aesthetics to -display. To include legend keys for all levels, even -when no data exists, use \code{TRUE}. If \code{NA}, all levels are shown in legend, -but unobserved levels are omitted.} - -\item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics, -rather than combining with them. This is most useful for helper functions -that define both data and aesthetics and shouldn't inherit behaviour from -the default plot specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} +\item{na.rm}{If \code{FALSE}, the default, missing values are removed with a warning. If +\code{TRUE}, missing values are silently removed.} + +\item{show.legend}{Logical. Should this layer be included in the legends? \code{NA}, the default, +includes if any aesthetics are mapped. \code{FALSE} never includes, and \code{TRUE} +always includes. It can also be a named logical vector to finely select the +aesthetics to display. To include legend keys for all levels, even when no +data exists, use \code{TRUE}. If \code{NA}, all levels are shown in legend, but +unobserved levels are omitted.} + +\item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics, rather than combining with +them. This is most useful for helper functions that define both data and +aesthetics and shouldn't inherit behaviour from the default plot +specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} } \description{ \code{geom_qq()} and \code{stat_qq()} produce quantile-quantile plots. \code{geom_qq_line()} and diff --git a/man/geom_quantile.Rd b/man/geom_quantile.Rd index 94c7af770b..916db030e5 100644 --- a/man/geom_quantile.Rd +++ b/man/geom_quantile.Rd @@ -42,60 +42,55 @@ stat_quantile( at the top level of the plot. You must supply \code{mapping} if there is no plot mapping.} -\item{data}{The data to be displayed in this layer. There are three -options: - -If \code{NULL}, the default, the data is inherited from the plot -data as specified in the call to \code{\link[=ggplot]{ggplot()}}. - -A \code{data.frame}, or other object, will override the plot -data. All objects will be fortified to produce a data frame. See -\code{\link[=fortify]{fortify()}} for which variables will be created. - -A \code{function} will be called with a single argument, -the plot data. The return value must be a \code{data.frame}, and -will be used as the layer data. A \code{function} can be created -from a \code{formula} (e.g. \code{~ head(.x, 10)}).} +\item{data}{The data to be displayed in this layer. There are three options: +\itemize{ +\item \code{NULL} (default): the data is inherited from the plot data as specified +in the call to \code{\link[=ggplot]{ggplot()}}. +\item A \code{data.frame}, or other object, will override the plot data. All objects +will be fortified to produce a data frame. See \code{\link[=fortify]{fortify()}} for which +variables will be created. +\item A \code{function} will be called with a single argument, the plot data. The return +value must be a \code{data.frame}, and will be used as the layer data. A +\code{function} can be created from a \code{formula} (e.g. \code{~ head(.x, 10)}). +}} -\item{position}{A position adjustment to use on the data for this layer. This -can be used in various ways, including to prevent overplotting and -improving the display. The \code{position} argument accepts the following: +\item{position}{A position adjustment to use on the data for this layer. This can be used in +various ways, including to prevent overplotting and improving the display. +The \code{position} argument accepts the following: \itemize{ \item The result of calling a position function, such as \code{position_jitter()}. This method allows for passing extra arguments to the position. \item A string naming the position adjustment. To give the position as a -string, strip the function name of the \code{position_} prefix. For example, -to use \code{position_jitter()}, give the position as \code{"jitter"}. +string, strip the function name of the \code{position_} prefix. For example, to +use \code{position_jitter()}, give the position as \code{"jitter"}. \item For more information and other ways to specify the position, see the \link[=layer_positions]{layer position} documentation. }} -\item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These -arguments broadly fall into one of 4 categories below. Notably, further -arguments to the \code{position} argument, or aesthetics that are required -can \emph{not} be passed through \code{...}. Unknown arguments that are not part -of the 4 categories below are ignored. +\item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These arguments +broadly fall into one of 4 categories below. Notably, further arguments to +the \code{position} argument, or aesthetics that are required can \emph{not} be passed +through \code{...}. Unknown arguments that are not part of the 4 categories below +are ignored. \itemize{ \item Static aesthetics that are not mapped to a scale, but are at a fixed -value and apply to the layer as a whole. For example, \code{colour = "red"} -or \code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} -section that lists the available options. The 'required' aesthetics -cannot be passed on to the \code{params}. Please note that while passing -unmapped aesthetics as vectors is technically possible, the order and -required length is not guaranteed to be parallel to the input data. +value and apply to the layer as a whole. For example, \code{colour = "red"} or +\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section that +lists the available options. The 'required' aesthetics cannot be passed on to +the \code{params}. Please note that while passing unmapped aesthetics as vectors +is technically possible, the order and required length is not guaranteed to +be parallel to the input data. \item When constructing a layer using -a \verb{stat_*()} function, the \code{...} argument can be used to pass on -parameters to the \code{geom} part of the layer. An example of this is -\code{stat_density(geom = "area", outline.type = "both")}. The geom's -documentation lists which parameters it can accept. +a \verb{stat_*()} function, the \code{...} argument can be used to pass on parameters +to the \code{geom} part of the layer. An example of this is \code{stat_density(geom = "area", outline.type = "both")}. The geom's documentation lists which +parameters it can accept. \item Inversely, when constructing a layer using a -\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters -to the \code{stat} part of the layer. An example of this is -\code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation -lists which parameters it can accept. +\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters to +the \code{stat} part of the layer. An example of this is \code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists which parameters it +can accept. \item The \code{key_glyph} argument of \code{\link[=layer]{layer()}} may also be passed on through -\code{...}. This can be one of the functions described as -\link[=draw_key]{key glyphs}, to change the display of the layer in the legend. +\code{...}. This can be one of the functions described as \link[=draw_key]{key glyphs}, +to change the display of the layer in the legend. }} \item{arrow}{Arrow specification, as created by \code{\link[grid:arrow]{grid::arrow()}}.} @@ -109,21 +104,20 @@ means use \code{colour} aesthetic.} \item{linemitre}{Line mitre limit (number greater than 1).} -\item{na.rm}{If \code{FALSE}, the default, missing values are removed with -a warning. If \code{TRUE}, missing values are silently removed.} - -\item{show.legend}{logical. Should this layer be included in the legends? -\code{NA}, the default, includes if any aesthetics are mapped. -\code{FALSE} never includes, and \code{TRUE} always includes. -It can also be a named logical vector to finely select the aesthetics to -display. To include legend keys for all levels, even -when no data exists, use \code{TRUE}. If \code{NA}, all levels are shown in legend, -but unobserved levels are omitted.} - -\item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics, -rather than combining with them. This is most useful for helper functions -that define both data and aesthetics and shouldn't inherit behaviour from -the default plot specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} +\item{na.rm}{If \code{FALSE}, the default, missing values are removed with a warning. If +\code{TRUE}, missing values are silently removed.} + +\item{show.legend}{Logical. Should this layer be included in the legends? \code{NA}, the default, +includes if any aesthetics are mapped. \code{FALSE} never includes, and \code{TRUE} +always includes. It can also be a named logical vector to finely select the +aesthetics to display. To include legend keys for all levels, even when no +data exists, use \code{TRUE}. If \code{NA}, all levels are shown in legend, but +unobserved levels are omitted.} + +\item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics, rather than combining with +them. This is most useful for helper functions that define both data and +aesthetics and shouldn't inherit behaviour from the default plot +specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} \item{geom, stat}{Use to override the default connection between \code{geom_quantile()} and \code{stat_quantile()}. For more information about diff --git a/man/geom_ribbon.Rd b/man/geom_ribbon.Rd index 9e98df0e4e..e7ced5f4b6 100644 --- a/man/geom_ribbon.Rd +++ b/man/geom_ribbon.Rd @@ -55,73 +55,68 @@ stat_align( at the top level of the plot. You must supply \code{mapping} if there is no plot mapping.} -\item{data}{The data to be displayed in this layer. There are three -options: - -If \code{NULL}, the default, the data is inherited from the plot -data as specified in the call to \code{\link[=ggplot]{ggplot()}}. - -A \code{data.frame}, or other object, will override the plot -data. All objects will be fortified to produce a data frame. See -\code{\link[=fortify]{fortify()}} for which variables will be created. - -A \code{function} will be called with a single argument, -the plot data. The return value must be a \code{data.frame}, and -will be used as the layer data. A \code{function} can be created -from a \code{formula} (e.g. \code{~ head(.x, 10)}).} +\item{data}{The data to be displayed in this layer. There are three options: +\itemize{ +\item \code{NULL} (default): the data is inherited from the plot data as specified +in the call to \code{\link[=ggplot]{ggplot()}}. +\item A \code{data.frame}, or other object, will override the plot data. All objects +will be fortified to produce a data frame. See \code{\link[=fortify]{fortify()}} for which +variables will be created. +\item A \code{function} will be called with a single argument, the plot data. The return +value must be a \code{data.frame}, and will be used as the layer data. A +\code{function} can be created from a \code{formula} (e.g. \code{~ head(.x, 10)}). +}} -\item{stat}{The statistical transformation to use on the data for this layer. -When using a \verb{geom_*()} function to construct a layer, the \code{stat} -argument can be used to override the default coupling between geoms and -stats. The \code{stat} argument accepts the following: +\item{stat}{The statistical transformation to use on the data for this layer. When using +a \verb{geom_*()} function to construct a layer, the \code{stat} argument can be used +to override the default coupling between geoms and stats. The \code{stat} argument +accepts the following: \itemize{ \item A \code{Stat} ggproto subclass, for example \code{StatCount}. \item A string naming the stat. To give the stat as a string, strip the -function name of the \code{stat_} prefix. For example, to use \code{stat_count()}, -give the stat as \code{"count"}. +function name of the \code{stat_} prefix. For example, to use \code{stat_count()}, give +the stat as \code{"count"}. \item For more information and other ways to specify the stat, see the \link[=layer_stats]{layer stat} documentation. }} -\item{position}{A position adjustment to use on the data for this layer. This -can be used in various ways, including to prevent overplotting and -improving the display. The \code{position} argument accepts the following: +\item{position}{A position adjustment to use on the data for this layer. This can be used in +various ways, including to prevent overplotting and improving the display. +The \code{position} argument accepts the following: \itemize{ \item The result of calling a position function, such as \code{position_jitter()}. This method allows for passing extra arguments to the position. \item A string naming the position adjustment. To give the position as a -string, strip the function name of the \code{position_} prefix. For example, -to use \code{position_jitter()}, give the position as \code{"jitter"}. +string, strip the function name of the \code{position_} prefix. For example, to +use \code{position_jitter()}, give the position as \code{"jitter"}. \item For more information and other ways to specify the position, see the \link[=layer_positions]{layer position} documentation. }} -\item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These -arguments broadly fall into one of 4 categories below. Notably, further -arguments to the \code{position} argument, or aesthetics that are required -can \emph{not} be passed through \code{...}. Unknown arguments that are not part -of the 4 categories below are ignored. +\item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These arguments +broadly fall into one of 4 categories below. Notably, further arguments to +the \code{position} argument, or aesthetics that are required can \emph{not} be passed +through \code{...}. Unknown arguments that are not part of the 4 categories below +are ignored. \itemize{ \item Static aesthetics that are not mapped to a scale, but are at a fixed -value and apply to the layer as a whole. For example, \code{colour = "red"} -or \code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} -section that lists the available options. The 'required' aesthetics -cannot be passed on to the \code{params}. Please note that while passing -unmapped aesthetics as vectors is technically possible, the order and -required length is not guaranteed to be parallel to the input data. +value and apply to the layer as a whole. For example, \code{colour = "red"} or +\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section that +lists the available options. The 'required' aesthetics cannot be passed on to +the \code{params}. Please note that while passing unmapped aesthetics as vectors +is technically possible, the order and required length is not guaranteed to +be parallel to the input data. \item When constructing a layer using -a \verb{stat_*()} function, the \code{...} argument can be used to pass on -parameters to the \code{geom} part of the layer. An example of this is -\code{stat_density(geom = "area", outline.type = "both")}. The geom's -documentation lists which parameters it can accept. +a \verb{stat_*()} function, the \code{...} argument can be used to pass on parameters +to the \code{geom} part of the layer. An example of this is \code{stat_density(geom = "area", outline.type = "both")}. The geom's documentation lists which +parameters it can accept. \item Inversely, when constructing a layer using a -\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters -to the \code{stat} part of the layer. An example of this is -\code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation -lists which parameters it can accept. +\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters to +the \code{stat} part of the layer. An example of this is \code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists which parameters it +can accept. \item The \code{key_glyph} argument of \code{\link[=layer]{layer()}} may also be passed on through -\code{...}. This can be one of the functions described as -\link[=draw_key]{key glyphs}, to change the display of the layer in the legend. +\code{...}. This can be one of the functions described as \link[=draw_key]{key glyphs}, +to change the display of the layer in the legend. }} \item{orientation}{The orientation of the layer. The default (\code{NA}) @@ -139,31 +134,30 @@ to either \code{"x"} or \code{"y"}. See the \emph{Orientation} section for more upper and lower lines, \code{"upper"}/\code{"lower"} draws the respective lines only. \code{"full"} draws a closed polygon around the area.} -\item{na.rm}{If \code{FALSE}, the default, missing values are removed with -a warning. If \code{TRUE}, missing values are silently removed.} - -\item{show.legend}{logical. Should this layer be included in the legends? -\code{NA}, the default, includes if any aesthetics are mapped. -\code{FALSE} never includes, and \code{TRUE} always includes. -It can also be a named logical vector to finely select the aesthetics to -display. To include legend keys for all levels, even -when no data exists, use \code{TRUE}. If \code{NA}, all levels are shown in legend, -but unobserved levels are omitted.} - -\item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics, -rather than combining with them. This is most useful for helper functions -that define both data and aesthetics and shouldn't inherit behaviour from -the default plot specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} - -\item{geom}{The geometric object to use to display the data for this layer. -When using a \verb{stat_*()} function to construct a layer, the \code{geom} argument -can be used to override the default coupling between stats and geoms. The -\code{geom} argument accepts the following: +\item{na.rm}{If \code{FALSE}, the default, missing values are removed with a warning. If +\code{TRUE}, missing values are silently removed.} + +\item{show.legend}{Logical. Should this layer be included in the legends? \code{NA}, the default, +includes if any aesthetics are mapped. \code{FALSE} never includes, and \code{TRUE} +always includes. It can also be a named logical vector to finely select the +aesthetics to display. To include legend keys for all levels, even when no +data exists, use \code{TRUE}. If \code{NA}, all levels are shown in legend, but +unobserved levels are omitted.} + +\item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics, rather than combining with +them. This is most useful for helper functions that define both data and +aesthetics and shouldn't inherit behaviour from the default plot +specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} + +\item{geom}{The geometric object to use to display the data for this layer. When using a +\verb{stat_*()} function to construct a layer, the \code{geom} argument can be used to +override the default coupling between stats and geoms. The \code{geom} argument +accepts the following: \itemize{ \item A \code{Geom} ggproto subclass, for example \code{GeomPoint}. \item A string naming the geom. To give the geom as a string, strip the -function name of the \code{geom_} prefix. For example, to use \code{geom_point()}, -give the geom as \code{"point"}. +function name of the \code{geom_} prefix. For example, to use \code{geom_point()}, give +the geom as \code{"point"}. \item For more information and other ways to specify the geom, see the \link[=layer_geoms]{layer geom} documentation. }} diff --git a/man/geom_rug.Rd b/man/geom_rug.Rd index 2efd6e4796..7bd960f5bb 100644 --- a/man/geom_rug.Rd +++ b/man/geom_rug.Rd @@ -25,73 +25,68 @@ geom_rug( at the top level of the plot. You must supply \code{mapping} if there is no plot mapping.} -\item{data}{The data to be displayed in this layer. There are three -options: - -If \code{NULL}, the default, the data is inherited from the plot -data as specified in the call to \code{\link[=ggplot]{ggplot()}}. - -A \code{data.frame}, or other object, will override the plot -data. All objects will be fortified to produce a data frame. See -\code{\link[=fortify]{fortify()}} for which variables will be created. - -A \code{function} will be called with a single argument, -the plot data. The return value must be a \code{data.frame}, and -will be used as the layer data. A \code{function} can be created -from a \code{formula} (e.g. \code{~ head(.x, 10)}).} +\item{data}{The data to be displayed in this layer. There are three options: +\itemize{ +\item \code{NULL} (default): the data is inherited from the plot data as specified +in the call to \code{\link[=ggplot]{ggplot()}}. +\item A \code{data.frame}, or other object, will override the plot data. All objects +will be fortified to produce a data frame. See \code{\link[=fortify]{fortify()}} for which +variables will be created. +\item A \code{function} will be called with a single argument, the plot data. The return +value must be a \code{data.frame}, and will be used as the layer data. A +\code{function} can be created from a \code{formula} (e.g. \code{~ head(.x, 10)}). +}} -\item{stat}{The statistical transformation to use on the data for this layer. -When using a \verb{geom_*()} function to construct a layer, the \code{stat} -argument can be used to override the default coupling between geoms and -stats. The \code{stat} argument accepts the following: +\item{stat}{The statistical transformation to use on the data for this layer. When using +a \verb{geom_*()} function to construct a layer, the \code{stat} argument can be used +to override the default coupling between geoms and stats. The \code{stat} argument +accepts the following: \itemize{ \item A \code{Stat} ggproto subclass, for example \code{StatCount}. \item A string naming the stat. To give the stat as a string, strip the -function name of the \code{stat_} prefix. For example, to use \code{stat_count()}, -give the stat as \code{"count"}. +function name of the \code{stat_} prefix. For example, to use \code{stat_count()}, give +the stat as \code{"count"}. \item For more information and other ways to specify the stat, see the \link[=layer_stats]{layer stat} documentation. }} -\item{position}{A position adjustment to use on the data for this layer. This -can be used in various ways, including to prevent overplotting and -improving the display. The \code{position} argument accepts the following: +\item{position}{A position adjustment to use on the data for this layer. This can be used in +various ways, including to prevent overplotting and improving the display. +The \code{position} argument accepts the following: \itemize{ \item The result of calling a position function, such as \code{position_jitter()}. This method allows for passing extra arguments to the position. \item A string naming the position adjustment. To give the position as a -string, strip the function name of the \code{position_} prefix. For example, -to use \code{position_jitter()}, give the position as \code{"jitter"}. +string, strip the function name of the \code{position_} prefix. For example, to +use \code{position_jitter()}, give the position as \code{"jitter"}. \item For more information and other ways to specify the position, see the \link[=layer_positions]{layer position} documentation. }} -\item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These -arguments broadly fall into one of 4 categories below. Notably, further -arguments to the \code{position} argument, or aesthetics that are required -can \emph{not} be passed through \code{...}. Unknown arguments that are not part -of the 4 categories below are ignored. +\item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These arguments +broadly fall into one of 4 categories below. Notably, further arguments to +the \code{position} argument, or aesthetics that are required can \emph{not} be passed +through \code{...}. Unknown arguments that are not part of the 4 categories below +are ignored. \itemize{ \item Static aesthetics that are not mapped to a scale, but are at a fixed -value and apply to the layer as a whole. For example, \code{colour = "red"} -or \code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} -section that lists the available options. The 'required' aesthetics -cannot be passed on to the \code{params}. Please note that while passing -unmapped aesthetics as vectors is technically possible, the order and -required length is not guaranteed to be parallel to the input data. +value and apply to the layer as a whole. For example, \code{colour = "red"} or +\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section that +lists the available options. The 'required' aesthetics cannot be passed on to +the \code{params}. Please note that while passing unmapped aesthetics as vectors +is technically possible, the order and required length is not guaranteed to +be parallel to the input data. \item When constructing a layer using -a \verb{stat_*()} function, the \code{...} argument can be used to pass on -parameters to the \code{geom} part of the layer. An example of this is -\code{stat_density(geom = "area", outline.type = "both")}. The geom's -documentation lists which parameters it can accept. +a \verb{stat_*()} function, the \code{...} argument can be used to pass on parameters +to the \code{geom} part of the layer. An example of this is \code{stat_density(geom = "area", outline.type = "both")}. The geom's documentation lists which +parameters it can accept. \item Inversely, when constructing a layer using a -\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters -to the \code{stat} part of the layer. An example of this is -\code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation -lists which parameters it can accept. +\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters to +the \code{stat} part of the layer. An example of this is \code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists which parameters it +can accept. \item The \code{key_glyph} argument of \code{\link[=layer]{layer()}} may also be passed on through -\code{...}. This can be one of the functions described as -\link[=draw_key]{key glyphs}, to change the display of the layer in the legend. +\code{...}. This can be one of the functions described as \link[=draw_key]{key glyphs}, +to change the display of the layer in the legend. }} \item{lineend}{Line end style (round, butt, square).} @@ -104,21 +99,20 @@ bottom, and left.} \item{length}{A \code{\link[grid:unit]{grid::unit()}} object that sets the length of the rug lines. Use scale expansion to avoid overplotting of data.} -\item{na.rm}{If \code{FALSE}, the default, missing values are removed with -a warning. If \code{TRUE}, missing values are silently removed.} - -\item{show.legend}{logical. Should this layer be included in the legends? -\code{NA}, the default, includes if any aesthetics are mapped. -\code{FALSE} never includes, and \code{TRUE} always includes. -It can also be a named logical vector to finely select the aesthetics to -display. To include legend keys for all levels, even -when no data exists, use \code{TRUE}. If \code{NA}, all levels are shown in legend, -but unobserved levels are omitted.} - -\item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics, -rather than combining with them. This is most useful for helper functions -that define both data and aesthetics and shouldn't inherit behaviour from -the default plot specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} +\item{na.rm}{If \code{FALSE}, the default, missing values are removed with a warning. If +\code{TRUE}, missing values are silently removed.} + +\item{show.legend}{Logical. Should this layer be included in the legends? \code{NA}, the default, +includes if any aesthetics are mapped. \code{FALSE} never includes, and \code{TRUE} +always includes. It can also be a named logical vector to finely select the +aesthetics to display. To include legend keys for all levels, even when no +data exists, use \code{TRUE}. If \code{NA}, all levels are shown in legend, but +unobserved levels are omitted.} + +\item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics, rather than combining with +them. This is most useful for helper functions that define both data and +aesthetics and shouldn't inherit behaviour from the default plot +specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} } \description{ A rug plot is a compact visualisation designed to supplement a 2d display diff --git a/man/geom_segment.Rd b/man/geom_segment.Rd index 00fbfeca85..a89594e36f 100644 --- a/man/geom_segment.Rd +++ b/man/geom_segment.Rd @@ -43,73 +43,68 @@ geom_curve( at the top level of the plot. You must supply \code{mapping} if there is no plot mapping.} -\item{data}{The data to be displayed in this layer. There are three -options: - -If \code{NULL}, the default, the data is inherited from the plot -data as specified in the call to \code{\link[=ggplot]{ggplot()}}. - -A \code{data.frame}, or other object, will override the plot -data. All objects will be fortified to produce a data frame. See -\code{\link[=fortify]{fortify()}} for which variables will be created. - -A \code{function} will be called with a single argument, -the plot data. The return value must be a \code{data.frame}, and -will be used as the layer data. A \code{function} can be created -from a \code{formula} (e.g. \code{~ head(.x, 10)}).} +\item{data}{The data to be displayed in this layer. There are three options: +\itemize{ +\item \code{NULL} (default): the data is inherited from the plot data as specified +in the call to \code{\link[=ggplot]{ggplot()}}. +\item A \code{data.frame}, or other object, will override the plot data. All objects +will be fortified to produce a data frame. See \code{\link[=fortify]{fortify()}} for which +variables will be created. +\item A \code{function} will be called with a single argument, the plot data. The return +value must be a \code{data.frame}, and will be used as the layer data. A +\code{function} can be created from a \code{formula} (e.g. \code{~ head(.x, 10)}). +}} -\item{stat}{The statistical transformation to use on the data for this layer. -When using a \verb{geom_*()} function to construct a layer, the \code{stat} -argument can be used to override the default coupling between geoms and -stats. The \code{stat} argument accepts the following: +\item{stat}{The statistical transformation to use on the data for this layer. When using +a \verb{geom_*()} function to construct a layer, the \code{stat} argument can be used +to override the default coupling between geoms and stats. The \code{stat} argument +accepts the following: \itemize{ \item A \code{Stat} ggproto subclass, for example \code{StatCount}. \item A string naming the stat. To give the stat as a string, strip the -function name of the \code{stat_} prefix. For example, to use \code{stat_count()}, -give the stat as \code{"count"}. +function name of the \code{stat_} prefix. For example, to use \code{stat_count()}, give +the stat as \code{"count"}. \item For more information and other ways to specify the stat, see the \link[=layer_stats]{layer stat} documentation. }} -\item{position}{A position adjustment to use on the data for this layer. This -can be used in various ways, including to prevent overplotting and -improving the display. The \code{position} argument accepts the following: +\item{position}{A position adjustment to use on the data for this layer. This can be used in +various ways, including to prevent overplotting and improving the display. +The \code{position} argument accepts the following: \itemize{ \item The result of calling a position function, such as \code{position_jitter()}. This method allows for passing extra arguments to the position. \item A string naming the position adjustment. To give the position as a -string, strip the function name of the \code{position_} prefix. For example, -to use \code{position_jitter()}, give the position as \code{"jitter"}. +string, strip the function name of the \code{position_} prefix. For example, to +use \code{position_jitter()}, give the position as \code{"jitter"}. \item For more information and other ways to specify the position, see the \link[=layer_positions]{layer position} documentation. }} -\item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These -arguments broadly fall into one of 4 categories below. Notably, further -arguments to the \code{position} argument, or aesthetics that are required -can \emph{not} be passed through \code{...}. Unknown arguments that are not part -of the 4 categories below are ignored. +\item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These arguments +broadly fall into one of 4 categories below. Notably, further arguments to +the \code{position} argument, or aesthetics that are required can \emph{not} be passed +through \code{...}. Unknown arguments that are not part of the 4 categories below +are ignored. \itemize{ \item Static aesthetics that are not mapped to a scale, but are at a fixed -value and apply to the layer as a whole. For example, \code{colour = "red"} -or \code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} -section that lists the available options. The 'required' aesthetics -cannot be passed on to the \code{params}. Please note that while passing -unmapped aesthetics as vectors is technically possible, the order and -required length is not guaranteed to be parallel to the input data. +value and apply to the layer as a whole. For example, \code{colour = "red"} or +\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section that +lists the available options. The 'required' aesthetics cannot be passed on to +the \code{params}. Please note that while passing unmapped aesthetics as vectors +is technically possible, the order and required length is not guaranteed to +be parallel to the input data. \item When constructing a layer using -a \verb{stat_*()} function, the \code{...} argument can be used to pass on -parameters to the \code{geom} part of the layer. An example of this is -\code{stat_density(geom = "area", outline.type = "both")}. The geom's -documentation lists which parameters it can accept. +a \verb{stat_*()} function, the \code{...} argument can be used to pass on parameters +to the \code{geom} part of the layer. An example of this is \code{stat_density(geom = "area", outline.type = "both")}. The geom's documentation lists which +parameters it can accept. \item Inversely, when constructing a layer using a -\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters -to the \code{stat} part of the layer. An example of this is -\code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation -lists which parameters it can accept. +\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters to +the \code{stat} part of the layer. An example of this is \code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists which parameters it +can accept. \item The \code{key_glyph} argument of \code{\link[=layer]{layer()}} may also be passed on through -\code{...}. This can be one of the functions described as -\link[=draw_key]{key glyphs}, to change the display of the layer in the legend. +\code{...}. This can be one of the functions described as \link[=draw_key]{key glyphs}, +to change the display of the layer in the legend. }} \item{arrow}{specification for arrow heads, as created by \code{\link[grid:arrow]{grid::arrow()}}.} @@ -121,21 +116,20 @@ means use \code{colour} aesthetic.} \item{linejoin}{Line join style (round, mitre, bevel).} -\item{na.rm}{If \code{FALSE}, the default, missing values are removed with -a warning. If \code{TRUE}, missing values are silently removed.} - -\item{show.legend}{logical. Should this layer be included in the legends? -\code{NA}, the default, includes if any aesthetics are mapped. -\code{FALSE} never includes, and \code{TRUE} always includes. -It can also be a named logical vector to finely select the aesthetics to -display. To include legend keys for all levels, even -when no data exists, use \code{TRUE}. If \code{NA}, all levels are shown in legend, -but unobserved levels are omitted.} - -\item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics, -rather than combining with them. This is most useful for helper functions -that define both data and aesthetics and shouldn't inherit behaviour from -the default plot specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} +\item{na.rm}{If \code{FALSE}, the default, missing values are removed with a warning. If +\code{TRUE}, missing values are silently removed.} + +\item{show.legend}{Logical. Should this layer be included in the legends? \code{NA}, the default, +includes if any aesthetics are mapped. \code{FALSE} never includes, and \code{TRUE} +always includes. It can also be a named logical vector to finely select the +aesthetics to display. To include legend keys for all levels, even when no +data exists, use \code{TRUE}. If \code{NA}, all levels are shown in legend, but +unobserved levels are omitted.} + +\item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics, rather than combining with +them. This is most useful for helper functions that define both data and +aesthetics and shouldn't inherit behaviour from the default plot +specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} \item{curvature}{A numeric value giving the amount of curvature. Negative values produce left-hand curves, positive values diff --git a/man/geom_smooth.Rd b/man/geom_smooth.Rd index 2ce488a9d1..0359bd7a3a 100644 --- a/man/geom_smooth.Rd +++ b/man/geom_smooth.Rd @@ -47,60 +47,55 @@ stat_smooth( at the top level of the plot. You must supply \code{mapping} if there is no plot mapping.} -\item{data}{The data to be displayed in this layer. There are three -options: - -If \code{NULL}, the default, the data is inherited from the plot -data as specified in the call to \code{\link[=ggplot]{ggplot()}}. - -A \code{data.frame}, or other object, will override the plot -data. All objects will be fortified to produce a data frame. See -\code{\link[=fortify]{fortify()}} for which variables will be created. - -A \code{function} will be called with a single argument, -the plot data. The return value must be a \code{data.frame}, and -will be used as the layer data. A \code{function} can be created -from a \code{formula} (e.g. \code{~ head(.x, 10)}).} +\item{data}{The data to be displayed in this layer. There are three options: +\itemize{ +\item \code{NULL} (default): the data is inherited from the plot data as specified +in the call to \code{\link[=ggplot]{ggplot()}}. +\item A \code{data.frame}, or other object, will override the plot data. All objects +will be fortified to produce a data frame. See \code{\link[=fortify]{fortify()}} for which +variables will be created. +\item A \code{function} will be called with a single argument, the plot data. The return +value must be a \code{data.frame}, and will be used as the layer data. A +\code{function} can be created from a \code{formula} (e.g. \code{~ head(.x, 10)}). +}} -\item{position}{A position adjustment to use on the data for this layer. This -can be used in various ways, including to prevent overplotting and -improving the display. The \code{position} argument accepts the following: +\item{position}{A position adjustment to use on the data for this layer. This can be used in +various ways, including to prevent overplotting and improving the display. +The \code{position} argument accepts the following: \itemize{ \item The result of calling a position function, such as \code{position_jitter()}. This method allows for passing extra arguments to the position. \item A string naming the position adjustment. To give the position as a -string, strip the function name of the \code{position_} prefix. For example, -to use \code{position_jitter()}, give the position as \code{"jitter"}. +string, strip the function name of the \code{position_} prefix. For example, to +use \code{position_jitter()}, give the position as \code{"jitter"}. \item For more information and other ways to specify the position, see the \link[=layer_positions]{layer position} documentation. }} -\item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These -arguments broadly fall into one of 4 categories below. Notably, further -arguments to the \code{position} argument, or aesthetics that are required -can \emph{not} be passed through \code{...}. Unknown arguments that are not part -of the 4 categories below are ignored. +\item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These arguments +broadly fall into one of 4 categories below. Notably, further arguments to +the \code{position} argument, or aesthetics that are required can \emph{not} be passed +through \code{...}. Unknown arguments that are not part of the 4 categories below +are ignored. \itemize{ \item Static aesthetics that are not mapped to a scale, but are at a fixed -value and apply to the layer as a whole. For example, \code{colour = "red"} -or \code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} -section that lists the available options. The 'required' aesthetics -cannot be passed on to the \code{params}. Please note that while passing -unmapped aesthetics as vectors is technically possible, the order and -required length is not guaranteed to be parallel to the input data. +value and apply to the layer as a whole. For example, \code{colour = "red"} or +\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section that +lists the available options. The 'required' aesthetics cannot be passed on to +the \code{params}. Please note that while passing unmapped aesthetics as vectors +is technically possible, the order and required length is not guaranteed to +be parallel to the input data. \item When constructing a layer using -a \verb{stat_*()} function, the \code{...} argument can be used to pass on -parameters to the \code{geom} part of the layer. An example of this is -\code{stat_density(geom = "area", outline.type = "both")}. The geom's -documentation lists which parameters it can accept. +a \verb{stat_*()} function, the \code{...} argument can be used to pass on parameters +to the \code{geom} part of the layer. An example of this is \code{stat_density(geom = "area", outline.type = "both")}. The geom's documentation lists which +parameters it can accept. \item Inversely, when constructing a layer using a -\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters -to the \code{stat} part of the layer. An example of this is -\code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation -lists which parameters it can accept. +\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters to +the \code{stat} part of the layer. An example of this is \code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists which parameters it +can accept. \item The \code{key_glyph} argument of \code{\link[=layer]{layer()}} may also be passed on through -\code{...}. This can be one of the functions described as -\link[=draw_key]{key glyphs}, to change the display of the layer in the legend. +\code{...}. This can be one of the functions described as \link[=draw_key]{key glyphs}, +to change the display of the layer in the legend. }} \item{method}{Smoothing method (function) to use, accepts either @@ -128,26 +123,25 @@ observations and \code{formula = y ~ s(x, bs = "cs")} otherwise.} \item{se}{Display confidence band around smooth? (\code{TRUE} by default, see \code{level} to control.)} -\item{na.rm}{If \code{FALSE}, the default, missing values are removed with -a warning. If \code{TRUE}, missing values are silently removed.} +\item{na.rm}{If \code{FALSE}, the default, missing values are removed with a warning. If +\code{TRUE}, missing values are silently removed.} \item{orientation}{The orientation of the layer. The default (\code{NA}) automatically determines the orientation from the aesthetic mapping. In the rare event that this fails it can be given explicitly by setting \code{orientation} to either \code{"x"} or \code{"y"}. See the \emph{Orientation} section for more detail.} -\item{show.legend}{logical. Should this layer be included in the legends? -\code{NA}, the default, includes if any aesthetics are mapped. -\code{FALSE} never includes, and \code{TRUE} always includes. -It can also be a named logical vector to finely select the aesthetics to -display. To include legend keys for all levels, even -when no data exists, use \code{TRUE}. If \code{NA}, all levels are shown in legend, -but unobserved levels are omitted.} - -\item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics, -rather than combining with them. This is most useful for helper functions -that define both data and aesthetics and shouldn't inherit behaviour from -the default plot specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} +\item{show.legend}{Logical. Should this layer be included in the legends? \code{NA}, the default, +includes if any aesthetics are mapped. \code{FALSE} never includes, and \code{TRUE} +always includes. It can also be a named logical vector to finely select the +aesthetics to display. To include legend keys for all levels, even when no +data exists, use \code{TRUE}. If \code{NA}, all levels are shown in legend, but +unobserved levels are omitted.} + +\item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics, rather than combining with +them. This is most useful for helper functions that define both data and +aesthetics and shouldn't inherit behaviour from the default plot +specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} \item{geom, stat}{Use to override the default connection between \code{geom_smooth()} and \code{stat_smooth()}. For more information about overriding diff --git a/man/geom_spoke.Rd b/man/geom_spoke.Rd index 3afed67cca..d36a9f84f8 100644 --- a/man/geom_spoke.Rd +++ b/man/geom_spoke.Rd @@ -26,73 +26,68 @@ geom_spoke( at the top level of the plot. You must supply \code{mapping} if there is no plot mapping.} -\item{data}{The data to be displayed in this layer. There are three -options: - -If \code{NULL}, the default, the data is inherited from the plot -data as specified in the call to \code{\link[=ggplot]{ggplot()}}. - -A \code{data.frame}, or other object, will override the plot -data. All objects will be fortified to produce a data frame. See -\code{\link[=fortify]{fortify()}} for which variables will be created. - -A \code{function} will be called with a single argument, -the plot data. The return value must be a \code{data.frame}, and -will be used as the layer data. A \code{function} can be created -from a \code{formula} (e.g. \code{~ head(.x, 10)}).} +\item{data}{The data to be displayed in this layer. There are three options: +\itemize{ +\item \code{NULL} (default): the data is inherited from the plot data as specified +in the call to \code{\link[=ggplot]{ggplot()}}. +\item A \code{data.frame}, or other object, will override the plot data. All objects +will be fortified to produce a data frame. See \code{\link[=fortify]{fortify()}} for which +variables will be created. +\item A \code{function} will be called with a single argument, the plot data. The return +value must be a \code{data.frame}, and will be used as the layer data. A +\code{function} can be created from a \code{formula} (e.g. \code{~ head(.x, 10)}). +}} -\item{stat}{The statistical transformation to use on the data for this layer. -When using a \verb{geom_*()} function to construct a layer, the \code{stat} -argument can be used to override the default coupling between geoms and -stats. The \code{stat} argument accepts the following: +\item{stat}{The statistical transformation to use on the data for this layer. When using +a \verb{geom_*()} function to construct a layer, the \code{stat} argument can be used +to override the default coupling between geoms and stats. The \code{stat} argument +accepts the following: \itemize{ \item A \code{Stat} ggproto subclass, for example \code{StatCount}. \item A string naming the stat. To give the stat as a string, strip the -function name of the \code{stat_} prefix. For example, to use \code{stat_count()}, -give the stat as \code{"count"}. +function name of the \code{stat_} prefix. For example, to use \code{stat_count()}, give +the stat as \code{"count"}. \item For more information and other ways to specify the stat, see the \link[=layer_stats]{layer stat} documentation. }} -\item{position}{A position adjustment to use on the data for this layer. This -can be used in various ways, including to prevent overplotting and -improving the display. The \code{position} argument accepts the following: +\item{position}{A position adjustment to use on the data for this layer. This can be used in +various ways, including to prevent overplotting and improving the display. +The \code{position} argument accepts the following: \itemize{ \item The result of calling a position function, such as \code{position_jitter()}. This method allows for passing extra arguments to the position. \item A string naming the position adjustment. To give the position as a -string, strip the function name of the \code{position_} prefix. For example, -to use \code{position_jitter()}, give the position as \code{"jitter"}. +string, strip the function name of the \code{position_} prefix. For example, to +use \code{position_jitter()}, give the position as \code{"jitter"}. \item For more information and other ways to specify the position, see the \link[=layer_positions]{layer position} documentation. }} -\item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These -arguments broadly fall into one of 4 categories below. Notably, further -arguments to the \code{position} argument, or aesthetics that are required -can \emph{not} be passed through \code{...}. Unknown arguments that are not part -of the 4 categories below are ignored. +\item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These arguments +broadly fall into one of 4 categories below. Notably, further arguments to +the \code{position} argument, or aesthetics that are required can \emph{not} be passed +through \code{...}. Unknown arguments that are not part of the 4 categories below +are ignored. \itemize{ \item Static aesthetics that are not mapped to a scale, but are at a fixed -value and apply to the layer as a whole. For example, \code{colour = "red"} -or \code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} -section that lists the available options. The 'required' aesthetics -cannot be passed on to the \code{params}. Please note that while passing -unmapped aesthetics as vectors is technically possible, the order and -required length is not guaranteed to be parallel to the input data. +value and apply to the layer as a whole. For example, \code{colour = "red"} or +\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section that +lists the available options. The 'required' aesthetics cannot be passed on to +the \code{params}. Please note that while passing unmapped aesthetics as vectors +is technically possible, the order and required length is not guaranteed to +be parallel to the input data. \item When constructing a layer using -a \verb{stat_*()} function, the \code{...} argument can be used to pass on -parameters to the \code{geom} part of the layer. An example of this is -\code{stat_density(geom = "area", outline.type = "both")}. The geom's -documentation lists which parameters it can accept. +a \verb{stat_*()} function, the \code{...} argument can be used to pass on parameters +to the \code{geom} part of the layer. An example of this is \code{stat_density(geom = "area", outline.type = "both")}. The geom's documentation lists which +parameters it can accept. \item Inversely, when constructing a layer using a -\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters -to the \code{stat} part of the layer. An example of this is -\code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation -lists which parameters it can accept. +\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters to +the \code{stat} part of the layer. An example of this is \code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists which parameters it +can accept. \item The \code{key_glyph} argument of \code{\link[=layer]{layer()}} may also be passed on through -\code{...}. This can be one of the functions described as -\link[=draw_key]{key glyphs}, to change the display of the layer in the legend. +\code{...}. This can be one of the functions described as \link[=draw_key]{key glyphs}, +to change the display of the layer in the legend. }} \item{arrow}{specification for arrow heads, as created by \code{\link[grid:arrow]{grid::arrow()}}.} @@ -104,21 +99,20 @@ means use \code{colour} aesthetic.} \item{linejoin}{Line join style (round, mitre, bevel).} -\item{na.rm}{If \code{FALSE}, the default, missing values are removed with -a warning. If \code{TRUE}, missing values are silently removed.} - -\item{show.legend}{logical. Should this layer be included in the legends? -\code{NA}, the default, includes if any aesthetics are mapped. -\code{FALSE} never includes, and \code{TRUE} always includes. -It can also be a named logical vector to finely select the aesthetics to -display. To include legend keys for all levels, even -when no data exists, use \code{TRUE}. If \code{NA}, all levels are shown in legend, -but unobserved levels are omitted.} - -\item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics, -rather than combining with them. This is most useful for helper functions -that define both data and aesthetics and shouldn't inherit behaviour from -the default plot specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} +\item{na.rm}{If \code{FALSE}, the default, missing values are removed with a warning. If +\code{TRUE}, missing values are silently removed.} + +\item{show.legend}{Logical. Should this layer be included in the legends? \code{NA}, the default, +includes if any aesthetics are mapped. \code{FALSE} never includes, and \code{TRUE} +always includes. It can also be a named logical vector to finely select the +aesthetics to display. To include legend keys for all levels, even when no +data exists, use \code{TRUE}. If \code{NA}, all levels are shown in legend, but +unobserved levels are omitted.} + +\item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics, rather than combining with +them. This is most useful for helper functions that define both data and +aesthetics and shouldn't inherit behaviour from the default plot +specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} } \description{ This is a polar parameterisation of \code{\link[=geom_segment]{geom_segment()}}. It is diff --git a/man/geom_text.Rd b/man/geom_text.Rd index 7362a52ca4..c801be3fbc 100644 --- a/man/geom_text.Rd +++ b/man/geom_text.Rd @@ -45,73 +45,68 @@ geom_text( at the top level of the plot. You must supply \code{mapping} if there is no plot mapping.} -\item{data}{The data to be displayed in this layer. There are three -options: - -If \code{NULL}, the default, the data is inherited from the plot -data as specified in the call to \code{\link[=ggplot]{ggplot()}}. - -A \code{data.frame}, or other object, will override the plot -data. All objects will be fortified to produce a data frame. See -\code{\link[=fortify]{fortify()}} for which variables will be created. - -A \code{function} will be called with a single argument, -the plot data. The return value must be a \code{data.frame}, and -will be used as the layer data. A \code{function} can be created -from a \code{formula} (e.g. \code{~ head(.x, 10)}).} +\item{data}{The data to be displayed in this layer. There are three options: +\itemize{ +\item \code{NULL} (default): the data is inherited from the plot data as specified +in the call to \code{\link[=ggplot]{ggplot()}}. +\item A \code{data.frame}, or other object, will override the plot data. All objects +will be fortified to produce a data frame. See \code{\link[=fortify]{fortify()}} for which +variables will be created. +\item A \code{function} will be called with a single argument, the plot data. The return +value must be a \code{data.frame}, and will be used as the layer data. A +\code{function} can be created from a \code{formula} (e.g. \code{~ head(.x, 10)}). +}} -\item{stat}{The statistical transformation to use on the data for this layer. -When using a \verb{geom_*()} function to construct a layer, the \code{stat} -argument can be used to override the default coupling between geoms and -stats. The \code{stat} argument accepts the following: +\item{stat}{The statistical transformation to use on the data for this layer. When using +a \verb{geom_*()} function to construct a layer, the \code{stat} argument can be used +to override the default coupling between geoms and stats. The \code{stat} argument +accepts the following: \itemize{ \item A \code{Stat} ggproto subclass, for example \code{StatCount}. \item A string naming the stat. To give the stat as a string, strip the -function name of the \code{stat_} prefix. For example, to use \code{stat_count()}, -give the stat as \code{"count"}. +function name of the \code{stat_} prefix. For example, to use \code{stat_count()}, give +the stat as \code{"count"}. \item For more information and other ways to specify the stat, see the \link[=layer_stats]{layer stat} documentation. }} -\item{position}{A position adjustment to use on the data for this layer. This -can be used in various ways, including to prevent overplotting and -improving the display. The \code{position} argument accepts the following: +\item{position}{A position adjustment to use on the data for this layer. This can be used in +various ways, including to prevent overplotting and improving the display. +The \code{position} argument accepts the following: \itemize{ \item The result of calling a position function, such as \code{position_jitter()}. This method allows for passing extra arguments to the position. \item A string naming the position adjustment. To give the position as a -string, strip the function name of the \code{position_} prefix. For example, -to use \code{position_jitter()}, give the position as \code{"jitter"}. +string, strip the function name of the \code{position_} prefix. For example, to +use \code{position_jitter()}, give the position as \code{"jitter"}. \item For more information and other ways to specify the position, see the \link[=layer_positions]{layer position} documentation. }} -\item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These -arguments broadly fall into one of 4 categories below. Notably, further -arguments to the \code{position} argument, or aesthetics that are required -can \emph{not} be passed through \code{...}. Unknown arguments that are not part -of the 4 categories below are ignored. +\item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These arguments +broadly fall into one of 4 categories below. Notably, further arguments to +the \code{position} argument, or aesthetics that are required can \emph{not} be passed +through \code{...}. Unknown arguments that are not part of the 4 categories below +are ignored. \itemize{ \item Static aesthetics that are not mapped to a scale, but are at a fixed -value and apply to the layer as a whole. For example, \code{colour = "red"} -or \code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} -section that lists the available options. The 'required' aesthetics -cannot be passed on to the \code{params}. Please note that while passing -unmapped aesthetics as vectors is technically possible, the order and -required length is not guaranteed to be parallel to the input data. +value and apply to the layer as a whole. For example, \code{colour = "red"} or +\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section that +lists the available options. The 'required' aesthetics cannot be passed on to +the \code{params}. Please note that while passing unmapped aesthetics as vectors +is technically possible, the order and required length is not guaranteed to +be parallel to the input data. \item When constructing a layer using -a \verb{stat_*()} function, the \code{...} argument can be used to pass on -parameters to the \code{geom} part of the layer. An example of this is -\code{stat_density(geom = "area", outline.type = "both")}. The geom's -documentation lists which parameters it can accept. +a \verb{stat_*()} function, the \code{...} argument can be used to pass on parameters +to the \code{geom} part of the layer. An example of this is \code{stat_density(geom = "area", outline.type = "both")}. The geom's documentation lists which +parameters it can accept. \item Inversely, when constructing a layer using a -\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters -to the \code{stat} part of the layer. An example of this is -\code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation -lists which parameters it can accept. +\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters to +the \code{stat} part of the layer. An example of this is \code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists which parameters it +can accept. \item The \code{key_glyph} argument of \code{\link[=layer]{layer()}} may also be passed on through -\code{...}. This can be one of the functions described as -\link[=draw_key]{key glyphs}, to change the display of the layer in the legend. +\code{...}. This can be one of the functions described as \link[=draw_key]{key glyphs}, +to change the display of the layer in the legend. }} \item{parse}{If \code{TRUE}, the labels will be parsed into expressions and @@ -136,21 +131,20 @@ alias for \code{text.colour}.} (\code{"mm"}, default), points (\code{"pt"}), centimetres (\code{"cm"}), inches (\code{"in"}), or picas (\code{"pc"}).} -\item{na.rm}{If \code{FALSE}, the default, missing values are removed with -a warning. If \code{TRUE}, missing values are silently removed.} - -\item{show.legend}{logical. Should this layer be included in the legends? -\code{NA}, the default, includes if any aesthetics are mapped. -\code{FALSE} never includes, and \code{TRUE} always includes. -It can also be a named logical vector to finely select the aesthetics to -display. To include legend keys for all levels, even -when no data exists, use \code{TRUE}. If \code{NA}, all levels are shown in legend, -but unobserved levels are omitted.} - -\item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics, -rather than combining with them. This is most useful for helper functions -that define both data and aesthetics and shouldn't inherit behaviour from -the default plot specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} +\item{na.rm}{If \code{FALSE}, the default, missing values are removed with a warning. If +\code{TRUE}, missing values are silently removed.} + +\item{show.legend}{Logical. Should this layer be included in the legends? \code{NA}, the default, +includes if any aesthetics are mapped. \code{FALSE} never includes, and \code{TRUE} +always includes. It can also be a named logical vector to finely select the +aesthetics to display. To include legend keys for all levels, even when no +data exists, use \code{TRUE}. If \code{NA}, all levels are shown in legend, but +unobserved levels are omitted.} + +\item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics, rather than combining with +them. This is most useful for helper functions that define both data and +aesthetics and shouldn't inherit behaviour from the default plot +specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} \item{check_overlap}{If \code{TRUE}, text that overlaps previous text in the same layer will not be plotted. \code{check_overlap} happens at draw time and in diff --git a/man/geom_tile.Rd b/man/geom_tile.Rd index 3305e7397f..b6621f444f 100644 --- a/man/geom_tile.Rd +++ b/man/geom_tile.Rd @@ -52,73 +52,68 @@ geom_tile( at the top level of the plot. You must supply \code{mapping} if there is no plot mapping.} -\item{data}{The data to be displayed in this layer. There are three -options: - -If \code{NULL}, the default, the data is inherited from the plot -data as specified in the call to \code{\link[=ggplot]{ggplot()}}. - -A \code{data.frame}, or other object, will override the plot -data. All objects will be fortified to produce a data frame. See -\code{\link[=fortify]{fortify()}} for which variables will be created. - -A \code{function} will be called with a single argument, -the plot data. The return value must be a \code{data.frame}, and -will be used as the layer data. A \code{function} can be created -from a \code{formula} (e.g. \code{~ head(.x, 10)}).} +\item{data}{The data to be displayed in this layer. There are three options: +\itemize{ +\item \code{NULL} (default): the data is inherited from the plot data as specified +in the call to \code{\link[=ggplot]{ggplot()}}. +\item A \code{data.frame}, or other object, will override the plot data. All objects +will be fortified to produce a data frame. See \code{\link[=fortify]{fortify()}} for which +variables will be created. +\item A \code{function} will be called with a single argument, the plot data. The return +value must be a \code{data.frame}, and will be used as the layer data. A +\code{function} can be created from a \code{formula} (e.g. \code{~ head(.x, 10)}). +}} -\item{stat}{The statistical transformation to use on the data for this layer. -When using a \verb{geom_*()} function to construct a layer, the \code{stat} -argument can be used to override the default coupling between geoms and -stats. The \code{stat} argument accepts the following: +\item{stat}{The statistical transformation to use on the data for this layer. When using +a \verb{geom_*()} function to construct a layer, the \code{stat} argument can be used +to override the default coupling between geoms and stats. The \code{stat} argument +accepts the following: \itemize{ \item A \code{Stat} ggproto subclass, for example \code{StatCount}. \item A string naming the stat. To give the stat as a string, strip the -function name of the \code{stat_} prefix. For example, to use \code{stat_count()}, -give the stat as \code{"count"}. +function name of the \code{stat_} prefix. For example, to use \code{stat_count()}, give +the stat as \code{"count"}. \item For more information and other ways to specify the stat, see the \link[=layer_stats]{layer stat} documentation. }} -\item{position}{A position adjustment to use on the data for this layer. This -can be used in various ways, including to prevent overplotting and -improving the display. The \code{position} argument accepts the following: +\item{position}{A position adjustment to use on the data for this layer. This can be used in +various ways, including to prevent overplotting and improving the display. +The \code{position} argument accepts the following: \itemize{ \item The result of calling a position function, such as \code{position_jitter()}. This method allows for passing extra arguments to the position. \item A string naming the position adjustment. To give the position as a -string, strip the function name of the \code{position_} prefix. For example, -to use \code{position_jitter()}, give the position as \code{"jitter"}. +string, strip the function name of the \code{position_} prefix. For example, to +use \code{position_jitter()}, give the position as \code{"jitter"}. \item For more information and other ways to specify the position, see the \link[=layer_positions]{layer position} documentation. }} -\item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These -arguments broadly fall into one of 4 categories below. Notably, further -arguments to the \code{position} argument, or aesthetics that are required -can \emph{not} be passed through \code{...}. Unknown arguments that are not part -of the 4 categories below are ignored. +\item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These arguments +broadly fall into one of 4 categories below. Notably, further arguments to +the \code{position} argument, or aesthetics that are required can \emph{not} be passed +through \code{...}. Unknown arguments that are not part of the 4 categories below +are ignored. \itemize{ \item Static aesthetics that are not mapped to a scale, but are at a fixed -value and apply to the layer as a whole. For example, \code{colour = "red"} -or \code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} -section that lists the available options. The 'required' aesthetics -cannot be passed on to the \code{params}. Please note that while passing -unmapped aesthetics as vectors is technically possible, the order and -required length is not guaranteed to be parallel to the input data. +value and apply to the layer as a whole. For example, \code{colour = "red"} or +\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section that +lists the available options. The 'required' aesthetics cannot be passed on to +the \code{params}. Please note that while passing unmapped aesthetics as vectors +is technically possible, the order and required length is not guaranteed to +be parallel to the input data. \item When constructing a layer using -a \verb{stat_*()} function, the \code{...} argument can be used to pass on -parameters to the \code{geom} part of the layer. An example of this is -\code{stat_density(geom = "area", outline.type = "both")}. The geom's -documentation lists which parameters it can accept. +a \verb{stat_*()} function, the \code{...} argument can be used to pass on parameters +to the \code{geom} part of the layer. An example of this is \code{stat_density(geom = "area", outline.type = "both")}. The geom's documentation lists which +parameters it can accept. \item Inversely, when constructing a layer using a -\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters -to the \code{stat} part of the layer. An example of this is -\code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation -lists which parameters it can accept. +\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters to +the \code{stat} part of the layer. An example of this is \code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists which parameters it +can accept. \item The \code{key_glyph} argument of \code{\link[=layer]{layer()}} may also be passed on through -\code{...}. This can be one of the functions described as -\link[=draw_key]{key glyphs}, to change the display of the layer in the legend. +\code{...}. This can be one of the functions described as \link[=draw_key]{key glyphs}, +to change the display of the layer in the legend. }} \item{interpolate}{If \code{TRUE} interpolate linearly, if \code{FALSE} @@ -128,21 +123,20 @@ lists which parameters it can accept. justification value should be a number between 0 and 1. Defaults to 0.5 for both, centering each pixel over its data location.} -\item{na.rm}{If \code{FALSE}, the default, missing values are removed with -a warning. If \code{TRUE}, missing values are silently removed.} - -\item{show.legend}{logical. Should this layer be included in the legends? -\code{NA}, the default, includes if any aesthetics are mapped. -\code{FALSE} never includes, and \code{TRUE} always includes. -It can also be a named logical vector to finely select the aesthetics to -display. To include legend keys for all levels, even -when no data exists, use \code{TRUE}. If \code{NA}, all levels are shown in legend, -but unobserved levels are omitted.} - -\item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics, -rather than combining with them. This is most useful for helper functions -that define both data and aesthetics and shouldn't inherit behaviour from -the default plot specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} +\item{na.rm}{If \code{FALSE}, the default, missing values are removed with a warning. If +\code{TRUE}, missing values are silently removed.} + +\item{show.legend}{Logical. Should this layer be included in the legends? \code{NA}, the default, +includes if any aesthetics are mapped. \code{FALSE} never includes, and \code{TRUE} +always includes. It can also be a named logical vector to finely select the +aesthetics to display. To include legend keys for all levels, even when no +data exists, use \code{TRUE}. If \code{NA}, all levels are shown in legend, but +unobserved levels are omitted.} + +\item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics, rather than combining with +them. This is most useful for helper functions that define both data and +aesthetics and shouldn't inherit behaviour from the default plot +specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} \item{lineend}{Line end style (round, butt, square).} diff --git a/man/geom_violin.Rd b/man/geom_violin.Rd index 571329a598..aef1063443 100644 --- a/man/geom_violin.Rd +++ b/man/geom_violin.Rd @@ -51,60 +51,55 @@ stat_ydensity( at the top level of the plot. You must supply \code{mapping} if there is no plot mapping.} -\item{data}{The data to be displayed in this layer. There are three -options: - -If \code{NULL}, the default, the data is inherited from the plot -data as specified in the call to \code{\link[=ggplot]{ggplot()}}. - -A \code{data.frame}, or other object, will override the plot -data. All objects will be fortified to produce a data frame. See -\code{\link[=fortify]{fortify()}} for which variables will be created. - -A \code{function} will be called with a single argument, -the plot data. The return value must be a \code{data.frame}, and -will be used as the layer data. A \code{function} can be created -from a \code{formula} (e.g. \code{~ head(.x, 10)}).} +\item{data}{The data to be displayed in this layer. There are three options: +\itemize{ +\item \code{NULL} (default): the data is inherited from the plot data as specified +in the call to \code{\link[=ggplot]{ggplot()}}. +\item A \code{data.frame}, or other object, will override the plot data. All objects +will be fortified to produce a data frame. See \code{\link[=fortify]{fortify()}} for which +variables will be created. +\item A \code{function} will be called with a single argument, the plot data. The return +value must be a \code{data.frame}, and will be used as the layer data. A +\code{function} can be created from a \code{formula} (e.g. \code{~ head(.x, 10)}). +}} -\item{position}{A position adjustment to use on the data for this layer. This -can be used in various ways, including to prevent overplotting and -improving the display. The \code{position} argument accepts the following: +\item{position}{A position adjustment to use on the data for this layer. This can be used in +various ways, including to prevent overplotting and improving the display. +The \code{position} argument accepts the following: \itemize{ \item The result of calling a position function, such as \code{position_jitter()}. This method allows for passing extra arguments to the position. \item A string naming the position adjustment. To give the position as a -string, strip the function name of the \code{position_} prefix. For example, -to use \code{position_jitter()}, give the position as \code{"jitter"}. +string, strip the function name of the \code{position_} prefix. For example, to +use \code{position_jitter()}, give the position as \code{"jitter"}. \item For more information and other ways to specify the position, see the \link[=layer_positions]{layer position} documentation. }} -\item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These -arguments broadly fall into one of 4 categories below. Notably, further -arguments to the \code{position} argument, or aesthetics that are required -can \emph{not} be passed through \code{...}. Unknown arguments that are not part -of the 4 categories below are ignored. +\item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These arguments +broadly fall into one of 4 categories below. Notably, further arguments to +the \code{position} argument, or aesthetics that are required can \emph{not} be passed +through \code{...}. Unknown arguments that are not part of the 4 categories below +are ignored. \itemize{ \item Static aesthetics that are not mapped to a scale, but are at a fixed -value and apply to the layer as a whole. For example, \code{colour = "red"} -or \code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} -section that lists the available options. The 'required' aesthetics -cannot be passed on to the \code{params}. Please note that while passing -unmapped aesthetics as vectors is technically possible, the order and -required length is not guaranteed to be parallel to the input data. +value and apply to the layer as a whole. For example, \code{colour = "red"} or +\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section that +lists the available options. The 'required' aesthetics cannot be passed on to +the \code{params}. Please note that while passing unmapped aesthetics as vectors +is technically possible, the order and required length is not guaranteed to +be parallel to the input data. \item When constructing a layer using -a \verb{stat_*()} function, the \code{...} argument can be used to pass on -parameters to the \code{geom} part of the layer. An example of this is -\code{stat_density(geom = "area", outline.type = "both")}. The geom's -documentation lists which parameters it can accept. +a \verb{stat_*()} function, the \code{...} argument can be used to pass on parameters +to the \code{geom} part of the layer. An example of this is \code{stat_density(geom = "area", outline.type = "both")}. The geom's documentation lists which +parameters it can accept. \item Inversely, when constructing a layer using a -\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters -to the \code{stat} part of the layer. An example of this is -\code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation -lists which parameters it can accept. +\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters to +the \code{stat} part of the layer. An example of this is \code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists which parameters it +can accept. \item The \code{key_glyph} argument of \code{\link[=layer]{layer()}} may also be passed on through -\code{...}. This can be one of the functions described as -\link[=draw_key]{key glyphs}, to change the display of the layer in the legend. +\code{...}. This can be one of the functions described as \link[=draw_key]{key glyphs}, +to change the display of the layer in the legend. }} \item{trim}{If \code{TRUE} (default), trim the tails of the violins @@ -128,26 +123,25 @@ specification of drawing quantiles.} the tails). If "count", areas are scaled proportionally to the number of observations. If "width", all violins have the same maximum width.} -\item{na.rm}{If \code{FALSE}, the default, missing values are removed with -a warning. If \code{TRUE}, missing values are silently removed.} +\item{na.rm}{If \code{FALSE}, the default, missing values are removed with a warning. If +\code{TRUE}, missing values are silently removed.} \item{orientation}{The orientation of the layer. The default (\code{NA}) automatically determines the orientation from the aesthetic mapping. In the rare event that this fails it can be given explicitly by setting \code{orientation} to either \code{"x"} or \code{"y"}. See the \emph{Orientation} section for more detail.} -\item{show.legend}{logical. Should this layer be included in the legends? -\code{NA}, the default, includes if any aesthetics are mapped. -\code{FALSE} never includes, and \code{TRUE} always includes. -It can also be a named logical vector to finely select the aesthetics to -display. To include legend keys for all levels, even -when no data exists, use \code{TRUE}. If \code{NA}, all levels are shown in legend, -but unobserved levels are omitted.} - -\item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics, -rather than combining with them. This is most useful for helper functions -that define both data and aesthetics and shouldn't inherit behaviour from -the default plot specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} +\item{show.legend}{Logical. Should this layer be included in the legends? \code{NA}, the default, +includes if any aesthetics are mapped. \code{FALSE} never includes, and \code{TRUE} +always includes. It can also be a named logical vector to finely select the +aesthetics to display. To include legend keys for all levels, even when no +data exists, use \code{TRUE}. If \code{NA}, all levels are shown in legend, but +unobserved levels are omitted.} + +\item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics, rather than combining with +them. This is most useful for helper functions that define both data and +aesthetics and shouldn't inherit behaviour from the default plot +specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} \item{geom, stat}{Use to override the default connection between \code{geom_violin()} and \code{stat_ydensity()}. For more information about diff --git a/man/ggsf.Rd b/man/ggsf.Rd index 3343c6bbdc..bddc269b09 100644 --- a/man/ggsf.Rd +++ b/man/ggsf.Rd @@ -190,49 +190,46 @@ directions.} at the top level of the plot. You must supply \code{mapping} if there is no plot mapping.} -\item{data}{The data to be displayed in this layer. There are three -options: - -If \code{NULL}, the default, the data is inherited from the plot -data as specified in the call to \code{\link[=ggplot]{ggplot()}}. - -A \code{data.frame}, or other object, will override the plot -data. All objects will be fortified to produce a data frame. See -\code{\link[=fortify]{fortify()}} for which variables will be created. - -A \code{function} will be called with a single argument, -the plot data. The return value must be a \code{data.frame}, and -will be used as the layer data. A \code{function} can be created -from a \code{formula} (e.g. \code{~ head(.x, 10)}).} +\item{data}{The data to be displayed in this layer. There are three options: +\itemize{ +\item \code{NULL} (default): the data is inherited from the plot data as specified +in the call to \code{\link[=ggplot]{ggplot()}}. +\item A \code{data.frame}, or other object, will override the plot data. All objects +will be fortified to produce a data frame. See \code{\link[=fortify]{fortify()}} for which +variables will be created. +\item A \code{function} will be called with a single argument, the plot data. The return +value must be a \code{data.frame}, and will be used as the layer data. A +\code{function} can be created from a \code{formula} (e.g. \code{~ head(.x, 10)}). +}} -\item{stat}{The statistical transformation to use on the data for this layer. -When using a \verb{geom_*()} function to construct a layer, the \code{stat} -argument can be used to override the default coupling between geoms and -stats. The \code{stat} argument accepts the following: +\item{stat}{The statistical transformation to use on the data for this layer. When using +a \verb{geom_*()} function to construct a layer, the \code{stat} argument can be used +to override the default coupling between geoms and stats. The \code{stat} argument +accepts the following: \itemize{ \item A \code{Stat} ggproto subclass, for example \code{StatCount}. \item A string naming the stat. To give the stat as a string, strip the -function name of the \code{stat_} prefix. For example, to use \code{stat_count()}, -give the stat as \code{"count"}. +function name of the \code{stat_} prefix. For example, to use \code{stat_count()}, give +the stat as \code{"count"}. \item For more information and other ways to specify the stat, see the \link[=layer_stats]{layer stat} documentation. }} -\item{position}{A position adjustment to use on the data for this layer. This -can be used in various ways, including to prevent overplotting and -improving the display. The \code{position} argument accepts the following: +\item{position}{A position adjustment to use on the data for this layer. This can be used in +various ways, including to prevent overplotting and improving the display. +The \code{position} argument accepts the following: \itemize{ \item The result of calling a position function, such as \code{position_jitter()}. This method allows for passing extra arguments to the position. \item A string naming the position adjustment. To give the position as a -string, strip the function name of the \code{position_} prefix. For example, -to use \code{position_jitter()}, give the position as \code{"jitter"}. +string, strip the function name of the \code{position_} prefix. For example, to +use \code{position_jitter()}, give the position as \code{"jitter"}. \item For more information and other ways to specify the position, see the \link[=layer_positions]{layer position} documentation. }} -\item{na.rm}{If \code{FALSE}, the default, missing values are removed with -a warning. If \code{TRUE}, missing values are silently removed.} +\item{na.rm}{If \code{FALSE}, the default, missing values are removed with a warning. If +\code{TRUE}, missing values are silently removed.} \item{show.legend}{logical. Should this layer be included in the legends? \code{NA}, the default, includes if any aesthetics are mapped. @@ -241,37 +238,35 @@ a warning. If \code{TRUE}, missing values are silently removed.} You can also set this to one of "polygon", "line", and "point" to override the default legend.} -\item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics, -rather than combining with them. This is most useful for helper functions -that define both data and aesthetics and shouldn't inherit behaviour from -the default plot specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} +\item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics, rather than combining with +them. This is most useful for helper functions that define both data and +aesthetics and shouldn't inherit behaviour from the default plot +specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} -\item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These -arguments broadly fall into one of 4 categories below. Notably, further -arguments to the \code{position} argument, or aesthetics that are required -can \emph{not} be passed through \code{...}. Unknown arguments that are not part -of the 4 categories below are ignored. +\item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These arguments +broadly fall into one of 4 categories below. Notably, further arguments to +the \code{position} argument, or aesthetics that are required can \emph{not} be passed +through \code{...}. Unknown arguments that are not part of the 4 categories below +are ignored. \itemize{ \item Static aesthetics that are not mapped to a scale, but are at a fixed -value and apply to the layer as a whole. For example, \code{colour = "red"} -or \code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} -section that lists the available options. The 'required' aesthetics -cannot be passed on to the \code{params}. Please note that while passing -unmapped aesthetics as vectors is technically possible, the order and -required length is not guaranteed to be parallel to the input data. +value and apply to the layer as a whole. For example, \code{colour = "red"} or +\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section that +lists the available options. The 'required' aesthetics cannot be passed on to +the \code{params}. Please note that while passing unmapped aesthetics as vectors +is technically possible, the order and required length is not guaranteed to +be parallel to the input data. \item When constructing a layer using -a \verb{stat_*()} function, the \code{...} argument can be used to pass on -parameters to the \code{geom} part of the layer. An example of this is -\code{stat_density(geom = "area", outline.type = "both")}. The geom's -documentation lists which parameters it can accept. +a \verb{stat_*()} function, the \code{...} argument can be used to pass on parameters +to the \code{geom} part of the layer. An example of this is \code{stat_density(geom = "area", outline.type = "both")}. The geom's documentation lists which +parameters it can accept. \item Inversely, when constructing a layer using a -\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters -to the \code{stat} part of the layer. An example of this is -\code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation -lists which parameters it can accept. +\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters to +the \code{stat} part of the layer. An example of this is \code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists which parameters it +can accept. \item The \code{key_glyph} argument of \code{\link[=layer]{layer()}} may also be passed on through -\code{...}. This can be one of the functions described as -\link[=draw_key]{key glyphs}, to change the display of the layer in the legend. +\code{...}. This can be one of the functions described as \link[=draw_key]{key glyphs}, +to change the display of the layer in the legend. }} \item{parse}{If \code{TRUE}, the labels will be parsed into expressions and @@ -304,15 +299,15 @@ the order of the data. Therefore data should be arranged by the label column before calling \code{geom_text()}. Note that this argument is not supported by \code{geom_label()}.} -\item{geom}{The geometric object to use to display the data for this layer. -When using a \verb{stat_*()} function to construct a layer, the \code{geom} argument -can be used to override the default coupling between stats and geoms. The -\code{geom} argument accepts the following: +\item{geom}{The geometric object to use to display the data for this layer. When using a +\verb{stat_*()} function to construct a layer, the \code{geom} argument can be used to +override the default coupling between stats and geoms. The \code{geom} argument +accepts the following: \itemize{ \item A \code{Geom} ggproto subclass, for example \code{GeomPoint}. \item A string naming the geom. To give the geom as a string, strip the -function name of the \code{geom_} prefix. For example, to use \code{geom_point()}, -give the geom as \code{"point"}. +function name of the \code{geom_} prefix. For example, to use \code{geom_point()}, give +the geom as \code{"point"}. \item For more information and other ways to specify the geom, see the \link[=layer_geoms]{layer geom} documentation. }} diff --git a/man/layer.Rd b/man/layer.Rd index f4b9bfb13f..a3812e268b 100644 --- a/man/layer.Rd +++ b/man/layer.Rd @@ -21,83 +21,79 @@ layer( ) } \arguments{ -\item{geom}{The geometric object to use to display the data for this layer. -When using a \verb{stat_*()} function to construct a layer, the \code{geom} argument -can be used to override the default coupling between stats and geoms. The -\code{geom} argument accepts the following: +\item{geom}{The geometric object to use to display the data for this layer. When using a +\verb{stat_*()} function to construct a layer, the \code{geom} argument can be used to +override the default coupling between stats and geoms. The \code{geom} argument +accepts the following: \itemize{ \item A \code{Geom} ggproto subclass, for example \code{GeomPoint}. \item A string naming the geom. To give the geom as a string, strip the -function name of the \code{geom_} prefix. For example, to use \code{geom_point()}, -give the geom as \code{"point"}. +function name of the \code{geom_} prefix. For example, to use \code{geom_point()}, give +the geom as \code{"point"}. \item For more information and other ways to specify the geom, see the \link[=layer_geoms]{layer geom} documentation. }} -\item{stat}{The statistical transformation to use on the data for this layer. -When using a \verb{geom_*()} function to construct a layer, the \code{stat} -argument can be used to override the default coupling between geoms and -stats. The \code{stat} argument accepts the following: +\item{stat}{The statistical transformation to use on the data for this layer. When using +a \verb{geom_*()} function to construct a layer, the \code{stat} argument can be used +to override the default coupling between geoms and stats. The \code{stat} argument +accepts the following: \itemize{ \item A \code{Stat} ggproto subclass, for example \code{StatCount}. \item A string naming the stat. To give the stat as a string, strip the -function name of the \code{stat_} prefix. For example, to use \code{stat_count()}, -give the stat as \code{"count"}. +function name of the \code{stat_} prefix. For example, to use \code{stat_count()}, give +the stat as \code{"count"}. \item For more information and other ways to specify the stat, see the \link[=layer_stats]{layer stat} documentation. }} -\item{data}{The data to be displayed in this layer. There are three -options: - -If \code{NULL}, the default, the data is inherited from the plot -data as specified in the call to \code{\link[=ggplot]{ggplot()}}. - -A \code{data.frame}, or other object, will override the plot -data. All objects will be fortified to produce a data frame. See -\code{\link[=fortify]{fortify()}} for which variables will be created. - -A \code{function} will be called with a single argument, -the plot data. The return value must be a \code{data.frame}, and -will be used as the layer data. A \code{function} can be created -from a \code{formula} (e.g. \code{~ head(.x, 10)}).} +\item{data}{The data to be displayed in this layer. There are three options: +\itemize{ +\item \code{NULL} (default): the data is inherited from the plot data as specified +in the call to \code{\link[=ggplot]{ggplot()}}. +\item A \code{data.frame}, or other object, will override the plot data. All objects +will be fortified to produce a data frame. See \code{\link[=fortify]{fortify()}} for which +variables will be created. +\item A \code{function} will be called with a single argument, the plot data. The return +value must be a \code{data.frame}, and will be used as the layer data. A +\code{function} can be created from a \code{formula} (e.g. \code{~ head(.x, 10)}). +}} \item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}. If specified and \code{inherit.aes = TRUE} (the default), it is combined with the default mapping at the top level of the plot. You must supply \code{mapping} if there is no plot mapping.} -\item{position}{A position adjustment to use on the data for this layer. This -can be used in various ways, including to prevent overplotting and -improving the display. The \code{position} argument accepts the following: +\item{position}{A position adjustment to use on the data for this layer. This can be used in +various ways, including to prevent overplotting and improving the display. +The \code{position} argument accepts the following: \itemize{ \item The result of calling a position function, such as \code{position_jitter()}. This method allows for passing extra arguments to the position. \item A string naming the position adjustment. To give the position as a -string, strip the function name of the \code{position_} prefix. For example, -to use \code{position_jitter()}, give the position as \code{"jitter"}. +string, strip the function name of the \code{position_} prefix. For example, to +use \code{position_jitter()}, give the position as \code{"jitter"}. \item For more information and other ways to specify the position, see the \link[=layer_positions]{layer position} documentation. }} \item{params}{Additional parameters to the \code{geom} and \code{stat}.} -\item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics, -rather than combining with them. This is most useful for helper functions -that define both data and aesthetics and shouldn't inherit behaviour from -the default plot specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} +\item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics, rather than combining with +them. This is most useful for helper functions that define both data and +aesthetics and shouldn't inherit behaviour from the default plot +specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} \item{check.aes, check.param}{If \code{TRUE}, the default, will check that supplied parameters and aesthetics are understood by the \code{geom} or \code{stat}. Use \code{FALSE} to suppress the checks.} -\item{show.legend}{logical. Should this layer be included in the legends? -\code{NA}, the default, includes if any aesthetics are mapped. -\code{FALSE} never includes, and \code{TRUE} always includes. -It can also be a named logical vector to finely select the aesthetics to -display. To include legend keys for all levels, even -when no data exists, use \code{TRUE}. If \code{NA}, all levels are shown in legend, -but unobserved levels are omitted.} +\item{show.legend}{Logical. Should this layer be included in the legends? \code{NA}, the default, +includes if any aesthetics are mapped. \code{FALSE} never includes, and \code{TRUE} +always includes. It can also be a named logical vector to finely select the +aesthetics to display. To include legend keys for all levels, even when no +data exists, use \code{TRUE}. If \code{NA}, all levels are shown in legend, but +unobserved levels are omitted.} \item{key_glyph}{A legend key drawing function or a string providing the function name minus the \code{draw_key_} prefix. See \link{draw_key} for details.} diff --git a/man/layer_sf.Rd b/man/layer_sf.Rd index e9a11604e8..62cb200aef 100644 --- a/man/layer_sf.Rd +++ b/man/layer_sf.Rd @@ -18,83 +18,79 @@ layer_sf( ) } \arguments{ -\item{geom}{The geometric object to use to display the data for this layer. -When using a \verb{stat_*()} function to construct a layer, the \code{geom} argument -can be used to override the default coupling between stats and geoms. The -\code{geom} argument accepts the following: +\item{geom}{The geometric object to use to display the data for this layer. When using a +\verb{stat_*()} function to construct a layer, the \code{geom} argument can be used to +override the default coupling between stats and geoms. The \code{geom} argument +accepts the following: \itemize{ \item A \code{Geom} ggproto subclass, for example \code{GeomPoint}. \item A string naming the geom. To give the geom as a string, strip the -function name of the \code{geom_} prefix. For example, to use \code{geom_point()}, -give the geom as \code{"point"}. +function name of the \code{geom_} prefix. For example, to use \code{geom_point()}, give +the geom as \code{"point"}. \item For more information and other ways to specify the geom, see the \link[=layer_geoms]{layer geom} documentation. }} -\item{stat}{The statistical transformation to use on the data for this layer. -When using a \verb{geom_*()} function to construct a layer, the \code{stat} -argument can be used to override the default coupling between geoms and -stats. The \code{stat} argument accepts the following: +\item{stat}{The statistical transformation to use on the data for this layer. When using +a \verb{geom_*()} function to construct a layer, the \code{stat} argument can be used +to override the default coupling between geoms and stats. The \code{stat} argument +accepts the following: \itemize{ \item A \code{Stat} ggproto subclass, for example \code{StatCount}. \item A string naming the stat. To give the stat as a string, strip the -function name of the \code{stat_} prefix. For example, to use \code{stat_count()}, -give the stat as \code{"count"}. +function name of the \code{stat_} prefix. For example, to use \code{stat_count()}, give +the stat as \code{"count"}. \item For more information and other ways to specify the stat, see the \link[=layer_stats]{layer stat} documentation. }} -\item{data}{The data to be displayed in this layer. There are three -options: - -If \code{NULL}, the default, the data is inherited from the plot -data as specified in the call to \code{\link[=ggplot]{ggplot()}}. - -A \code{data.frame}, or other object, will override the plot -data. All objects will be fortified to produce a data frame. See -\code{\link[=fortify]{fortify()}} for which variables will be created. - -A \code{function} will be called with a single argument, -the plot data. The return value must be a \code{data.frame}, and -will be used as the layer data. A \code{function} can be created -from a \code{formula} (e.g. \code{~ head(.x, 10)}).} +\item{data}{The data to be displayed in this layer. There are three options: +\itemize{ +\item \code{NULL} (default): the data is inherited from the plot data as specified +in the call to \code{\link[=ggplot]{ggplot()}}. +\item A \code{data.frame}, or other object, will override the plot data. All objects +will be fortified to produce a data frame. See \code{\link[=fortify]{fortify()}} for which +variables will be created. +\item A \code{function} will be called with a single argument, the plot data. The return +value must be a \code{data.frame}, and will be used as the layer data. A +\code{function} can be created from a \code{formula} (e.g. \code{~ head(.x, 10)}). +}} \item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}. If specified and \code{inherit.aes = TRUE} (the default), it is combined with the default mapping at the top level of the plot. You must supply \code{mapping} if there is no plot mapping.} -\item{position}{A position adjustment to use on the data for this layer. This -can be used in various ways, including to prevent overplotting and -improving the display. The \code{position} argument accepts the following: +\item{position}{A position adjustment to use on the data for this layer. This can be used in +various ways, including to prevent overplotting and improving the display. +The \code{position} argument accepts the following: \itemize{ \item The result of calling a position function, such as \code{position_jitter()}. This method allows for passing extra arguments to the position. \item A string naming the position adjustment. To give the position as a -string, strip the function name of the \code{position_} prefix. For example, -to use \code{position_jitter()}, give the position as \code{"jitter"}. +string, strip the function name of the \code{position_} prefix. For example, to +use \code{position_jitter()}, give the position as \code{"jitter"}. \item For more information and other ways to specify the position, see the \link[=layer_positions]{layer position} documentation. }} \item{params}{Additional parameters to the \code{geom} and \code{stat}.} -\item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics, -rather than combining with them. This is most useful for helper functions -that define both data and aesthetics and shouldn't inherit behaviour from -the default plot specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} +\item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics, rather than combining with +them. This is most useful for helper functions that define both data and +aesthetics and shouldn't inherit behaviour from the default plot +specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} \item{check.aes, check.param}{If \code{TRUE}, the default, will check that supplied parameters and aesthetics are understood by the \code{geom} or \code{stat}. Use \code{FALSE} to suppress the checks.} -\item{show.legend}{logical. Should this layer be included in the legends? -\code{NA}, the default, includes if any aesthetics are mapped. -\code{FALSE} never includes, and \code{TRUE} always includes. -It can also be a named logical vector to finely select the aesthetics to -display. To include legend keys for all levels, even -when no data exists, use \code{TRUE}. If \code{NA}, all levels are shown in legend, -but unobserved levels are omitted.} +\item{show.legend}{Logical. Should this layer be included in the legends? \code{NA}, the default, +includes if any aesthetics are mapped. \code{FALSE} never includes, and \code{TRUE} +always includes. It can also be a named logical vector to finely select the +aesthetics to display. To include legend keys for all levels, even when no +data exists, use \code{TRUE}. If \code{NA}, all levels are shown in legend, but +unobserved levels are omitted.} } \description{ The \code{layer_sf()} function is a variant of \code{\link[=layer]{layer()}} meant to be used by diff --git a/man/shared_layer_parameters.Rd b/man/shared_layer_parameters.Rd new file mode 100644 index 0000000000..3b4994f2ef --- /dev/null +++ b/man/shared_layer_parameters.Rd @@ -0,0 +1,107 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/layer.R +\name{shared_layer_parameters} +\title{Shared layer parameters} +\arguments{ +\item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}. If specified and +\code{inherit.aes = TRUE} (the default), it is combined with the default mapping +at the top level of the plot. You must supply \code{mapping} if there is no plot +mapping.} + +\item{data}{The data to be displayed in this layer. There are three options: +\itemize{ +\item \code{NULL} (default): the data is inherited from the plot data as specified +in the call to \code{\link[=ggplot]{ggplot()}}. +\item A \code{data.frame}, or other object, will override the plot data. All objects +will be fortified to produce a data frame. See \code{\link[=fortify]{fortify()}} for which +variables will be created. +\item A \code{function} will be called with a single argument, the plot data. The return +value must be a \code{data.frame}, and will be used as the layer data. A +\code{function} can be created from a \code{formula} (e.g. \code{~ head(.x, 10)}). +}} + +\item{geom}{The geometric object to use to display the data for this layer. When using a +\verb{stat_*()} function to construct a layer, the \code{geom} argument can be used to +override the default coupling between stats and geoms. The \code{geom} argument +accepts the following: +\itemize{ +\item A \code{Geom} ggproto subclass, for example \code{GeomPoint}. +\item A string naming the geom. To give the geom as a string, strip the +function name of the \code{geom_} prefix. For example, to use \code{geom_point()}, give +the geom as \code{"point"}. +\item For more information and other ways to specify the geom, see the +\link[=layer_geoms]{layer geom} documentation. +}} + +\item{stat}{The statistical transformation to use on the data for this layer. When using +a \verb{geom_*()} function to construct a layer, the \code{stat} argument can be used +to override the default coupling between geoms and stats. The \code{stat} argument +accepts the following: +\itemize{ +\item A \code{Stat} ggproto subclass, for example \code{StatCount}. +\item A string naming the stat. To give the stat as a string, strip the +function name of the \code{stat_} prefix. For example, to use \code{stat_count()}, give +the stat as \code{"count"}. +\item For more information and other ways to specify the stat, see the +\link[=layer_stats]{layer stat} documentation. +}} + +\item{position}{A position adjustment to use on the data for this layer. This can be used in +various ways, including to prevent overplotting and improving the display. +The \code{position} argument accepts the following: +\itemize{ +\item The result of calling a position function, such as \code{position_jitter()}. +This method allows for passing extra arguments to the position. +\item A string naming the position adjustment. To give the position as a +string, strip the function name of the \code{position_} prefix. For example, to +use \code{position_jitter()}, give the position as \code{"jitter"}. +\item For more information and other ways to specify the position, see the +\link[=layer_positions]{layer position} documentation. +}} + +\item{na.rm}{If \code{FALSE}, the default, missing values are removed with a warning. If +\code{TRUE}, missing values are silently removed.} + +\item{show.legend}{Logical. Should this layer be included in the legends? \code{NA}, the default, +includes if any aesthetics are mapped. \code{FALSE} never includes, and \code{TRUE} +always includes. It can also be a named logical vector to finely select the +aesthetics to display. To include legend keys for all levels, even when no +data exists, use \code{TRUE}. If \code{NA}, all levels are shown in legend, but +unobserved levels are omitted.} + +\item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics, rather than combining with +them. This is most useful for helper functions that define both data and +aesthetics and shouldn't inherit behaviour from the default plot +specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} + +\item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These arguments +broadly fall into one of 4 categories below. Notably, further arguments to +the \code{position} argument, or aesthetics that are required can \emph{not} be passed +through \code{...}. Unknown arguments that are not part of the 4 categories below +are ignored. +\itemize{ +\item Static aesthetics that are not mapped to a scale, but are at a fixed +value and apply to the layer as a whole. For example, \code{colour = "red"} or +\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section that +lists the available options. The 'required' aesthetics cannot be passed on to +the \code{params}. Please note that while passing unmapped aesthetics as vectors +is technically possible, the order and required length is not guaranteed to +be parallel to the input data. +\item When constructing a layer using +a \verb{stat_*()} function, the \code{...} argument can be used to pass on parameters +to the \code{geom} part of the layer. An example of this is \code{stat_density(geom = "area", outline.type = "both")}. The geom's documentation lists which +parameters it can accept. +\item Inversely, when constructing a layer using a +\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters to +the \code{stat} part of the layer. An example of this is \code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists which parameters it +can accept. +\item The \code{key_glyph} argument of \code{\link[=layer]{layer()}} may also be passed on through +\code{...}. This can be one of the functions described as \link[=draw_key]{key glyphs}, +to change the display of the layer in the legend. +}} +} +\description{ +This is a central place for describing typical layer parameters. It prevents +cluttered definitions all over the place. +} +\keyword{internal} diff --git a/man/stat_connect.Rd b/man/stat_connect.Rd index 12ad9a608a..557ae3ec9e 100644 --- a/man/stat_connect.Rd +++ b/man/stat_connect.Rd @@ -22,73 +22,68 @@ stat_connect( at the top level of the plot. You must supply \code{mapping} if there is no plot mapping.} -\item{data}{The data to be displayed in this layer. There are three -options: - -If \code{NULL}, the default, the data is inherited from the plot -data as specified in the call to \code{\link[=ggplot]{ggplot()}}. - -A \code{data.frame}, or other object, will override the plot -data. All objects will be fortified to produce a data frame. See -\code{\link[=fortify]{fortify()}} for which variables will be created. - -A \code{function} will be called with a single argument, -the plot data. The return value must be a \code{data.frame}, and -will be used as the layer data. A \code{function} can be created -from a \code{formula} (e.g. \code{~ head(.x, 10)}).} +\item{data}{The data to be displayed in this layer. There are three options: +\itemize{ +\item \code{NULL} (default): the data is inherited from the plot data as specified +in the call to \code{\link[=ggplot]{ggplot()}}. +\item A \code{data.frame}, or other object, will override the plot data. All objects +will be fortified to produce a data frame. See \code{\link[=fortify]{fortify()}} for which +variables will be created. +\item A \code{function} will be called with a single argument, the plot data. The return +value must be a \code{data.frame}, and will be used as the layer data. A +\code{function} can be created from a \code{formula} (e.g. \code{~ head(.x, 10)}). +}} -\item{geom}{The geometric object to use to display the data for this layer. -When using a \verb{stat_*()} function to construct a layer, the \code{geom} argument -can be used to override the default coupling between stats and geoms. The -\code{geom} argument accepts the following: +\item{geom}{The geometric object to use to display the data for this layer. When using a +\verb{stat_*()} function to construct a layer, the \code{geom} argument can be used to +override the default coupling between stats and geoms. The \code{geom} argument +accepts the following: \itemize{ \item A \code{Geom} ggproto subclass, for example \code{GeomPoint}. \item A string naming the geom. To give the geom as a string, strip the -function name of the \code{geom_} prefix. For example, to use \code{geom_point()}, -give the geom as \code{"point"}. +function name of the \code{geom_} prefix. For example, to use \code{geom_point()}, give +the geom as \code{"point"}. \item For more information and other ways to specify the geom, see the \link[=layer_geoms]{layer geom} documentation. }} -\item{position}{A position adjustment to use on the data for this layer. This -can be used in various ways, including to prevent overplotting and -improving the display. The \code{position} argument accepts the following: +\item{position}{A position adjustment to use on the data for this layer. This can be used in +various ways, including to prevent overplotting and improving the display. +The \code{position} argument accepts the following: \itemize{ \item The result of calling a position function, such as \code{position_jitter()}. This method allows for passing extra arguments to the position. \item A string naming the position adjustment. To give the position as a -string, strip the function name of the \code{position_} prefix. For example, -to use \code{position_jitter()}, give the position as \code{"jitter"}. +string, strip the function name of the \code{position_} prefix. For example, to +use \code{position_jitter()}, give the position as \code{"jitter"}. \item For more information and other ways to specify the position, see the \link[=layer_positions]{layer position} documentation. }} -\item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These -arguments broadly fall into one of 4 categories below. Notably, further -arguments to the \code{position} argument, or aesthetics that are required -can \emph{not} be passed through \code{...}. Unknown arguments that are not part -of the 4 categories below are ignored. +\item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These arguments +broadly fall into one of 4 categories below. Notably, further arguments to +the \code{position} argument, or aesthetics that are required can \emph{not} be passed +through \code{...}. Unknown arguments that are not part of the 4 categories below +are ignored. \itemize{ \item Static aesthetics that are not mapped to a scale, but are at a fixed -value and apply to the layer as a whole. For example, \code{colour = "red"} -or \code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} -section that lists the available options. The 'required' aesthetics -cannot be passed on to the \code{params}. Please note that while passing -unmapped aesthetics as vectors is technically possible, the order and -required length is not guaranteed to be parallel to the input data. +value and apply to the layer as a whole. For example, \code{colour = "red"} or +\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section that +lists the available options. The 'required' aesthetics cannot be passed on to +the \code{params}. Please note that while passing unmapped aesthetics as vectors +is technically possible, the order and required length is not guaranteed to +be parallel to the input data. \item When constructing a layer using -a \verb{stat_*()} function, the \code{...} argument can be used to pass on -parameters to the \code{geom} part of the layer. An example of this is -\code{stat_density(geom = "area", outline.type = "both")}. The geom's -documentation lists which parameters it can accept. +a \verb{stat_*()} function, the \code{...} argument can be used to pass on parameters +to the \code{geom} part of the layer. An example of this is \code{stat_density(geom = "area", outline.type = "both")}. The geom's documentation lists which +parameters it can accept. \item Inversely, when constructing a layer using a -\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters -to the \code{stat} part of the layer. An example of this is -\code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation -lists which parameters it can accept. +\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters to +the \code{stat} part of the layer. An example of this is \code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists which parameters it +can accept. \item The \code{key_glyph} argument of \code{\link[=layer]{layer()}} may also be passed on through -\code{...}. This can be one of the functions described as -\link[=draw_key]{key glyphs}, to change the display of the layer in the legend. +\code{...}. This can be one of the functions described as \link[=draw_key]{key glyphs}, +to change the display of the layer in the legend. }} \item{connection}{A specification of how two points are connected. Can be one @@ -107,21 +102,20 @@ at location (0, 0) and point B at location (1, 1). At least one of these two points is expected to be included in the coordinates. }} -\item{na.rm}{If \code{FALSE}, the default, missing values are removed with -a warning. If \code{TRUE}, missing values are silently removed.} +\item{na.rm}{If \code{FALSE}, the default, missing values are removed with a warning. If +\code{TRUE}, missing values are silently removed.} -\item{show.legend}{logical. Should this layer be included in the legends? -\code{NA}, the default, includes if any aesthetics are mapped. -\code{FALSE} never includes, and \code{TRUE} always includes. -It can also be a named logical vector to finely select the aesthetics to -display. To include legend keys for all levels, even -when no data exists, use \code{TRUE}. If \code{NA}, all levels are shown in legend, -but unobserved levels are omitted.} +\item{show.legend}{Logical. Should this layer be included in the legends? \code{NA}, the default, +includes if any aesthetics are mapped. \code{FALSE} never includes, and \code{TRUE} +always includes. It can also be a named logical vector to finely select the +aesthetics to display. To include legend keys for all levels, even when no +data exists, use \code{TRUE}. If \code{NA}, all levels are shown in legend, but +unobserved levels are omitted.} -\item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics, -rather than combining with them. This is most useful for helper functions -that define both data and aesthetics and shouldn't inherit behaviour from -the default plot specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} +\item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics, rather than combining with +them. This is most useful for helper functions that define both data and +aesthetics and shouldn't inherit behaviour from the default plot +specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} } \description{ Connect successive points with lines of different shapes. diff --git a/man/stat_ecdf.Rd b/man/stat_ecdf.Rd index 3380ac1cc7..38a49ba5a7 100644 --- a/man/stat_ecdf.Rd +++ b/man/stat_ecdf.Rd @@ -23,73 +23,68 @@ stat_ecdf( at the top level of the plot. You must supply \code{mapping} if there is no plot mapping.} -\item{data}{The data to be displayed in this layer. There are three -options: - -If \code{NULL}, the default, the data is inherited from the plot -data as specified in the call to \code{\link[=ggplot]{ggplot()}}. - -A \code{data.frame}, or other object, will override the plot -data. All objects will be fortified to produce a data frame. See -\code{\link[=fortify]{fortify()}} for which variables will be created. - -A \code{function} will be called with a single argument, -the plot data. The return value must be a \code{data.frame}, and -will be used as the layer data. A \code{function} can be created -from a \code{formula} (e.g. \code{~ head(.x, 10)}).} +\item{data}{The data to be displayed in this layer. There are three options: +\itemize{ +\item \code{NULL} (default): the data is inherited from the plot data as specified +in the call to \code{\link[=ggplot]{ggplot()}}. +\item A \code{data.frame}, or other object, will override the plot data. All objects +will be fortified to produce a data frame. See \code{\link[=fortify]{fortify()}} for which +variables will be created. +\item A \code{function} will be called with a single argument, the plot data. The return +value must be a \code{data.frame}, and will be used as the layer data. A +\code{function} can be created from a \code{formula} (e.g. \code{~ head(.x, 10)}). +}} -\item{geom}{The geometric object to use to display the data for this layer. -When using a \verb{stat_*()} function to construct a layer, the \code{geom} argument -can be used to override the default coupling between stats and geoms. The -\code{geom} argument accepts the following: +\item{geom}{The geometric object to use to display the data for this layer. When using a +\verb{stat_*()} function to construct a layer, the \code{geom} argument can be used to +override the default coupling between stats and geoms. The \code{geom} argument +accepts the following: \itemize{ \item A \code{Geom} ggproto subclass, for example \code{GeomPoint}. \item A string naming the geom. To give the geom as a string, strip the -function name of the \code{geom_} prefix. For example, to use \code{geom_point()}, -give the geom as \code{"point"}. +function name of the \code{geom_} prefix. For example, to use \code{geom_point()}, give +the geom as \code{"point"}. \item For more information and other ways to specify the geom, see the \link[=layer_geoms]{layer geom} documentation. }} -\item{position}{A position adjustment to use on the data for this layer. This -can be used in various ways, including to prevent overplotting and -improving the display. The \code{position} argument accepts the following: +\item{position}{A position adjustment to use on the data for this layer. This can be used in +various ways, including to prevent overplotting and improving the display. +The \code{position} argument accepts the following: \itemize{ \item The result of calling a position function, such as \code{position_jitter()}. This method allows for passing extra arguments to the position. \item A string naming the position adjustment. To give the position as a -string, strip the function name of the \code{position_} prefix. For example, -to use \code{position_jitter()}, give the position as \code{"jitter"}. +string, strip the function name of the \code{position_} prefix. For example, to +use \code{position_jitter()}, give the position as \code{"jitter"}. \item For more information and other ways to specify the position, see the \link[=layer_positions]{layer position} documentation. }} -\item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These -arguments broadly fall into one of 4 categories below. Notably, further -arguments to the \code{position} argument, or aesthetics that are required -can \emph{not} be passed through \code{...}. Unknown arguments that are not part -of the 4 categories below are ignored. +\item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These arguments +broadly fall into one of 4 categories below. Notably, further arguments to +the \code{position} argument, or aesthetics that are required can \emph{not} be passed +through \code{...}. Unknown arguments that are not part of the 4 categories below +are ignored. \itemize{ \item Static aesthetics that are not mapped to a scale, but are at a fixed -value and apply to the layer as a whole. For example, \code{colour = "red"} -or \code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} -section that lists the available options. The 'required' aesthetics -cannot be passed on to the \code{params}. Please note that while passing -unmapped aesthetics as vectors is technically possible, the order and -required length is not guaranteed to be parallel to the input data. +value and apply to the layer as a whole. For example, \code{colour = "red"} or +\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section that +lists the available options. The 'required' aesthetics cannot be passed on to +the \code{params}. Please note that while passing unmapped aesthetics as vectors +is technically possible, the order and required length is not guaranteed to +be parallel to the input data. \item When constructing a layer using -a \verb{stat_*()} function, the \code{...} argument can be used to pass on -parameters to the \code{geom} part of the layer. An example of this is -\code{stat_density(geom = "area", outline.type = "both")}. The geom's -documentation lists which parameters it can accept. +a \verb{stat_*()} function, the \code{...} argument can be used to pass on parameters +to the \code{geom} part of the layer. An example of this is \code{stat_density(geom = "area", outline.type = "both")}. The geom's documentation lists which +parameters it can accept. \item Inversely, when constructing a layer using a -\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters -to the \code{stat} part of the layer. An example of this is -\code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation -lists which parameters it can accept. +\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters to +the \code{stat} part of the layer. An example of this is \code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists which parameters it +can accept. \item The \code{key_glyph} argument of \code{\link[=layer]{layer()}} may also be passed on through -\code{...}. This can be one of the functions described as -\link[=draw_key]{key glyphs}, to change the display of the layer in the legend. +\code{...}. This can be one of the functions described as \link[=draw_key]{key glyphs}, +to change the display of the layer in the legend. }} \item{n}{if NULL, do not interpolate. If not NULL, this is the number @@ -101,18 +96,17 @@ and (Inf, 1)} \item{na.rm}{If \code{FALSE} (the default), removes missing values with a warning. If \code{TRUE} silently removes missing values.} -\item{show.legend}{logical. Should this layer be included in the legends? -\code{NA}, the default, includes if any aesthetics are mapped. -\code{FALSE} never includes, and \code{TRUE} always includes. -It can also be a named logical vector to finely select the aesthetics to -display. To include legend keys for all levels, even -when no data exists, use \code{TRUE}. If \code{NA}, all levels are shown in legend, -but unobserved levels are omitted.} - -\item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics, -rather than combining with them. This is most useful for helper functions -that define both data and aesthetics and shouldn't inherit behaviour from -the default plot specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} +\item{show.legend}{Logical. Should this layer be included in the legends? \code{NA}, the default, +includes if any aesthetics are mapped. \code{FALSE} never includes, and \code{TRUE} +always includes. It can also be a named logical vector to finely select the +aesthetics to display. To include legend keys for all levels, even when no +data exists, use \code{TRUE}. If \code{NA}, all levels are shown in legend, but +unobserved levels are omitted.} + +\item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics, rather than combining with +them. This is most useful for helper functions that define both data and +aesthetics and shouldn't inherit behaviour from the default plot +specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} } \description{ The empirical cumulative distribution function (ECDF) provides an alternative diff --git a/man/stat_ellipse.Rd b/man/stat_ellipse.Rd index 0d3014b344..a8c6c3c260 100644 --- a/man/stat_ellipse.Rd +++ b/man/stat_ellipse.Rd @@ -24,73 +24,68 @@ stat_ellipse( at the top level of the plot. You must supply \code{mapping} if there is no plot mapping.} -\item{data}{The data to be displayed in this layer. There are three -options: - -If \code{NULL}, the default, the data is inherited from the plot -data as specified in the call to \code{\link[=ggplot]{ggplot()}}. - -A \code{data.frame}, or other object, will override the plot -data. All objects will be fortified to produce a data frame. See -\code{\link[=fortify]{fortify()}} for which variables will be created. - -A \code{function} will be called with a single argument, -the plot data. The return value must be a \code{data.frame}, and -will be used as the layer data. A \code{function} can be created -from a \code{formula} (e.g. \code{~ head(.x, 10)}).} +\item{data}{The data to be displayed in this layer. There are three options: +\itemize{ +\item \code{NULL} (default): the data is inherited from the plot data as specified +in the call to \code{\link[=ggplot]{ggplot()}}. +\item A \code{data.frame}, or other object, will override the plot data. All objects +will be fortified to produce a data frame. See \code{\link[=fortify]{fortify()}} for which +variables will be created. +\item A \code{function} will be called with a single argument, the plot data. The return +value must be a \code{data.frame}, and will be used as the layer data. A +\code{function} can be created from a \code{formula} (e.g. \code{~ head(.x, 10)}). +}} -\item{geom}{The geometric object to use to display the data for this layer. -When using a \verb{stat_*()} function to construct a layer, the \code{geom} argument -can be used to override the default coupling between stats and geoms. The -\code{geom} argument accepts the following: +\item{geom}{The geometric object to use to display the data for this layer. When using a +\verb{stat_*()} function to construct a layer, the \code{geom} argument can be used to +override the default coupling between stats and geoms. The \code{geom} argument +accepts the following: \itemize{ \item A \code{Geom} ggproto subclass, for example \code{GeomPoint}. \item A string naming the geom. To give the geom as a string, strip the -function name of the \code{geom_} prefix. For example, to use \code{geom_point()}, -give the geom as \code{"point"}. +function name of the \code{geom_} prefix. For example, to use \code{geom_point()}, give +the geom as \code{"point"}. \item For more information and other ways to specify the geom, see the \link[=layer_geoms]{layer geom} documentation. }} -\item{position}{A position adjustment to use on the data for this layer. This -can be used in various ways, including to prevent overplotting and -improving the display. The \code{position} argument accepts the following: +\item{position}{A position adjustment to use on the data for this layer. This can be used in +various ways, including to prevent overplotting and improving the display. +The \code{position} argument accepts the following: \itemize{ \item The result of calling a position function, such as \code{position_jitter()}. This method allows for passing extra arguments to the position. \item A string naming the position adjustment. To give the position as a -string, strip the function name of the \code{position_} prefix. For example, -to use \code{position_jitter()}, give the position as \code{"jitter"}. +string, strip the function name of the \code{position_} prefix. For example, to +use \code{position_jitter()}, give the position as \code{"jitter"}. \item For more information and other ways to specify the position, see the \link[=layer_positions]{layer position} documentation. }} -\item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These -arguments broadly fall into one of 4 categories below. Notably, further -arguments to the \code{position} argument, or aesthetics that are required -can \emph{not} be passed through \code{...}. Unknown arguments that are not part -of the 4 categories below are ignored. +\item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These arguments +broadly fall into one of 4 categories below. Notably, further arguments to +the \code{position} argument, or aesthetics that are required can \emph{not} be passed +through \code{...}. Unknown arguments that are not part of the 4 categories below +are ignored. \itemize{ \item Static aesthetics that are not mapped to a scale, but are at a fixed -value and apply to the layer as a whole. For example, \code{colour = "red"} -or \code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} -section that lists the available options. The 'required' aesthetics -cannot be passed on to the \code{params}. Please note that while passing -unmapped aesthetics as vectors is technically possible, the order and -required length is not guaranteed to be parallel to the input data. +value and apply to the layer as a whole. For example, \code{colour = "red"} or +\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section that +lists the available options. The 'required' aesthetics cannot be passed on to +the \code{params}. Please note that while passing unmapped aesthetics as vectors +is technically possible, the order and required length is not guaranteed to +be parallel to the input data. \item When constructing a layer using -a \verb{stat_*()} function, the \code{...} argument can be used to pass on -parameters to the \code{geom} part of the layer. An example of this is -\code{stat_density(geom = "area", outline.type = "both")}. The geom's -documentation lists which parameters it can accept. +a \verb{stat_*()} function, the \code{...} argument can be used to pass on parameters +to the \code{geom} part of the layer. An example of this is \code{stat_density(geom = "area", outline.type = "both")}. The geom's documentation lists which +parameters it can accept. \item Inversely, when constructing a layer using a -\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters -to the \code{stat} part of the layer. An example of this is -\code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation -lists which parameters it can accept. +\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters to +the \code{stat} part of the layer. An example of this is \code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists which parameters it +can accept. \item The \code{key_glyph} argument of \code{\link[=layer]{layer()}} may also be passed on through -\code{...}. This can be one of the functions described as -\link[=draw_key]{key glyphs}, to change the display of the layer in the legend. +\code{...}. This can be one of the functions described as \link[=draw_key]{key glyphs}, +to change the display of the layer in the legend. }} \item{type}{The type of ellipse. @@ -105,21 +100,20 @@ or, if \code{type="euclid"}, the radius of the circle to be drawn.} \item{segments}{The number of segments to be used in drawing the ellipse.} -\item{na.rm}{If \code{FALSE}, the default, missing values are removed with -a warning. If \code{TRUE}, missing values are silently removed.} - -\item{show.legend}{logical. Should this layer be included in the legends? -\code{NA}, the default, includes if any aesthetics are mapped. -\code{FALSE} never includes, and \code{TRUE} always includes. -It can also be a named logical vector to finely select the aesthetics to -display. To include legend keys for all levels, even -when no data exists, use \code{TRUE}. If \code{NA}, all levels are shown in legend, -but unobserved levels are omitted.} - -\item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics, -rather than combining with them. This is most useful for helper functions -that define both data and aesthetics and shouldn't inherit behaviour from -the default plot specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} +\item{na.rm}{If \code{FALSE}, the default, missing values are removed with a warning. If +\code{TRUE}, missing values are silently removed.} + +\item{show.legend}{Logical. Should this layer be included in the legends? \code{NA}, the default, +includes if any aesthetics are mapped. \code{FALSE} never includes, and \code{TRUE} +always includes. It can also be a named logical vector to finely select the +aesthetics to display. To include legend keys for all levels, even when no +data exists, use \code{TRUE}. If \code{NA}, all levels are shown in legend, but +unobserved levels are omitted.} + +\item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics, rather than combining with +them. This is most useful for helper functions that define both data and +aesthetics and shouldn't inherit behaviour from the default plot +specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} } \description{ The method for calculating the ellipses has been modified from diff --git a/man/stat_identity.Rd b/man/stat_identity.Rd index 9c1640e2b4..e165152c59 100644 --- a/man/stat_identity.Rd +++ b/man/stat_identity.Rd @@ -21,90 +21,84 @@ stat_identity( at the top level of the plot. You must supply \code{mapping} if there is no plot mapping.} -\item{data}{The data to be displayed in this layer. There are three -options: - -If \code{NULL}, the default, the data is inherited from the plot -data as specified in the call to \code{\link[=ggplot]{ggplot()}}. - -A \code{data.frame}, or other object, will override the plot -data. All objects will be fortified to produce a data frame. See -\code{\link[=fortify]{fortify()}} for which variables will be created. - -A \code{function} will be called with a single argument, -the plot data. The return value must be a \code{data.frame}, and -will be used as the layer data. A \code{function} can be created -from a \code{formula} (e.g. \code{~ head(.x, 10)}).} +\item{data}{The data to be displayed in this layer. There are three options: +\itemize{ +\item \code{NULL} (default): the data is inherited from the plot data as specified +in the call to \code{\link[=ggplot]{ggplot()}}. +\item A \code{data.frame}, or other object, will override the plot data. All objects +will be fortified to produce a data frame. See \code{\link[=fortify]{fortify()}} for which +variables will be created. +\item A \code{function} will be called with a single argument, the plot data. The return +value must be a \code{data.frame}, and will be used as the layer data. A +\code{function} can be created from a \code{formula} (e.g. \code{~ head(.x, 10)}). +}} -\item{geom}{The geometric object to use to display the data for this layer. -When using a \verb{stat_*()} function to construct a layer, the \code{geom} argument -can be used to override the default coupling between stats and geoms. The -\code{geom} argument accepts the following: +\item{geom}{The geometric object to use to display the data for this layer. When using a +\verb{stat_*()} function to construct a layer, the \code{geom} argument can be used to +override the default coupling between stats and geoms. The \code{geom} argument +accepts the following: \itemize{ \item A \code{Geom} ggproto subclass, for example \code{GeomPoint}. \item A string naming the geom. To give the geom as a string, strip the -function name of the \code{geom_} prefix. For example, to use \code{geom_point()}, -give the geom as \code{"point"}. +function name of the \code{geom_} prefix. For example, to use \code{geom_point()}, give +the geom as \code{"point"}. \item For more information and other ways to specify the geom, see the \link[=layer_geoms]{layer geom} documentation. }} -\item{position}{A position adjustment to use on the data for this layer. This -can be used in various ways, including to prevent overplotting and -improving the display. The \code{position} argument accepts the following: +\item{position}{A position adjustment to use on the data for this layer. This can be used in +various ways, including to prevent overplotting and improving the display. +The \code{position} argument accepts the following: \itemize{ \item The result of calling a position function, such as \code{position_jitter()}. This method allows for passing extra arguments to the position. \item A string naming the position adjustment. To give the position as a -string, strip the function name of the \code{position_} prefix. For example, -to use \code{position_jitter()}, give the position as \code{"jitter"}. +string, strip the function name of the \code{position_} prefix. For example, to +use \code{position_jitter()}, give the position as \code{"jitter"}. \item For more information and other ways to specify the position, see the \link[=layer_positions]{layer position} documentation. }} -\item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These -arguments broadly fall into one of 4 categories below. Notably, further -arguments to the \code{position} argument, or aesthetics that are required -can \emph{not} be passed through \code{...}. Unknown arguments that are not part -of the 4 categories below are ignored. +\item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These arguments +broadly fall into one of 4 categories below. Notably, further arguments to +the \code{position} argument, or aesthetics that are required can \emph{not} be passed +through \code{...}. Unknown arguments that are not part of the 4 categories below +are ignored. \itemize{ \item Static aesthetics that are not mapped to a scale, but are at a fixed -value and apply to the layer as a whole. For example, \code{colour = "red"} -or \code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} -section that lists the available options. The 'required' aesthetics -cannot be passed on to the \code{params}. Please note that while passing -unmapped aesthetics as vectors is technically possible, the order and -required length is not guaranteed to be parallel to the input data. +value and apply to the layer as a whole. For example, \code{colour = "red"} or +\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section that +lists the available options. The 'required' aesthetics cannot be passed on to +the \code{params}. Please note that while passing unmapped aesthetics as vectors +is technically possible, the order and required length is not guaranteed to +be parallel to the input data. \item When constructing a layer using -a \verb{stat_*()} function, the \code{...} argument can be used to pass on -parameters to the \code{geom} part of the layer. An example of this is -\code{stat_density(geom = "area", outline.type = "both")}. The geom's -documentation lists which parameters it can accept. +a \verb{stat_*()} function, the \code{...} argument can be used to pass on parameters +to the \code{geom} part of the layer. An example of this is \code{stat_density(geom = "area", outline.type = "both")}. The geom's documentation lists which +parameters it can accept. \item Inversely, when constructing a layer using a -\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters -to the \code{stat} part of the layer. An example of this is -\code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation -lists which parameters it can accept. +\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters to +the \code{stat} part of the layer. An example of this is \code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists which parameters it +can accept. \item The \code{key_glyph} argument of \code{\link[=layer]{layer()}} may also be passed on through -\code{...}. This can be one of the functions described as -\link[=draw_key]{key glyphs}, to change the display of the layer in the legend. +\code{...}. This can be one of the functions described as \link[=draw_key]{key glyphs}, +to change the display of the layer in the legend. }} -\item{na.rm}{If \code{FALSE}, the default, missing values are removed with -a warning. If \code{TRUE}, missing values are silently removed.} +\item{na.rm}{If \code{FALSE}, the default, missing values are removed with a warning. If +\code{TRUE}, missing values are silently removed.} -\item{show.legend}{logical. Should this layer be included in the legends? -\code{NA}, the default, includes if any aesthetics are mapped. -\code{FALSE} never includes, and \code{TRUE} always includes. -It can also be a named logical vector to finely select the aesthetics to -display. To include legend keys for all levels, even -when no data exists, use \code{TRUE}. If \code{NA}, all levels are shown in legend, -but unobserved levels are omitted.} +\item{show.legend}{Logical. Should this layer be included in the legends? \code{NA}, the default, +includes if any aesthetics are mapped. \code{FALSE} never includes, and \code{TRUE} +always includes. It can also be a named logical vector to finely select the +aesthetics to display. To include legend keys for all levels, even when no +data exists, use \code{TRUE}. If \code{NA}, all levels are shown in legend, but +unobserved levels are omitted.} -\item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics, -rather than combining with them. This is most useful for helper functions -that define both data and aesthetics and shouldn't inherit behaviour from -the default plot specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} +\item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics, rather than combining with +them. This is most useful for helper functions that define both data and +aesthetics and shouldn't inherit behaviour from the default plot +specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} } \description{ The identity statistic leaves the data unchanged. diff --git a/man/stat_manual.Rd b/man/stat_manual.Rd index 5c00a0ea89..46421a5de3 100644 --- a/man/stat_manual.Rd +++ b/man/stat_manual.Rd @@ -23,73 +23,68 @@ stat_manual( at the top level of the plot. You must supply \code{mapping} if there is no plot mapping.} -\item{data}{The data to be displayed in this layer. There are three -options: - -If \code{NULL}, the default, the data is inherited from the plot -data as specified in the call to \code{\link[=ggplot]{ggplot()}}. - -A \code{data.frame}, or other object, will override the plot -data. All objects will be fortified to produce a data frame. See -\code{\link[=fortify]{fortify()}} for which variables will be created. - -A \code{function} will be called with a single argument, -the plot data. The return value must be a \code{data.frame}, and -will be used as the layer data. A \code{function} can be created -from a \code{formula} (e.g. \code{~ head(.x, 10)}).} +\item{data}{The data to be displayed in this layer. There are three options: +\itemize{ +\item \code{NULL} (default): the data is inherited from the plot data as specified +in the call to \code{\link[=ggplot]{ggplot()}}. +\item A \code{data.frame}, or other object, will override the plot data. All objects +will be fortified to produce a data frame. See \code{\link[=fortify]{fortify()}} for which +variables will be created. +\item A \code{function} will be called with a single argument, the plot data. The return +value must be a \code{data.frame}, and will be used as the layer data. A +\code{function} can be created from a \code{formula} (e.g. \code{~ head(.x, 10)}). +}} -\item{geom}{The geometric object to use to display the data for this layer. -When using a \verb{stat_*()} function to construct a layer, the \code{geom} argument -can be used to override the default coupling between stats and geoms. The -\code{geom} argument accepts the following: +\item{geom}{The geometric object to use to display the data for this layer. When using a +\verb{stat_*()} function to construct a layer, the \code{geom} argument can be used to +override the default coupling between stats and geoms. The \code{geom} argument +accepts the following: \itemize{ \item A \code{Geom} ggproto subclass, for example \code{GeomPoint}. \item A string naming the geom. To give the geom as a string, strip the -function name of the \code{geom_} prefix. For example, to use \code{geom_point()}, -give the geom as \code{"point"}. +function name of the \code{geom_} prefix. For example, to use \code{geom_point()}, give +the geom as \code{"point"}. \item For more information and other ways to specify the geom, see the \link[=layer_geoms]{layer geom} documentation. }} -\item{position}{A position adjustment to use on the data for this layer. This -can be used in various ways, including to prevent overplotting and -improving the display. The \code{position} argument accepts the following: +\item{position}{A position adjustment to use on the data for this layer. This can be used in +various ways, including to prevent overplotting and improving the display. +The \code{position} argument accepts the following: \itemize{ \item The result of calling a position function, such as \code{position_jitter()}. This method allows for passing extra arguments to the position. \item A string naming the position adjustment. To give the position as a -string, strip the function name of the \code{position_} prefix. For example, -to use \code{position_jitter()}, give the position as \code{"jitter"}. +string, strip the function name of the \code{position_} prefix. For example, to +use \code{position_jitter()}, give the position as \code{"jitter"}. \item For more information and other ways to specify the position, see the \link[=layer_positions]{layer position} documentation. }} -\item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These -arguments broadly fall into one of 4 categories below. Notably, further -arguments to the \code{position} argument, or aesthetics that are required -can \emph{not} be passed through \code{...}. Unknown arguments that are not part -of the 4 categories below are ignored. +\item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These arguments +broadly fall into one of 4 categories below. Notably, further arguments to +the \code{position} argument, or aesthetics that are required can \emph{not} be passed +through \code{...}. Unknown arguments that are not part of the 4 categories below +are ignored. \itemize{ \item Static aesthetics that are not mapped to a scale, but are at a fixed -value and apply to the layer as a whole. For example, \code{colour = "red"} -or \code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} -section that lists the available options. The 'required' aesthetics -cannot be passed on to the \code{params}. Please note that while passing -unmapped aesthetics as vectors is technically possible, the order and -required length is not guaranteed to be parallel to the input data. +value and apply to the layer as a whole. For example, \code{colour = "red"} or +\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section that +lists the available options. The 'required' aesthetics cannot be passed on to +the \code{params}. Please note that while passing unmapped aesthetics as vectors +is technically possible, the order and required length is not guaranteed to +be parallel to the input data. \item When constructing a layer using -a \verb{stat_*()} function, the \code{...} argument can be used to pass on -parameters to the \code{geom} part of the layer. An example of this is -\code{stat_density(geom = "area", outline.type = "both")}. The geom's -documentation lists which parameters it can accept. +a \verb{stat_*()} function, the \code{...} argument can be used to pass on parameters +to the \code{geom} part of the layer. An example of this is \code{stat_density(geom = "area", outline.type = "both")}. The geom's documentation lists which +parameters it can accept. \item Inversely, when constructing a layer using a -\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters -to the \code{stat} part of the layer. An example of this is -\code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation -lists which parameters it can accept. +\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters to +the \code{stat} part of the layer. An example of this is \code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists which parameters it +can accept. \item The \code{key_glyph} argument of \code{\link[=layer]{layer()}} may also be passed on through -\code{...}. This can be one of the functions described as -\link[=draw_key]{key glyphs}, to change the display of the layer in the legend. +\code{...}. This can be one of the functions described as \link[=draw_key]{key glyphs}, +to change the display of the layer in the legend. }} \item{fun}{Function that takes a data frame as input and returns a data @@ -98,21 +93,20 @@ the data unchanged.} \item{args}{A list of arguments to pass to the function given in \code{fun}.} -\item{na.rm}{If \code{FALSE}, the default, missing values are removed with -a warning. If \code{TRUE}, missing values are silently removed.} - -\item{show.legend}{logical. Should this layer be included in the legends? -\code{NA}, the default, includes if any aesthetics are mapped. -\code{FALSE} never includes, and \code{TRUE} always includes. -It can also be a named logical vector to finely select the aesthetics to -display. To include legend keys for all levels, even -when no data exists, use \code{TRUE}. If \code{NA}, all levels are shown in legend, -but unobserved levels are omitted.} - -\item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics, -rather than combining with them. This is most useful for helper functions -that define both data and aesthetics and shouldn't inherit behaviour from -the default plot specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} +\item{na.rm}{If \code{FALSE}, the default, missing values are removed with a warning. If +\code{TRUE}, missing values are silently removed.} + +\item{show.legend}{Logical. Should this layer be included in the legends? \code{NA}, the default, +includes if any aesthetics are mapped. \code{FALSE} never includes, and \code{TRUE} +always includes. It can also be a named logical vector to finely select the +aesthetics to display. To include legend keys for all levels, even when no +data exists, use \code{TRUE}. If \code{NA}, all levels are shown in legend, but +unobserved levels are omitted.} + +\item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics, rather than combining with +them. This is most useful for helper functions that define both data and +aesthetics and shouldn't inherit behaviour from the default plot +specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} } \description{ \code{stat_manual()} takes a function that computes a data transformation for diff --git a/man/stat_sf_coordinates.Rd b/man/stat_sf_coordinates.Rd index 3173fa8e86..5d90735b8f 100644 --- a/man/stat_sf_coordinates.Rd +++ b/man/stat_sf_coordinates.Rd @@ -24,62 +24,58 @@ stat_sf_coordinates( at the top level of the plot. You must supply \code{mapping} if there is no plot mapping.} -\item{data}{The data to be displayed in this layer. There are three -options: - -If \code{NULL}, the default, the data is inherited from the plot -data as specified in the call to \code{\link[=ggplot]{ggplot()}}. - -A \code{data.frame}, or other object, will override the plot -data. All objects will be fortified to produce a data frame. See -\code{\link[=fortify]{fortify()}} for which variables will be created. - -A \code{function} will be called with a single argument, -the plot data. The return value must be a \code{data.frame}, and -will be used as the layer data. A \code{function} can be created -from a \code{formula} (e.g. \code{~ head(.x, 10)}).} +\item{data}{The data to be displayed in this layer. There are three options: +\itemize{ +\item \code{NULL} (default): the data is inherited from the plot data as specified +in the call to \code{\link[=ggplot]{ggplot()}}. +\item A \code{data.frame}, or other object, will override the plot data. All objects +will be fortified to produce a data frame. See \code{\link[=fortify]{fortify()}} for which +variables will be created. +\item A \code{function} will be called with a single argument, the plot data. The return +value must be a \code{data.frame}, and will be used as the layer data. A +\code{function} can be created from a \code{formula} (e.g. \code{~ head(.x, 10)}). +}} -\item{geom}{The geometric object to use to display the data for this layer. -When using a \verb{stat_*()} function to construct a layer, the \code{geom} argument -can be used to override the default coupling between stats and geoms. The -\code{geom} argument accepts the following: +\item{geom}{The geometric object to use to display the data for this layer. When using a +\verb{stat_*()} function to construct a layer, the \code{geom} argument can be used to +override the default coupling between stats and geoms. The \code{geom} argument +accepts the following: \itemize{ \item A \code{Geom} ggproto subclass, for example \code{GeomPoint}. \item A string naming the geom. To give the geom as a string, strip the -function name of the \code{geom_} prefix. For example, to use \code{geom_point()}, -give the geom as \code{"point"}. +function name of the \code{geom_} prefix. For example, to use \code{geom_point()}, give +the geom as \code{"point"}. \item For more information and other ways to specify the geom, see the \link[=layer_geoms]{layer geom} documentation. }} -\item{position}{A position adjustment to use on the data for this layer. This -can be used in various ways, including to prevent overplotting and -improving the display. The \code{position} argument accepts the following: +\item{position}{A position adjustment to use on the data for this layer. This can be used in +various ways, including to prevent overplotting and improving the display. +The \code{position} argument accepts the following: \itemize{ \item The result of calling a position function, such as \code{position_jitter()}. This method allows for passing extra arguments to the position. \item A string naming the position adjustment. To give the position as a -string, strip the function name of the \code{position_} prefix. For example, -to use \code{position_jitter()}, give the position as \code{"jitter"}. +string, strip the function name of the \code{position_} prefix. For example, to +use \code{position_jitter()}, give the position as \code{"jitter"}. \item For more information and other ways to specify the position, see the \link[=layer_positions]{layer position} documentation. }} -\item{na.rm}{If \code{FALSE}, the default, missing values are removed with -a warning. If \code{TRUE}, missing values are silently removed.} +\item{na.rm}{If \code{FALSE}, the default, missing values are removed with a warning. If +\code{TRUE}, missing values are silently removed.} -\item{show.legend}{logical. Should this layer be included in the legends? -\code{NA}, the default, includes if any aesthetics are mapped. -\code{FALSE} never includes, and \code{TRUE} always includes. -It can also be a named logical vector to finely select the aesthetics to -display. To include legend keys for all levels, even -when no data exists, use \code{TRUE}. If \code{NA}, all levels are shown in legend, -but unobserved levels are omitted.} +\item{show.legend}{Logical. Should this layer be included in the legends? \code{NA}, the default, +includes if any aesthetics are mapped. \code{FALSE} never includes, and \code{TRUE} +always includes. It can also be a named logical vector to finely select the +aesthetics to display. To include legend keys for all levels, even when no +data exists, use \code{TRUE}. If \code{NA}, all levels are shown in legend, but +unobserved levels are omitted.} -\item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics, -rather than combining with them. This is most useful for helper functions -that define both data and aesthetics and shouldn't inherit behaviour from -the default plot specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} +\item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics, rather than combining with +them. This is most useful for helper functions that define both data and +aesthetics and shouldn't inherit behaviour from the default plot +specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} \item{fun.geometry}{A function that takes a \code{sfc} object and returns a \code{sfc_POINT} with the same length as the input. If \code{NULL}, \code{function(x) sf::st_point_on_surface(sf::st_zm(x))} @@ -87,32 +83,30 @@ will be used. Note that the function may warn about the incorrectness of the result if the data is not projected, but you can ignore this except when you really care about the exact locations.} -\item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These -arguments broadly fall into one of 4 categories below. Notably, further -arguments to the \code{position} argument, or aesthetics that are required -can \emph{not} be passed through \code{...}. Unknown arguments that are not part -of the 4 categories below are ignored. +\item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These arguments +broadly fall into one of 4 categories below. Notably, further arguments to +the \code{position} argument, or aesthetics that are required can \emph{not} be passed +through \code{...}. Unknown arguments that are not part of the 4 categories below +are ignored. \itemize{ \item Static aesthetics that are not mapped to a scale, but are at a fixed -value and apply to the layer as a whole. For example, \code{colour = "red"} -or \code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} -section that lists the available options. The 'required' aesthetics -cannot be passed on to the \code{params}. Please note that while passing -unmapped aesthetics as vectors is technically possible, the order and -required length is not guaranteed to be parallel to the input data. +value and apply to the layer as a whole. For example, \code{colour = "red"} or +\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section that +lists the available options. The 'required' aesthetics cannot be passed on to +the \code{params}. Please note that while passing unmapped aesthetics as vectors +is technically possible, the order and required length is not guaranteed to +be parallel to the input data. \item When constructing a layer using -a \verb{stat_*()} function, the \code{...} argument can be used to pass on -parameters to the \code{geom} part of the layer. An example of this is -\code{stat_density(geom = "area", outline.type = "both")}. The geom's -documentation lists which parameters it can accept. +a \verb{stat_*()} function, the \code{...} argument can be used to pass on parameters +to the \code{geom} part of the layer. An example of this is \code{stat_density(geom = "area", outline.type = "both")}. The geom's documentation lists which +parameters it can accept. \item Inversely, when constructing a layer using a -\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters -to the \code{stat} part of the layer. An example of this is -\code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation -lists which parameters it can accept. +\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters to +the \code{stat} part of the layer. An example of this is \code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists which parameters it +can accept. \item The \code{key_glyph} argument of \code{\link[=layer]{layer()}} may also be passed on through -\code{...}. This can be one of the functions described as -\link[=draw_key]{key glyphs}, to change the display of the layer in the legend. +\code{...}. This can be one of the functions described as \link[=draw_key]{key glyphs}, +to change the display of the layer in the legend. }} } \description{ diff --git a/man/stat_summary.Rd b/man/stat_summary.Rd index ad45350819..d9b7446e75 100644 --- a/man/stat_summary.Rd +++ b/man/stat_summary.Rd @@ -54,73 +54,68 @@ stat_summary( at the top level of the plot. You must supply \code{mapping} if there is no plot mapping.} -\item{data}{The data to be displayed in this layer. There are three -options: - -If \code{NULL}, the default, the data is inherited from the plot -data as specified in the call to \code{\link[=ggplot]{ggplot()}}. - -A \code{data.frame}, or other object, will override the plot -data. All objects will be fortified to produce a data frame. See -\code{\link[=fortify]{fortify()}} for which variables will be created. - -A \code{function} will be called with a single argument, -the plot data. The return value must be a \code{data.frame}, and -will be used as the layer data. A \code{function} can be created -from a \code{formula} (e.g. \code{~ head(.x, 10)}).} +\item{data}{The data to be displayed in this layer. There are three options: +\itemize{ +\item \code{NULL} (default): the data is inherited from the plot data as specified +in the call to \code{\link[=ggplot]{ggplot()}}. +\item A \code{data.frame}, or other object, will override the plot data. All objects +will be fortified to produce a data frame. See \code{\link[=fortify]{fortify()}} for which +variables will be created. +\item A \code{function} will be called with a single argument, the plot data. The return +value must be a \code{data.frame}, and will be used as the layer data. A +\code{function} can be created from a \code{formula} (e.g. \code{~ head(.x, 10)}). +}} -\item{geom}{The geometric object to use to display the data for this layer. -When using a \verb{stat_*()} function to construct a layer, the \code{geom} argument -can be used to override the default coupling between stats and geoms. The -\code{geom} argument accepts the following: +\item{geom}{The geometric object to use to display the data for this layer. When using a +\verb{stat_*()} function to construct a layer, the \code{geom} argument can be used to +override the default coupling between stats and geoms. The \code{geom} argument +accepts the following: \itemize{ \item A \code{Geom} ggproto subclass, for example \code{GeomPoint}. \item A string naming the geom. To give the geom as a string, strip the -function name of the \code{geom_} prefix. For example, to use \code{geom_point()}, -give the geom as \code{"point"}. +function name of the \code{geom_} prefix. For example, to use \code{geom_point()}, give +the geom as \code{"point"}. \item For more information and other ways to specify the geom, see the \link[=layer_geoms]{layer geom} documentation. }} -\item{position}{A position adjustment to use on the data for this layer. This -can be used in various ways, including to prevent overplotting and -improving the display. The \code{position} argument accepts the following: +\item{position}{A position adjustment to use on the data for this layer. This can be used in +various ways, including to prevent overplotting and improving the display. +The \code{position} argument accepts the following: \itemize{ \item The result of calling a position function, such as \code{position_jitter()}. This method allows for passing extra arguments to the position. \item A string naming the position adjustment. To give the position as a -string, strip the function name of the \code{position_} prefix. For example, -to use \code{position_jitter()}, give the position as \code{"jitter"}. +string, strip the function name of the \code{position_} prefix. For example, to +use \code{position_jitter()}, give the position as \code{"jitter"}. \item For more information and other ways to specify the position, see the \link[=layer_positions]{layer position} documentation. }} -\item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These -arguments broadly fall into one of 4 categories below. Notably, further -arguments to the \code{position} argument, or aesthetics that are required -can \emph{not} be passed through \code{...}. Unknown arguments that are not part -of the 4 categories below are ignored. +\item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These arguments +broadly fall into one of 4 categories below. Notably, further arguments to +the \code{position} argument, or aesthetics that are required can \emph{not} be passed +through \code{...}. Unknown arguments that are not part of the 4 categories below +are ignored. \itemize{ \item Static aesthetics that are not mapped to a scale, but are at a fixed -value and apply to the layer as a whole. For example, \code{colour = "red"} -or \code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} -section that lists the available options. The 'required' aesthetics -cannot be passed on to the \code{params}. Please note that while passing -unmapped aesthetics as vectors is technically possible, the order and -required length is not guaranteed to be parallel to the input data. +value and apply to the layer as a whole. For example, \code{colour = "red"} or +\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section that +lists the available options. The 'required' aesthetics cannot be passed on to +the \code{params}. Please note that while passing unmapped aesthetics as vectors +is technically possible, the order and required length is not guaranteed to +be parallel to the input data. \item When constructing a layer using -a \verb{stat_*()} function, the \code{...} argument can be used to pass on -parameters to the \code{geom} part of the layer. An example of this is -\code{stat_density(geom = "area", outline.type = "both")}. The geom's -documentation lists which parameters it can accept. +a \verb{stat_*()} function, the \code{...} argument can be used to pass on parameters +to the \code{geom} part of the layer. An example of this is \code{stat_density(geom = "area", outline.type = "both")}. The geom's documentation lists which +parameters it can accept. \item Inversely, when constructing a layer using a -\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters -to the \code{stat} part of the layer. An example of this is -\code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation -lists which parameters it can accept. +\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters to +the \code{stat} part of the layer. An example of this is \code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists which parameters it +can accept. \item The \code{key_glyph} argument of \code{\link[=layer]{layer()}} may also be passed on through -\code{...}. This can be one of the functions described as -\link[=draw_key]{key glyphs}, to change the display of the layer in the legend. +\code{...}. This can be one of the functions described as \link[=draw_key]{key glyphs}, +to change the display of the layer in the legend. }} \item{fun.data}{A function that is given the complete data and should @@ -149,26 +144,25 @@ bin width of a time variable is the number of seconds.} \item{breaks}{Alternatively, you can supply a numeric vector giving the bin boundaries. Overrides \code{binwidth} and \code{bins}.} -\item{na.rm}{If \code{FALSE}, the default, missing values are removed with -a warning. If \code{TRUE}, missing values are silently removed.} +\item{na.rm}{If \code{FALSE}, the default, missing values are removed with a warning. If +\code{TRUE}, missing values are silently removed.} \item{orientation}{The orientation of the layer. The default (\code{NA}) automatically determines the orientation from the aesthetic mapping. In the rare event that this fails it can be given explicitly by setting \code{orientation} to either \code{"x"} or \code{"y"}. See the \emph{Orientation} section for more detail.} -\item{show.legend}{logical. Should this layer be included in the legends? -\code{NA}, the default, includes if any aesthetics are mapped. -\code{FALSE} never includes, and \code{TRUE} always includes. -It can also be a named logical vector to finely select the aesthetics to -display. To include legend keys for all levels, even -when no data exists, use \code{TRUE}. If \code{NA}, all levels are shown in legend, -but unobserved levels are omitted.} - -\item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics, -rather than combining with them. This is most useful for helper functions -that define both data and aesthetics and shouldn't inherit behaviour from -the default plot specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} +\item{show.legend}{Logical. Should this layer be included in the legends? \code{NA}, the default, +includes if any aesthetics are mapped. \code{FALSE} never includes, and \code{TRUE} +always includes. It can also be a named logical vector to finely select the +aesthetics to display. To include legend keys for all levels, even when no +data exists, use \code{TRUE}. If \code{NA}, all levels are shown in legend, but +unobserved levels are omitted.} + +\item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics, rather than combining with +them. This is most useful for helper functions that define both data and +aesthetics and shouldn't inherit behaviour from the default plot +specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} \item{fun.ymin, fun.y, fun.ymax}{\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} Use the versions specified above instead.} diff --git a/man/stat_summary_2d.Rd b/man/stat_summary_2d.Rd index 41517514cc..70b3d8d963 100644 --- a/man/stat_summary_2d.Rd +++ b/man/stat_summary_2d.Rd @@ -48,73 +48,68 @@ stat_summary_hex( at the top level of the plot. You must supply \code{mapping} if there is no plot mapping.} -\item{data}{The data to be displayed in this layer. There are three -options: - -If \code{NULL}, the default, the data is inherited from the plot -data as specified in the call to \code{\link[=ggplot]{ggplot()}}. - -A \code{data.frame}, or other object, will override the plot -data. All objects will be fortified to produce a data frame. See -\code{\link[=fortify]{fortify()}} for which variables will be created. - -A \code{function} will be called with a single argument, -the plot data. The return value must be a \code{data.frame}, and -will be used as the layer data. A \code{function} can be created -from a \code{formula} (e.g. \code{~ head(.x, 10)}).} +\item{data}{The data to be displayed in this layer. There are three options: +\itemize{ +\item \code{NULL} (default): the data is inherited from the plot data as specified +in the call to \code{\link[=ggplot]{ggplot()}}. +\item A \code{data.frame}, or other object, will override the plot data. All objects +will be fortified to produce a data frame. See \code{\link[=fortify]{fortify()}} for which +variables will be created. +\item A \code{function} will be called with a single argument, the plot data. The return +value must be a \code{data.frame}, and will be used as the layer data. A +\code{function} can be created from a \code{formula} (e.g. \code{~ head(.x, 10)}). +}} -\item{geom}{The geometric object to use to display the data for this layer. -When using a \verb{stat_*()} function to construct a layer, the \code{geom} argument -can be used to override the default coupling between stats and geoms. The -\code{geom} argument accepts the following: +\item{geom}{The geometric object to use to display the data for this layer. When using a +\verb{stat_*()} function to construct a layer, the \code{geom} argument can be used to +override the default coupling between stats and geoms. The \code{geom} argument +accepts the following: \itemize{ \item A \code{Geom} ggproto subclass, for example \code{GeomPoint}. \item A string naming the geom. To give the geom as a string, strip the -function name of the \code{geom_} prefix. For example, to use \code{geom_point()}, -give the geom as \code{"point"}. +function name of the \code{geom_} prefix. For example, to use \code{geom_point()}, give +the geom as \code{"point"}. \item For more information and other ways to specify the geom, see the \link[=layer_geoms]{layer geom} documentation. }} -\item{position}{A position adjustment to use on the data for this layer. This -can be used in various ways, including to prevent overplotting and -improving the display. The \code{position} argument accepts the following: +\item{position}{A position adjustment to use on the data for this layer. This can be used in +various ways, including to prevent overplotting and improving the display. +The \code{position} argument accepts the following: \itemize{ \item The result of calling a position function, such as \code{position_jitter()}. This method allows for passing extra arguments to the position. \item A string naming the position adjustment. To give the position as a -string, strip the function name of the \code{position_} prefix. For example, -to use \code{position_jitter()}, give the position as \code{"jitter"}. +string, strip the function name of the \code{position_} prefix. For example, to +use \code{position_jitter()}, give the position as \code{"jitter"}. \item For more information and other ways to specify the position, see the \link[=layer_positions]{layer position} documentation. }} -\item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These -arguments broadly fall into one of 4 categories below. Notably, further -arguments to the \code{position} argument, or aesthetics that are required -can \emph{not} be passed through \code{...}. Unknown arguments that are not part -of the 4 categories below are ignored. +\item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These arguments +broadly fall into one of 4 categories below. Notably, further arguments to +the \code{position} argument, or aesthetics that are required can \emph{not} be passed +through \code{...}. Unknown arguments that are not part of the 4 categories below +are ignored. \itemize{ \item Static aesthetics that are not mapped to a scale, but are at a fixed -value and apply to the layer as a whole. For example, \code{colour = "red"} -or \code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} -section that lists the available options. The 'required' aesthetics -cannot be passed on to the \code{params}. Please note that while passing -unmapped aesthetics as vectors is technically possible, the order and -required length is not guaranteed to be parallel to the input data. +value and apply to the layer as a whole. For example, \code{colour = "red"} or +\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section that +lists the available options. The 'required' aesthetics cannot be passed on to +the \code{params}. Please note that while passing unmapped aesthetics as vectors +is technically possible, the order and required length is not guaranteed to +be parallel to the input data. \item When constructing a layer using -a \verb{stat_*()} function, the \code{...} argument can be used to pass on -parameters to the \code{geom} part of the layer. An example of this is -\code{stat_density(geom = "area", outline.type = "both")}. The geom's -documentation lists which parameters it can accept. +a \verb{stat_*()} function, the \code{...} argument can be used to pass on parameters +to the \code{geom} part of the layer. An example of this is \code{stat_density(geom = "area", outline.type = "both")}. The geom's documentation lists which +parameters it can accept. \item Inversely, when constructing a layer using a -\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters -to the \code{stat} part of the layer. An example of this is -\code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation -lists which parameters it can accept. +\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters to +the \code{stat} part of the layer. An example of this is \code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists which parameters it +can accept. \item The \code{key_glyph} argument of \code{\link[=layer]{layer()}} may also be passed on through -\code{...}. This can be one of the functions described as -\link[=draw_key]{key glyphs}, to change the display of the layer in the legend. +\code{...}. This can be one of the functions described as \link[=draw_key]{key glyphs}, +to change the display of the layer in the legend. }} \item{binwidth}{The width of the bins. Can be specified as a numeric value @@ -154,21 +149,20 @@ if \code{0} is outside the range of the data. Alternatively, this same alignment can be specified with \code{binwidth = 1} and \code{boundary = 0.5}, even if \code{0.5} is outside the range of the data.} -\item{na.rm}{If \code{FALSE}, the default, missing values are removed with -a warning. If \code{TRUE}, missing values are silently removed.} - -\item{show.legend}{logical. Should this layer be included in the legends? -\code{NA}, the default, includes if any aesthetics are mapped. -\code{FALSE} never includes, and \code{TRUE} always includes. -It can also be a named logical vector to finely select the aesthetics to -display. To include legend keys for all levels, even -when no data exists, use \code{TRUE}. If \code{NA}, all levels are shown in legend, -but unobserved levels are omitted.} - -\item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics, -rather than combining with them. This is most useful for helper functions -that define both data and aesthetics and shouldn't inherit behaviour from -the default plot specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} +\item{na.rm}{If \code{FALSE}, the default, missing values are removed with a warning. If +\code{TRUE}, missing values are silently removed.} + +\item{show.legend}{Logical. Should this layer be included in the legends? \code{NA}, the default, +includes if any aesthetics are mapped. \code{FALSE} never includes, and \code{TRUE} +always includes. It can also be a named logical vector to finely select the +aesthetics to display. To include legend keys for all levels, even when no +data exists, use \code{TRUE}. If \code{NA}, all levels are shown in legend, but +unobserved levels are omitted.} + +\item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics, rather than combining with +them. This is most useful for helper functions that define both data and +aesthetics and shouldn't inherit behaviour from the default plot +specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} } \description{ \code{stat_summary_2d()} is a 2d variation of \code{\link[=stat_summary]{stat_summary()}}. diff --git a/man/stat_unique.Rd b/man/stat_unique.Rd index 62fa19b03e..37984d4dad 100644 --- a/man/stat_unique.Rd +++ b/man/stat_unique.Rd @@ -21,90 +21,84 @@ stat_unique( at the top level of the plot. You must supply \code{mapping} if there is no plot mapping.} -\item{data}{The data to be displayed in this layer. There are three -options: - -If \code{NULL}, the default, the data is inherited from the plot -data as specified in the call to \code{\link[=ggplot]{ggplot()}}. - -A \code{data.frame}, or other object, will override the plot -data. All objects will be fortified to produce a data frame. See -\code{\link[=fortify]{fortify()}} for which variables will be created. - -A \code{function} will be called with a single argument, -the plot data. The return value must be a \code{data.frame}, and -will be used as the layer data. A \code{function} can be created -from a \code{formula} (e.g. \code{~ head(.x, 10)}).} +\item{data}{The data to be displayed in this layer. There are three options: +\itemize{ +\item \code{NULL} (default): the data is inherited from the plot data as specified +in the call to \code{\link[=ggplot]{ggplot()}}. +\item A \code{data.frame}, or other object, will override the plot data. All objects +will be fortified to produce a data frame. See \code{\link[=fortify]{fortify()}} for which +variables will be created. +\item A \code{function} will be called with a single argument, the plot data. The return +value must be a \code{data.frame}, and will be used as the layer data. A +\code{function} can be created from a \code{formula} (e.g. \code{~ head(.x, 10)}). +}} -\item{geom}{The geometric object to use to display the data for this layer. -When using a \verb{stat_*()} function to construct a layer, the \code{geom} argument -can be used to override the default coupling between stats and geoms. The -\code{geom} argument accepts the following: +\item{geom}{The geometric object to use to display the data for this layer. When using a +\verb{stat_*()} function to construct a layer, the \code{geom} argument can be used to +override the default coupling between stats and geoms. The \code{geom} argument +accepts the following: \itemize{ \item A \code{Geom} ggproto subclass, for example \code{GeomPoint}. \item A string naming the geom. To give the geom as a string, strip the -function name of the \code{geom_} prefix. For example, to use \code{geom_point()}, -give the geom as \code{"point"}. +function name of the \code{geom_} prefix. For example, to use \code{geom_point()}, give +the geom as \code{"point"}. \item For more information and other ways to specify the geom, see the \link[=layer_geoms]{layer geom} documentation. }} -\item{position}{A position adjustment to use on the data for this layer. This -can be used in various ways, including to prevent overplotting and -improving the display. The \code{position} argument accepts the following: +\item{position}{A position adjustment to use on the data for this layer. This can be used in +various ways, including to prevent overplotting and improving the display. +The \code{position} argument accepts the following: \itemize{ \item The result of calling a position function, such as \code{position_jitter()}. This method allows for passing extra arguments to the position. \item A string naming the position adjustment. To give the position as a -string, strip the function name of the \code{position_} prefix. For example, -to use \code{position_jitter()}, give the position as \code{"jitter"}. +string, strip the function name of the \code{position_} prefix. For example, to +use \code{position_jitter()}, give the position as \code{"jitter"}. \item For more information and other ways to specify the position, see the \link[=layer_positions]{layer position} documentation. }} -\item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These -arguments broadly fall into one of 4 categories below. Notably, further -arguments to the \code{position} argument, or aesthetics that are required -can \emph{not} be passed through \code{...}. Unknown arguments that are not part -of the 4 categories below are ignored. +\item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These arguments +broadly fall into one of 4 categories below. Notably, further arguments to +the \code{position} argument, or aesthetics that are required can \emph{not} be passed +through \code{...}. Unknown arguments that are not part of the 4 categories below +are ignored. \itemize{ \item Static aesthetics that are not mapped to a scale, but are at a fixed -value and apply to the layer as a whole. For example, \code{colour = "red"} -or \code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} -section that lists the available options. The 'required' aesthetics -cannot be passed on to the \code{params}. Please note that while passing -unmapped aesthetics as vectors is technically possible, the order and -required length is not guaranteed to be parallel to the input data. +value and apply to the layer as a whole. For example, \code{colour = "red"} or +\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section that +lists the available options. The 'required' aesthetics cannot be passed on to +the \code{params}. Please note that while passing unmapped aesthetics as vectors +is technically possible, the order and required length is not guaranteed to +be parallel to the input data. \item When constructing a layer using -a \verb{stat_*()} function, the \code{...} argument can be used to pass on -parameters to the \code{geom} part of the layer. An example of this is -\code{stat_density(geom = "area", outline.type = "both")}. The geom's -documentation lists which parameters it can accept. +a \verb{stat_*()} function, the \code{...} argument can be used to pass on parameters +to the \code{geom} part of the layer. An example of this is \code{stat_density(geom = "area", outline.type = "both")}. The geom's documentation lists which +parameters it can accept. \item Inversely, when constructing a layer using a -\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters -to the \code{stat} part of the layer. An example of this is -\code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation -lists which parameters it can accept. +\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters to +the \code{stat} part of the layer. An example of this is \code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists which parameters it +can accept. \item The \code{key_glyph} argument of \code{\link[=layer]{layer()}} may also be passed on through -\code{...}. This can be one of the functions described as -\link[=draw_key]{key glyphs}, to change the display of the layer in the legend. +\code{...}. This can be one of the functions described as \link[=draw_key]{key glyphs}, +to change the display of the layer in the legend. }} -\item{na.rm}{If \code{FALSE}, the default, missing values are removed with -a warning. If \code{TRUE}, missing values are silently removed.} +\item{na.rm}{If \code{FALSE}, the default, missing values are removed with a warning. If +\code{TRUE}, missing values are silently removed.} -\item{show.legend}{logical. Should this layer be included in the legends? -\code{NA}, the default, includes if any aesthetics are mapped. -\code{FALSE} never includes, and \code{TRUE} always includes. -It can also be a named logical vector to finely select the aesthetics to -display. To include legend keys for all levels, even -when no data exists, use \code{TRUE}. If \code{NA}, all levels are shown in legend, -but unobserved levels are omitted.} +\item{show.legend}{Logical. Should this layer be included in the legends? \code{NA}, the default, +includes if any aesthetics are mapped. \code{FALSE} never includes, and \code{TRUE} +always includes. It can also be a named logical vector to finely select the +aesthetics to display. To include legend keys for all levels, even when no +data exists, use \code{TRUE}. If \code{NA}, all levels are shown in legend, but +unobserved levels are omitted.} -\item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics, -rather than combining with them. This is most useful for helper functions -that define both data and aesthetics and shouldn't inherit behaviour from -the default plot specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} +\item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics, rather than combining with +them. This is most useful for helper functions that define both data and +aesthetics and shouldn't inherit behaviour from the default plot +specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} } \description{ Remove duplicates From 560cedc6649067ada41f7d7cf23a8199ad30cbb9 Mon Sep 17 00:00:00 2001 From: Teun van den Brand Date: Wed, 5 Nov 2025 15:22:45 +0100 Subject: [PATCH 2/6] redirect `@inheritParams` --- R/annotation.R | 3 +- R/geom-abline.R | 3 +- R/geom-bar.R | 3 +- R/geom-bin2d.R | 3 +- R/geom-blank.R | 3 +- R/geom-boxplot.R | 2 +- R/geom-contour.R | 3 +- R/geom-count.R | 3 +- R/geom-density.R | 2 +- R/geom-density2d.R | 3 +- R/geom-dotplot.R | 3 +- R/geom-function.R | 2 +- R/geom-hex.R | 3 +- R/geom-histogram.R | 2 +- R/geom-jitter.R | 3 +- R/geom-linerange.R | 2 +- R/geom-map.R | 3 +- R/geom-path.R | 2 +- R/geom-polygon.R | 3 +- R/geom-quantile.R | 3 +- R/geom-ribbon.R | 2 +- R/geom-rug.R | 3 +- R/geom-segment.R | 3 +- R/geom-sf.R | 2 +- R/geom-smooth.R | 2 +- R/geom-spoke.R | 2 +- R/geom-text.R | 3 +- R/geom-tile.R | 3 +- R/geom-violin.R | 2 +- R/stat-align.R | 3 +- R/stat-boxplot.R | 2 +- R/stat-connect.R | 3 +- R/stat-contour.R | 2 +- R/stat-ecdf.R | 3 +- R/stat-ellipse.R | 3 +- R/stat-identity.R | 3 +- R/stat-manual.R | 3 +- R/stat-qq.R | 3 +- R/stat-quantilemethods.R | 3 +- R/stat-sf-coordinates.R | 3 +- R/stat-sf.R | 2 +- R/stat-sum.R | 3 +- R/stat-summary-2d.R | 3 +- R/stat-summary.R | 2 +- R/stat-unique.R | 3 +- R/stat-ydensity.R | 3 +- man/annotate.Rd | 32 +++++++++++---------- man/annotation_borders.Rd | 14 ++++----- man/geom_abline.Rd | 36 ++++++++++++----------- man/geom_bar.Rd | 38 ++++++++++++------------- man/geom_bin_2d.Rd | 38 ++++++++++++------------- man/geom_blank.Rd | 42 +++++++++++++-------------- man/geom_boxplot.Rd | 43 +++++++++++++--------------- man/geom_contour.Rd | 46 +++++++++++++++--------------- man/geom_count.Rd | 38 ++++++++++++------------- man/geom_density.Rd | 43 +++++++++++++--------------- man/geom_density_2d.Rd | 6 ++-- man/geom_dotplot.Rd | 38 ++++++++++++------------- man/geom_function.Rd | 46 +++++++++++++++--------------- man/geom_hex.Rd | 38 ++++++++++++------------- man/geom_histogram.Rd | 43 +++++++++++++--------------- man/geom_jitter.Rd | 42 +++++++++++++-------------- man/geom_linerange.Rd | 47 ++++++++++++++---------------- man/geom_map.Rd | 42 +++++++++++++-------------- man/geom_path.Rd | 47 ++++++++++++++---------------- man/geom_point.Rd | 42 +++++++++++++-------------- man/geom_polygon.Rd | 42 +++++++++++++-------------- man/geom_qq.Rd | 42 +++++++++++++-------------- man/geom_quantile.Rd | 38 ++++++++++++------------- man/geom_ribbon.Rd | 51 ++++++++++++++++----------------- man/geom_rug.Rd | 42 +++++++++++++-------------- man/geom_segment.Rd | 42 +++++++++++++-------------- man/geom_smooth.Rd | 43 +++++++++++++--------------- man/geom_spoke.Rd | 42 +++++++++++++-------------- man/geom_text.Rd | 42 +++++++++++++-------------- man/geom_tile.Rd | 42 +++++++++++++-------------- man/geom_violin.Rd | 43 +++++++++++++--------------- man/ggsf.Rd | 46 +++++++++++++++--------------- man/layer.Rd | 14 ++++----- man/layer_sf.Rd | 14 ++++----- man/shared_layer_parameters.Rd | 52 +++++++++++++++++----------------- man/stat_connect.Rd | 42 +++++++++++++-------------- man/stat_ecdf.Rd | 42 +++++++++++++-------------- man/stat_ellipse.Rd | 42 +++++++++++++-------------- man/stat_identity.Rd | 42 +++++++++++++-------------- man/stat_manual.Rd | 42 +++++++++++++-------------- man/stat_sf_coordinates.Rd | 42 +++++++++++++-------------- man/stat_summary.Rd | 47 ++++++++++++++---------------- man/stat_summary_2d.Rd | 42 +++++++++++++-------------- man/stat_unique.Rd | 42 +++++++++++++-------------- 90 files changed, 900 insertions(+), 962 deletions(-) diff --git a/R/annotation.R b/R/annotation.R index f56494c43c..1569b3b4d7 100644 --- a/R/annotation.R +++ b/R/annotation.R @@ -18,8 +18,7 @@ #' @param geom name of geom to use for annotation #' @param x,y,xmin,ymin,xmax,ymax,xend,yend positioning aesthetics - #' you must specify at least one of these. -#' @inheritParams layer -#' @inheritParams geom_point +#' @inheritParams shared_layer_parameters #' @seealso #' The `r link_book("custom annotations section", "annotations#sec-custom-annotations")` #' @export diff --git a/R/geom-abline.R b/R/geom-abline.R index a47a9dd86a..dea2808936 100644 --- a/R/geom-abline.R +++ b/R/geom-abline.R @@ -31,8 +31,7 @@ NULL #' #' @seealso See [geom_segment()] for a more general approach to #' adding straight line segments to a plot. -#' @inheritParams layer -#' @inheritParams geom_point +#' @inheritParams shared_layer_parameters #' @param mapping Set of aesthetic mappings created by [aes()]. #' @param xintercept,yintercept,slope,intercept Parameters that control the #' position of the line. If these are set, `data`, `mapping` and diff --git a/R/geom-bar.R b/R/geom-bar.R index 42d4d1db2b..328d2f3a9c 100644 --- a/R/geom-bar.R +++ b/R/geom-bar.R @@ -76,8 +76,7 @@ GeomBar <- ggproto( #' [position_dodge()] and [position_dodge2()] for creating side-by-side #' bar charts. #' @export -#' @inheritParams layer -#' @inheritParams geom_point +#' @inheritParams shared_layer_parameters #' @param orientation The orientation of the layer. The default (`NA`) #' automatically determines the orientation from the aesthetic mapping. In the #' rare event that this fails it can be given explicitly by setting `orientation` diff --git a/R/geom-bin2d.R b/R/geom-bin2d.R index 2e937a9d70..a5ff23d788 100644 --- a/R/geom-bin2d.R +++ b/R/geom-bin2d.R @@ -17,8 +17,7 @@ GeomBin2d <- ggproto("GeomBin2d", GeomTile) #' @aesthetics GeomBin2d #' #' @export -#' @inheritParams layer -#' @inheritParams geom_point +#' @inheritParams shared_layer_parameters #' @param geom,stat Use to override the default connection between #' `geom_bin_2d()` and `stat_bin_2d()`. For more information about overriding #' these connections, see how the [stat][layer_stats] and [geom][layer_geoms] diff --git a/R/geom-blank.R b/R/geom-blank.R index 72b5b1e265..04fcee42ae 100644 --- a/R/geom-blank.R +++ b/R/geom-blank.R @@ -5,8 +5,7 @@ #' more details. #' #' @export -#' @inheritParams layer -#' @inheritParams geom_point +#' @inheritParams shared_layer_parameters #' @examples #' ggplot(mtcars, aes(wt, mpg)) #' # Nothing to see here! diff --git a/R/geom-boxplot.R b/R/geom-boxplot.R index 78bdbacc30..260ad92f47 100644 --- a/R/geom-boxplot.R +++ b/R/geom-boxplot.R @@ -29,7 +29,7 @@ #' @seealso [geom_quantile()] for continuous `x`, #' [geom_violin()] for a richer display of the distribution, and #' [geom_jitter()] for a useful technique for small data. -#' @inheritParams layer +#' @inheritParams shared_layer_parameters #' @inheritParams geom_bar #' @param geom,stat Use to override the default connection between #' `geom_boxplot()` and `stat_boxplot()`. For more information about diff --git a/R/geom-contour.R b/R/geom-contour.R index f6791fd4dc..04fab1b37a 100644 --- a/R/geom-contour.R +++ b/R/geom-contour.R @@ -36,8 +36,7 @@ GeomContourFilled <- ggproto("GeomContourFilled", GeomPolygon) #' #' @aesthetics GeomContour #' @aesthetics GeomContourFilled -#' @inheritParams layer -#' @inheritParams geom_point +#' @inheritParams shared_layer_parameters #' @inheritParams geom_path #' @param binwidth The width of the contour bins. Overridden by `bins`. #' @param bins Number of contour bins. Overridden by `breaks`. diff --git a/R/geom-count.R b/R/geom-count.R index 9288033bde..1c27c5f334 100644 --- a/R/geom-count.R +++ b/R/geom-count.R @@ -13,8 +13,7 @@ NULL #' these connections, see how the [stat][layer_stats] and [geom][layer_geoms] #' arguments work. #' @seealso For continuous `x` and `y`, use [geom_bin_2d()]. -#' @inheritParams layer -#' @inheritParams geom_point +#' @inheritParams shared_layer_parameters #' @export #' @examples #' ggplot(mpg, aes(cty, hwy)) + diff --git a/R/geom-density.R b/R/geom-density.R index d1964c07fe..c66ead8c87 100644 --- a/R/geom-density.R +++ b/R/geom-density.R @@ -26,7 +26,7 @@ GeomDensity <- ggproto( #' @seealso See [geom_histogram()], [geom_freqpoly()] for #' other methods of displaying continuous distribution. #' See [geom_violin()] for a compact density display. -#' @inheritParams layer +#' @inheritParams shared_layer_parameters #' @inheritParams geom_bar #' @inheritParams geom_ribbon #' @param geom,stat Use to override the default connection between diff --git a/R/geom-density2d.R b/R/geom-density2d.R index 0197e2698e..544e1d39e0 100644 --- a/R/geom-density2d.R +++ b/R/geom-density2d.R @@ -15,8 +15,7 @@ #' `geom_density_2d()` and `stat_density_2d()`. For more information at #' overriding these connections, see how the [stat][layer_stats] and #' [geom][layer_geoms] arguments work. -#' @inheritParams layer -#' @inheritParams geom_point +#' @inheritParams shared_layer_parameters #' @inheritParams geom_path #' @param contour_var Character string identifying the variable to contour #' by. Can be one of `"density"`, `"ndensity"`, or `"count"`. See the section diff --git a/R/geom-dotplot.R b/R/geom-dotplot.R index 89def6a9ac..1115171294 100644 --- a/R/geom-dotplot.R +++ b/R/geom-dotplot.R @@ -29,8 +29,7 @@ #' ndensity = 'density, scaled to maximum of 1, if method is `"histodot"`.' #' ) #' -#' @inheritParams layer -#' @inheritParams geom_point +#' @inheritParams shared_layer_parameters #' @param stackdir which direction to stack the dots. "up" (default), #' "down", "center", "centerwhole" (centered, but with dots aligned) #' @param stackratio how close to stack the dots. Default is 1, where dots diff --git a/R/geom-function.R b/R/geom-function.R index ba595da7c3..d3446c7e64 100644 --- a/R/geom-function.R +++ b/R/geom-function.R @@ -30,7 +30,7 @@ GeomFunction <- ggproto("GeomFunction", GeomPath, #' #' @aesthetics GeomFunction #' @param data Ignored by `stat_function()`, do not use. -#' @inheritParams layer +#' @inheritParams shared_layer_parameters #' @inheritParams geom_path #' @examples #' diff --git a/R/geom-hex.R b/R/geom-hex.R index 0e67b49ad9..ea30799b60 100644 --- a/R/geom-hex.R +++ b/R/geom-hex.R @@ -80,8 +80,7 @@ GeomHex <- ggproto("GeomHex", Geom, #' `stat_bin_hex()`. For more information about overriding these connections, #' see how the [stat][layer_stats] and [geom][layer_geoms] arguments work. #' @export -#' @inheritParams layer -#' @inheritParams geom_point +#' @inheritParams shared_layer_parameters #' @param lineend Line end style (round, butt, square). #' @param linejoin Line join style (round, mitre, bevel). #' @param linemitre Line mitre limit (number greater than 1). diff --git a/R/geom-histogram.R b/R/geom-histogram.R index a922a54dd7..c8122465dd 100644 --- a/R/geom-histogram.R +++ b/R/geom-histogram.R @@ -34,7 +34,7 @@ #' `geom_freqpoly()` uses the same aesthetics as [geom_line()]. #' #' @export -#' @inheritParams layer +#' @inheritParams shared_layer_parameters #' @inheritParams geom_bar #' @param geom,stat Use to override the default connection between #' `geom_histogram()`/`geom_freqpoly()` and `stat_bin()`. For more information diff --git a/R/geom-jitter.R b/R/geom-jitter.R index 1f4b3e99c9..28492e9025 100644 --- a/R/geom-jitter.R +++ b/R/geom-jitter.R @@ -6,8 +6,7 @@ #' overplotting caused by discreteness in smaller datasets. #' #' @aesthetics GeomPoint -#' @inheritParams layer -#' @inheritParams geom_point +#' @inheritParams shared_layer_parameters #' @inheritParams position_jitter #' @seealso #' [geom_point()] for regular, unjittered points, diff --git a/R/geom-linerange.R b/R/geom-linerange.R index 0d67908ec8..24af0537ee 100644 --- a/R/geom-linerange.R +++ b/R/geom-linerange.R @@ -53,7 +53,7 @@ GeomLinerange <- ggproto( #' [stat_summary()] for examples of these guys in use, #' [geom_smooth()] for continuous analogue #' @export -#' @inheritParams layer +#' @inheritParams shared_layer_parameters #' @inheritParams geom_bar #' @examples #' # Create a simple example dataset diff --git a/R/geom-map.R b/R/geom-map.R index 026bb94e6b..7ee19ec821 100644 --- a/R/geom-map.R +++ b/R/geom-map.R @@ -15,8 +15,7 @@ NULL #' typically be created using [fortify()] on a spatial object. #' It must contain columns `x` or `long`, `y` or #' `lat`, and `region` or `id`. -#' @inheritParams layer -#' @inheritParams geom_point +#' @inheritParams shared_layer_parameters #' @examples #' # First, a made-up example containing a few polygons, to explain #' # how `geom_map()` works. It requires two data frames: diff --git a/R/geom-path.R b/R/geom-path.R index 98c2f731d1..e4654a9f91 100644 --- a/R/geom-path.R +++ b/R/geom-path.R @@ -181,7 +181,7 @@ GeomStep <- ggproto( #' @eval rd_orientation() #' #' @aesthetics GeomPath -#' @inheritParams layer +#' @inheritParams shared_layer_parameters #' @inheritParams geom_bar #' @param lineend Line end style (round, butt, square). #' @param linejoin Line join style (round, mitre, bevel). diff --git a/R/geom-polygon.R b/R/geom-polygon.R index 8fe3f5753f..fc2a7fd441 100644 --- a/R/geom-polygon.R +++ b/R/geom-polygon.R @@ -105,8 +105,7 @@ GeomPolygon <- ggproto("GeomPolygon", Geom, #' [geom_path()] for an unfilled polygon, #' [geom_ribbon()] for a polygon anchored on the x-axis #' @export -#' @inheritParams layer -#' @inheritParams geom_point +#' @inheritParams shared_layer_parameters #' @param lineend Line end style (round, butt, square). #' @param linejoin Line join style (round, mitre, bevel). #' @param linemitre Line mitre limit (number greater than 1). diff --git a/R/geom-quantile.R b/R/geom-quantile.R index 99d569538f..4a79c43989 100644 --- a/R/geom-quantile.R +++ b/R/geom-quantile.R @@ -18,8 +18,7 @@ GeomQuantile <- ggproto( #' #' @aesthetics GeomQuantile #' @export -#' @inheritParams layer -#' @inheritParams geom_point +#' @inheritParams shared_layer_parameters #' @inheritParams geom_path #' @param method.args List of additional arguments passed on to the modelling #' function defined by `method`. diff --git a/R/geom-ribbon.R b/R/geom-ribbon.R index 8816b44d9b..f0f6727156 100644 --- a/R/geom-ribbon.R +++ b/R/geom-ribbon.R @@ -248,7 +248,7 @@ GeomArea <- ggproto("GeomArea", GeomRibbon, #' [geom_bar()] for discrete intervals (bars), #' [geom_linerange()] for discrete intervals (lines), #' [geom_polygon()] for general polygons -#' @inheritParams layer +#' @inheritParams shared_layer_parameters #' @inheritParams geom_bar #' @param linemitre Line mitre limit (number greater than 1). #' @param outline.type Type of the outline of the area; `"both"` draws both the diff --git a/R/geom-rug.R b/R/geom-rug.R index 2f2b37cd2d..459eff8dfe 100644 --- a/R/geom-rug.R +++ b/R/geom-rug.R @@ -133,8 +133,7 @@ GeomRug <- ggproto("GeomRug", Geom, #' any data points under the default settings. #' #' @aesthetics GeomRug -#' @inheritParams layer -#' @inheritParams geom_point +#' @inheritParams shared_layer_parameters #' @param sides A string that controls which sides of the plot the rugs appear on. #' It can be set to a string containing any of `"trbl"`, for top, right, #' bottom, and left. diff --git a/R/geom-segment.R b/R/geom-segment.R index 77ca127a44..3722c2993a 100644 --- a/R/geom-segment.R +++ b/R/geom-segment.R @@ -65,8 +65,7 @@ GeomSegment <- ggproto( #' need to connect points across multiple cases. #' #' @aesthetics GeomSegment -#' @inheritParams layer -#' @inheritParams geom_point +#' @inheritParams shared_layer_parameters #' @param arrow specification for arrow heads, as created by [grid::arrow()]. #' @param arrow.fill fill colour to use for the arrow head (if closed). `NULL` #' means use `colour` aesthetic. diff --git a/R/geom-sf.R b/R/geom-sf.R index 177c30f933..4575a28484 100644 --- a/R/geom-sf.R +++ b/R/geom-sf.R @@ -285,7 +285,7 @@ GeomSf <- ggproto("GeomSf", Geom, #' @export #' @rdname ggsf -#' @inheritParams geom_point +#' @inheritParams shared_layer_parameters geom_sf <- function(mapping = aes(), data = NULL, stat = "sf", position = "identity", na.rm = FALSE, show.legend = NA, inherit.aes = TRUE, ...) { diff --git a/R/geom-smooth.R b/R/geom-smooth.R index a022807b16..f858b92a59 100644 --- a/R/geom-smooth.R +++ b/R/geom-smooth.R @@ -77,7 +77,7 @@ GeomSmooth <- ggproto( #' @eval rd_orientation() #' #' @aesthetics GeomSmooth -#' @inheritParams layer +#' @inheritParams shared_layer_parameters #' @inheritParams geom_bar #' @param geom,stat Use to override the default connection between #' `geom_smooth()` and `stat_smooth()`. For more information about overriding diff --git a/R/geom-spoke.R b/R/geom-spoke.R index 71ac416482..c7c09a84f2 100644 --- a/R/geom-spoke.R +++ b/R/geom-spoke.R @@ -23,7 +23,7 @@ GeomSpoke <- ggproto( #' The angles start from east and increase counterclockwise. #' #' @aesthetics GeomSpoke -#' @inheritParams layer +#' @inheritParams shared_layer_parameters #' @inheritParams geom_segment #' @export #' @examples diff --git a/R/geom-text.R b/R/geom-text.R index 406067856e..e22deb0012 100644 --- a/R/geom-text.R +++ b/R/geom-text.R @@ -90,8 +90,7 @@ GeomText <- ggproto( #' `"outward"`. Inward always aligns text towards the center, and outward #' aligns it away from the center. #' -#' @inheritParams layer -#' @inheritParams geom_point +#' @inheritParams shared_layer_parameters #' @param parse If `TRUE`, the labels will be parsed into expressions and #' displayed as described in `?plotmath`. #' @param check_overlap If `TRUE`, text that overlaps previous text in the diff --git a/R/geom-tile.R b/R/geom-tile.R index 85673eddce..11b2648054 100644 --- a/R/geom-tile.R +++ b/R/geom-tile.R @@ -57,8 +57,7 @@ GeomTile <- ggproto( #' @aesthetics GeomRect #' `geom_tile()` understands only the `x`/`width` and `y`/`height` combinations. #' Note that `geom_raster()` ignores `colour`. -#' @inheritParams layer -#' @inheritParams geom_point +#' @inheritParams shared_layer_parameters #' @inheritParams geom_segment #' @export #' diff --git a/R/geom-violin.R b/R/geom-violin.R index 5ba06844f3..b7dd7d76e8 100644 --- a/R/geom-violin.R +++ b/R/geom-violin.R @@ -8,7 +8,7 @@ #' @eval rd_orientation() #' #' @aesthetics GeomViolin -#' @inheritParams layer +#' @inheritParams shared_layer_parameters #' @inheritParams geom_bar #' @param trim If `TRUE` (default), trim the tails of the violins #' to the range of the data. If `FALSE`, don't trim the tails. diff --git a/R/stat-align.R b/R/stat-align.R index c0807382c7..5ff057c2f9 100644 --- a/R/stat-align.R +++ b/R/stat-align.R @@ -83,8 +83,7 @@ StatAlign <- ggproto( } ) -#' @inheritParams layer -#' @inheritParams geom_point +#' @inheritParams shared_layer_parameters #' @export #' @rdname geom_ribbon stat_align <- make_constructor( diff --git a/R/stat-boxplot.R b/R/stat-boxplot.R index ef893a6f0c..cfc137d4c3 100644 --- a/R/stat-boxplot.R +++ b/R/stat-boxplot.R @@ -99,7 +99,7 @@ StatBoxplot <- ggproto("StatBoxplot", Stat, #' @rdname geom_boxplot #' @param coef Length of the whiskers as multiple of IQR. Defaults to 1.5. -#' @inheritParams stat_identity +#' @inheritParams shared_layer_parameters #' @export #' @eval rd_computed_vars( #' .details = "`stat_boxplot()` provides the following variables, some of diff --git a/R/stat-connect.R b/R/stat-connect.R index a2a73590bd..d7a75c62b2 100644 --- a/R/stat-connect.R +++ b/R/stat-connect.R @@ -105,8 +105,7 @@ StatConnect <- ggproto( #' #' Connect successive points with lines of different shapes. #' -#' @inheritParams layer -#' @inheritParams geom_point +#' @inheritParams shared_layer_parameters #' @param connection A specification of how two points are connected. Can be one #' of the folloing: #' * A string giving a named connection. These options are: diff --git a/R/stat-contour.R b/R/stat-contour.R index ca984909fa..83385f8e06 100644 --- a/R/stat-contour.R +++ b/R/stat-contour.R @@ -84,7 +84,7 @@ StatContourFilled <- ggproto( } ) -#' @inheritParams stat_identity +#' @inheritParams shared_layer_parameters #' @inheritParams geom_contour #' @export #' @aesthetics StatContour diff --git a/R/stat-ecdf.R b/R/stat-ecdf.R index 6d1084d719..16ea1a64c2 100644 --- a/R/stat-ecdf.R +++ b/R/stat-ecdf.R @@ -65,8 +65,7 @@ StatEcdf <- ggproto( #' this case, the ECDF is incremented by `weight / sum(weight)` instead of #' `1 / length(x)` for each observation. #' -#' @inheritParams layer -#' @inheritParams geom_point +#' @inheritParams shared_layer_parameters #' @param na.rm If `FALSE` (the default), removes missing values with #' a warning. If `TRUE` silently removes missing values. #' @param n if NULL, do not interpolate. If not NULL, this is the number diff --git a/R/stat-ellipse.R b/R/stat-ellipse.R index dfd8c698d3..daa8417d9c 100644 --- a/R/stat-ellipse.R +++ b/R/stat-ellipse.R @@ -43,8 +43,7 @@ StatEllipse <- ggproto( #' representing the euclidean distance from the center. #' This ellipse probably won't appear circular unless `coord_fixed()` is applied. #' @param segments The number of segments to be used in drawing the ellipse. -#' @inheritParams layer -#' @inheritParams geom_point +#' @inheritParams shared_layer_parameters #' @aesthetics StatEllipse #' @export #' @examples diff --git a/R/stat-identity.R b/R/stat-identity.R index bf71163a9d..cafcc9f6c5 100644 --- a/R/stat-identity.R +++ b/R/stat-identity.R @@ -13,8 +13,7 @@ StatIdentity <- ggproto( #' #' The identity statistic leaves the data unchanged. #' -#' @inheritParams layer -#' @inheritParams geom_point +#' @inheritParams shared_layer_parameters #' @export #' @examples #' p <- ggplot(mtcars, aes(wt, mpg)) diff --git a/R/stat-manual.R b/R/stat-manual.R index d7ead2f189..822499cf53 100644 --- a/R/stat-manual.R +++ b/R/stat-manual.R @@ -21,8 +21,7 @@ StatManual <- ggproto( #' `stat_manual()` takes a function that computes a data transformation for #' every group. #' -#' @inheritParams layer -#' @inheritParams geom_point +#' @inheritParams shared_layer_parameters #' @param fun Function that takes a data frame as input and returns a data #' frame or data frame-like list as output. The default (`identity()`) returns #' the data unchanged. diff --git a/R/stat-qq.R b/R/stat-qq.R index b97796bd78..663d491bbd 100644 --- a/R/stat-qq.R +++ b/R/stat-qq.R @@ -39,8 +39,7 @@ StatQq <- ggproto( #' @param distribution Distribution function to use, if x not specified #' @param dparams Additional parameters passed on to `distribution` #' function. -#' @inheritParams layer -#' @inheritParams geom_point +#' @inheritParams shared_layer_parameters #' @eval rd_computed_vars( #' .details = "\\cr Variables computed by `stat_qq()`:", #' sample = "Sample quantiles.", diff --git a/R/stat-quantilemethods.R b/R/stat-quantilemethods.R index 4999aa7304..c89dfd5a59 100644 --- a/R/stat-quantilemethods.R +++ b/R/stat-quantilemethods.R @@ -66,8 +66,7 @@ StatQuantile <- ggproto( #' @param formula formula relating y variables to x variables #' @param method Quantile regression method to use. Available options are `"rq"` (for #' [`quantreg::rq()`]) and `"rqss"` (for [`quantreg::rqss()`]). -#' @inheritParams layer -#' @inheritParams geom_point +#' @inheritParams shared_layer_parameters #' @eval rd_computed_vars( #' quantile = "Quantile of distribution." #' ) diff --git a/R/stat-sf-coordinates.R b/R/stat-sf-coordinates.R index b54c8f6376..f7512924a4 100644 --- a/R/stat-sf-coordinates.R +++ b/R/stat-sf-coordinates.R @@ -48,8 +48,7 @@ #' } #' #' @export -#' @inheritParams stat_identity -#' @inheritParams geom_point +#' @inheritParams shared_layer_parameters #' @param fun.geometry #' A function that takes a `sfc` object and returns a `sfc_POINT` with the #' same length as the input. If `NULL`, `function(x) sf::st_point_on_surface(sf::st_zm(x))` diff --git a/R/stat-sf.R b/R/stat-sf.R index cf0b55c0ec..3e7b487da8 100644 --- a/R/stat-sf.R +++ b/R/stat-sf.R @@ -58,7 +58,7 @@ StatSf <- ggproto("StatSf", Stat, #' @export #' @rdname ggsf -#' @inheritParams stat_identity +#' @inheritParams shared_layer_parameters stat_sf <- function(mapping = NULL, data = NULL, geom = "rect", position = "identity", na.rm = FALSE, show.legend = NA, inherit.aes = TRUE, ...) { diff --git a/R/stat-sum.R b/R/stat-sum.R index c764cbc14f..89af8168e6 100644 --- a/R/stat-sum.R +++ b/R/stat-sum.R @@ -20,8 +20,7 @@ StatSum <- ggproto( } ) -#' @inheritParams layer -#' @inheritParams geom_point +#' @inheritParams shared_layer_parameters #' @eval rd_computed_vars( #' n = "Number of observations at position.", #' prop = "Percent of points in that panel at that position." diff --git a/R/stat-summary-2d.R b/R/stat-summary-2d.R index 847cb68bfc..312b775189 100644 --- a/R/stat-summary-2d.R +++ b/R/stat-summary-2d.R @@ -86,8 +86,7 @@ StatSummary2d <- ggproto( #' } #' @seealso [stat_summary_hex()] for hexagonal summarization. #' [stat_bin_2d()] for the binning options. -#' @inheritParams layer -#' @inheritParams geom_point +#' @inheritParams shared_layer_parameters #' @inheritParams stat_bin_2d #' @param drop drop if the output of `fun` is `NA`. #' @param fun function for summary. diff --git a/R/stat-summary.R b/R/stat-summary.R index 789f867da9..540e745ea2 100644 --- a/R/stat-summary.R +++ b/R/stat-summary.R @@ -11,7 +11,7 @@ #' @seealso [geom_errorbar()], [geom_pointrange()], #' [geom_linerange()], [geom_crossbar()] for geoms to #' display summarised data -#' @inheritParams stat_identity +#' @inheritParams shared_layer_parameters #' @section Summary functions: #' You can either supply summary functions individually (`fun`, #' `fun.max`, `fun.min`), or as a single function (`fun.data`): diff --git a/R/stat-unique.R b/R/stat-unique.R index 0fa45cf5eb..46d19d0b7b 100644 --- a/R/stat-unique.R +++ b/R/stat-unique.R @@ -13,8 +13,7 @@ StatUnique <- ggproto( #' #' @aesthetics StatUnique #' @export -#' @inheritParams layer -#' @inheritParams geom_point +#' @inheritParams shared_layer_parameters #' @examples #' ggplot(mtcars, aes(vs, am)) + #' geom_point(alpha = 0.1) diff --git a/R/stat-ydensity.R b/R/stat-ydensity.R index 0828df91f1..109a6556d5 100644 --- a/R/stat-ydensity.R +++ b/R/stat-ydensity.R @@ -128,8 +128,7 @@ StatYdensity <- ggproto( dropped_aes = "weight" ) -#' @inheritParams layer -#' @inheritParams geom_point +#' @inheritParams shared_layer_parameters #' @inheritParams stat_density #' @param scale if "area" (default), all violins have the same area (before trimming #' the tails). If "count", areas are scaled proportionally to the number of diff --git a/man/annotate.Rd b/man/annotate.Rd index a3c3a8ca9a..e74358741f 100644 --- a/man/annotate.Rd +++ b/man/annotate.Rd @@ -26,28 +26,30 @@ you must specify at least one of these.} \item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These arguments broadly fall into one of 4 categories below. Notably, further arguments to -the \code{position} argument, or aesthetics that are required can \emph{not} be passed -through \code{...}. Unknown arguments that are not part of the 4 categories below -are ignored. +the \code{position} argument, or aesthetics that are required can +\emph{not} be passed through \code{...}. Unknown arguments that are not part of the 4 +categories below are ignored. \itemize{ \item Static aesthetics that are not mapped to a scale, but are at a fixed value and apply to the layer as a whole. For example, \code{colour = "red"} or -\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section that -lists the available options. The 'required' aesthetics cannot be passed on to -the \code{params}. Please note that while passing unmapped aesthetics as vectors -is technically possible, the order and required length is not guaranteed to -be parallel to the input data. +\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section +that lists the available options. The 'required' aesthetics cannot be +passed on to the \code{params}. Please note that while passing unmapped +aesthetics as vectors is technically possible, the order and required +length is not guaranteed to be parallel to the input data. \item When constructing a layer using a \verb{stat_*()} function, the \code{...} argument can be used to pass on parameters -to the \code{geom} part of the layer. An example of this is \code{stat_density(geom = "area", outline.type = "both")}. The geom's documentation lists which -parameters it can accept. +to the \code{geom} part of the layer. An example of this is +\code{stat_density(geom = "area", outline.type = "both")}. The geom's +documentation lists which parameters it can accept. \item Inversely, when constructing a layer using a -\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters to -the \code{stat} part of the layer. An example of this is \code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists which parameters it -can accept. +\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters +to the \code{stat} part of the layer. An example of this is +\code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists +which parameters it can accept. \item The \code{key_glyph} argument of \code{\link[=layer]{layer()}} may also be passed on through -\code{...}. This can be one of the functions described as \link[=draw_key]{key glyphs}, -to change the display of the layer in the legend. +\code{...}. This can be one of the functions described as +\link[=draw_key]{key glyphs}, to change the display of the layer in the legend. }} \item{na.rm}{If \code{FALSE}, the default, missing values are removed with a warning. If diff --git a/man/annotation_borders.Rd b/man/annotation_borders.Rd index 198b44109c..6f3667bcfb 100644 --- a/man/annotation_borders.Rd +++ b/man/annotation_borders.Rd @@ -39,10 +39,8 @@ polygons, see \code{\link[maps:map]{maps::map()}} for details.} being drawn (using the \code{subgroup} aesthetic) this argument defines how the hole coordinates are interpreted. See the examples in \code{\link[grid:grid.path]{grid::pathGrob()}} for an explanation.} - \item{\code{mapping}}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}. If specified and -\code{inherit.aes = TRUE} (the default), it is combined with the default mapping -at the top level of the plot. You must supply \code{mapping} if there is no plot -mapping.} + \item{\code{mapping}}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}. If specified and \code{inherit.aes = TRUE} (the default), it is combined with the default mapping at the top level +of the plot. You must supply \code{mapping} if there is no plot mapping.} \item{\code{data}}{The data to be displayed in this layer. There are three options: \itemize{ \item \code{NULL} (default): the data is inherited from the plot data as specified @@ -61,8 +59,8 @@ accepts the following: \itemize{ \item A \code{Stat} ggproto subclass, for example \code{StatCount}. \item A string naming the stat. To give the stat as a string, strip the -function name of the \code{stat_} prefix. For example, to use \code{stat_count()}, give -the stat as \code{"count"}. +function name of the \code{stat_} prefix. For example, to use \code{stat_count()}, +give the stat as \code{"count"}. \item For more information and other ways to specify the stat, see the \link[=layer_stats]{layer stat} documentation. }} @@ -78,6 +76,8 @@ use \code{position_jitter()}, give the position as \code{"jitter"}. \item For more information and other ways to specify the position, see the \link[=layer_positions]{layer position} documentation. }} + \item{\code{na.rm}}{If \code{FALSE}, the default, missing values are removed with a warning. If +\code{TRUE}, missing values are silently removed.} \item{\code{show.legend}}{Logical. Should this layer be included in the legends? \code{NA}, the default, includes if any aesthetics are mapped. \code{FALSE} never includes, and \code{TRUE} always includes. It can also be a named logical vector to finely select the @@ -88,8 +88,6 @@ unobserved levels are omitted.} them. This is most useful for helper functions that define both data and aesthetics and shouldn't inherit behaviour from the default plot specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} - \item{\code{na.rm}}{If \code{FALSE}, the default, missing values are removed with a warning. If -\code{TRUE}, missing values are silently removed.} }} } \description{ diff --git a/man/geom_abline.Rd b/man/geom_abline.Rd index b18a03b929..eb89d007b7 100644 --- a/man/geom_abline.Rd +++ b/man/geom_abline.Rd @@ -64,36 +64,38 @@ accepts the following: \itemize{ \item A \code{Stat} ggproto subclass, for example \code{StatCount}. \item A string naming the stat. To give the stat as a string, strip the -function name of the \code{stat_} prefix. For example, to use \code{stat_count()}, give -the stat as \code{"count"}. +function name of the \code{stat_} prefix. For example, to use \code{stat_count()}, +give the stat as \code{"count"}. \item For more information and other ways to specify the stat, see the \link[=layer_stats]{layer stat} documentation. }} \item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These arguments broadly fall into one of 4 categories below. Notably, further arguments to -the \code{position} argument, or aesthetics that are required can \emph{not} be passed -through \code{...}. Unknown arguments that are not part of the 4 categories below -are ignored. +the \code{position} argument, or aesthetics that are required can +\emph{not} be passed through \code{...}. Unknown arguments that are not part of the 4 +categories below are ignored. \itemize{ \item Static aesthetics that are not mapped to a scale, but are at a fixed value and apply to the layer as a whole. For example, \code{colour = "red"} or -\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section that -lists the available options. The 'required' aesthetics cannot be passed on to -the \code{params}. Please note that while passing unmapped aesthetics as vectors -is technically possible, the order and required length is not guaranteed to -be parallel to the input data. +\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section +that lists the available options. The 'required' aesthetics cannot be +passed on to the \code{params}. Please note that while passing unmapped +aesthetics as vectors is technically possible, the order and required +length is not guaranteed to be parallel to the input data. \item When constructing a layer using a \verb{stat_*()} function, the \code{...} argument can be used to pass on parameters -to the \code{geom} part of the layer. An example of this is \code{stat_density(geom = "area", outline.type = "both")}. The geom's documentation lists which -parameters it can accept. +to the \code{geom} part of the layer. An example of this is +\code{stat_density(geom = "area", outline.type = "both")}. The geom's +documentation lists which parameters it can accept. \item Inversely, when constructing a layer using a -\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters to -the \code{stat} part of the layer. An example of this is \code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists which parameters it -can accept. +\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters +to the \code{stat} part of the layer. An example of this is +\code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists +which parameters it can accept. \item The \code{key_glyph} argument of \code{\link[=layer]{layer()}} may also be passed on through -\code{...}. This can be one of the functions described as \link[=draw_key]{key glyphs}, -to change the display of the layer in the legend. +\code{...}. This can be one of the functions described as +\link[=draw_key]{key glyphs}, to change the display of the layer in the legend. }} \item{na.rm}{If \code{FALSE}, the default, missing values are removed with a warning. If diff --git a/man/geom_bar.Rd b/man/geom_bar.Rd index 44b1831881..7a7889227c 100644 --- a/man/geom_bar.Rd +++ b/man/geom_bar.Rd @@ -47,10 +47,8 @@ stat_count( ) } \arguments{ -\item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}. If specified and -\code{inherit.aes = TRUE} (the default), it is combined with the default mapping -at the top level of the plot. You must supply \code{mapping} if there is no plot -mapping.} +\item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}. If specified and \code{inherit.aes = TRUE} (the default), it is combined with the default mapping at the top level +of the plot. You must supply \code{mapping} if there is no plot mapping.} \item{data}{The data to be displayed in this layer. There are three options: \itemize{ @@ -79,28 +77,30 @@ use \code{position_jitter()}, give the position as \code{"jitter"}. \item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These arguments broadly fall into one of 4 categories below. Notably, further arguments to -the \code{position} argument, or aesthetics that are required can \emph{not} be passed -through \code{...}. Unknown arguments that are not part of the 4 categories below -are ignored. +the \code{position} argument, or aesthetics that are required can +\emph{not} be passed through \code{...}. Unknown arguments that are not part of the 4 +categories below are ignored. \itemize{ \item Static aesthetics that are not mapped to a scale, but are at a fixed value and apply to the layer as a whole. For example, \code{colour = "red"} or -\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section that -lists the available options. The 'required' aesthetics cannot be passed on to -the \code{params}. Please note that while passing unmapped aesthetics as vectors -is technically possible, the order and required length is not guaranteed to -be parallel to the input data. +\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section +that lists the available options. The 'required' aesthetics cannot be +passed on to the \code{params}. Please note that while passing unmapped +aesthetics as vectors is technically possible, the order and required +length is not guaranteed to be parallel to the input data. \item When constructing a layer using a \verb{stat_*()} function, the \code{...} argument can be used to pass on parameters -to the \code{geom} part of the layer. An example of this is \code{stat_density(geom = "area", outline.type = "both")}. The geom's documentation lists which -parameters it can accept. +to the \code{geom} part of the layer. An example of this is +\code{stat_density(geom = "area", outline.type = "both")}. The geom's +documentation lists which parameters it can accept. \item Inversely, when constructing a layer using a -\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters to -the \code{stat} part of the layer. An example of this is \code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists which parameters it -can accept. +\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters +to the \code{stat} part of the layer. An example of this is +\code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists +which parameters it can accept. \item The \code{key_glyph} argument of \code{\link[=layer]{layer()}} may also be passed on through -\code{...}. This can be one of the functions described as \link[=draw_key]{key glyphs}, -to change the display of the layer in the legend. +\code{...}. This can be one of the functions described as +\link[=draw_key]{key glyphs}, to change the display of the layer in the legend. }} \item{just}{Adjustment for column placement. Set to \code{0.5} by default, meaning diff --git a/man/geom_bin_2d.Rd b/man/geom_bin_2d.Rd index 4493e037e6..a21f940864 100644 --- a/man/geom_bin_2d.Rd +++ b/man/geom_bin_2d.Rd @@ -39,10 +39,8 @@ stat_bin_2d( ) } \arguments{ -\item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}. If specified and -\code{inherit.aes = TRUE} (the default), it is combined with the default mapping -at the top level of the plot. You must supply \code{mapping} if there is no plot -mapping.} +\item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}. If specified and \code{inherit.aes = TRUE} (the default), it is combined with the default mapping at the top level +of the plot. You must supply \code{mapping} if there is no plot mapping.} \item{data}{The data to be displayed in this layer. There are three options: \itemize{ @@ -71,28 +69,30 @@ use \code{position_jitter()}, give the position as \code{"jitter"}. \item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These arguments broadly fall into one of 4 categories below. Notably, further arguments to -the \code{position} argument, or aesthetics that are required can \emph{not} be passed -through \code{...}. Unknown arguments that are not part of the 4 categories below -are ignored. +the \code{position} argument, or aesthetics that are required can +\emph{not} be passed through \code{...}. Unknown arguments that are not part of the 4 +categories below are ignored. \itemize{ \item Static aesthetics that are not mapped to a scale, but are at a fixed value and apply to the layer as a whole. For example, \code{colour = "red"} or -\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section that -lists the available options. The 'required' aesthetics cannot be passed on to -the \code{params}. Please note that while passing unmapped aesthetics as vectors -is technically possible, the order and required length is not guaranteed to -be parallel to the input data. +\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section +that lists the available options. The 'required' aesthetics cannot be +passed on to the \code{params}. Please note that while passing unmapped +aesthetics as vectors is technically possible, the order and required +length is not guaranteed to be parallel to the input data. \item When constructing a layer using a \verb{stat_*()} function, the \code{...} argument can be used to pass on parameters -to the \code{geom} part of the layer. An example of this is \code{stat_density(geom = "area", outline.type = "both")}. The geom's documentation lists which -parameters it can accept. +to the \code{geom} part of the layer. An example of this is +\code{stat_density(geom = "area", outline.type = "both")}. The geom's +documentation lists which parameters it can accept. \item Inversely, when constructing a layer using a -\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters to -the \code{stat} part of the layer. An example of this is \code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists which parameters it -can accept. +\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters +to the \code{stat} part of the layer. An example of this is +\code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists +which parameters it can accept. \item The \code{key_glyph} argument of \code{\link[=layer]{layer()}} may also be passed on through -\code{...}. This can be one of the functions described as \link[=draw_key]{key glyphs}, -to change the display of the layer in the legend. +\code{...}. This can be one of the functions described as +\link[=draw_key]{key glyphs}, to change the display of the layer in the legend. }} \item{lineend}{Line end style (round, butt, square).} diff --git a/man/geom_blank.Rd b/man/geom_blank.Rd index 91cb3d6e3b..ab0527dd99 100644 --- a/man/geom_blank.Rd +++ b/man/geom_blank.Rd @@ -15,10 +15,8 @@ geom_blank( ) } \arguments{ -\item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}. If specified and -\code{inherit.aes = TRUE} (the default), it is combined with the default mapping -at the top level of the plot. You must supply \code{mapping} if there is no plot -mapping.} +\item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}. If specified and \code{inherit.aes = TRUE} (the default), it is combined with the default mapping at the top level +of the plot. You must supply \code{mapping} if there is no plot mapping.} \item{data}{The data to be displayed in this layer. There are three options: \itemize{ @@ -39,8 +37,8 @@ accepts the following: \itemize{ \item A \code{Stat} ggproto subclass, for example \code{StatCount}. \item A string naming the stat. To give the stat as a string, strip the -function name of the \code{stat_} prefix. For example, to use \code{stat_count()}, give -the stat as \code{"count"}. +function name of the \code{stat_} prefix. For example, to use \code{stat_count()}, +give the stat as \code{"count"}. \item For more information and other ways to specify the stat, see the \link[=layer_stats]{layer stat} documentation. }} @@ -60,28 +58,30 @@ use \code{position_jitter()}, give the position as \code{"jitter"}. \item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These arguments broadly fall into one of 4 categories below. Notably, further arguments to -the \code{position} argument, or aesthetics that are required can \emph{not} be passed -through \code{...}. Unknown arguments that are not part of the 4 categories below -are ignored. +the \code{position} argument, or aesthetics that are required can +\emph{not} be passed through \code{...}. Unknown arguments that are not part of the 4 +categories below are ignored. \itemize{ \item Static aesthetics that are not mapped to a scale, but are at a fixed value and apply to the layer as a whole. For example, \code{colour = "red"} or -\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section that -lists the available options. The 'required' aesthetics cannot be passed on to -the \code{params}. Please note that while passing unmapped aesthetics as vectors -is technically possible, the order and required length is not guaranteed to -be parallel to the input data. +\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section +that lists the available options. The 'required' aesthetics cannot be +passed on to the \code{params}. Please note that while passing unmapped +aesthetics as vectors is technically possible, the order and required +length is not guaranteed to be parallel to the input data. \item When constructing a layer using a \verb{stat_*()} function, the \code{...} argument can be used to pass on parameters -to the \code{geom} part of the layer. An example of this is \code{stat_density(geom = "area", outline.type = "both")}. The geom's documentation lists which -parameters it can accept. +to the \code{geom} part of the layer. An example of this is +\code{stat_density(geom = "area", outline.type = "both")}. The geom's +documentation lists which parameters it can accept. \item Inversely, when constructing a layer using a -\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters to -the \code{stat} part of the layer. An example of this is \code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists which parameters it -can accept. +\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters +to the \code{stat} part of the layer. An example of this is +\code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists +which parameters it can accept. \item The \code{key_glyph} argument of \code{\link[=layer]{layer()}} may also be passed on through -\code{...}. This can be one of the functions described as \link[=draw_key]{key glyphs}, -to change the display of the layer in the legend. +\code{...}. This can be one of the functions described as +\link[=draw_key]{key glyphs}, to change the display of the layer in the legend. }} \item{show.legend}{Logical. Should this layer be included in the legends? \code{NA}, the default, diff --git a/man/geom_boxplot.Rd b/man/geom_boxplot.Rd index fb7b75b0b5..e0b5440511 100644 --- a/man/geom_boxplot.Rd +++ b/man/geom_boxplot.Rd @@ -59,10 +59,8 @@ stat_boxplot( ) } \arguments{ -\item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}. If specified and -\code{inherit.aes = TRUE} (the default), it is combined with the default mapping -at the top level of the plot. You must supply \code{mapping} if there is no plot -mapping.} +\item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}. If specified and \code{inherit.aes = TRUE} (the default), it is combined with the default mapping at the top level +of the plot. You must supply \code{mapping} if there is no plot mapping.} \item{data}{The data to be displayed in this layer. There are three options: \itemize{ @@ -91,28 +89,30 @@ use \code{position_jitter()}, give the position as \code{"jitter"}. \item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These arguments broadly fall into one of 4 categories below. Notably, further arguments to -the \code{position} argument, or aesthetics that are required can \emph{not} be passed -through \code{...}. Unknown arguments that are not part of the 4 categories below -are ignored. +the \code{position} argument, or aesthetics that are required can +\emph{not} be passed through \code{...}. Unknown arguments that are not part of the 4 +categories below are ignored. \itemize{ \item Static aesthetics that are not mapped to a scale, but are at a fixed value and apply to the layer as a whole. For example, \code{colour = "red"} or -\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section that -lists the available options. The 'required' aesthetics cannot be passed on to -the \code{params}. Please note that while passing unmapped aesthetics as vectors -is technically possible, the order and required length is not guaranteed to -be parallel to the input data. +\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section +that lists the available options. The 'required' aesthetics cannot be +passed on to the \code{params}. Please note that while passing unmapped +aesthetics as vectors is technically possible, the order and required +length is not guaranteed to be parallel to the input data. \item When constructing a layer using a \verb{stat_*()} function, the \code{...} argument can be used to pass on parameters -to the \code{geom} part of the layer. An example of this is \code{stat_density(geom = "area", outline.type = "both")}. The geom's documentation lists which -parameters it can accept. +to the \code{geom} part of the layer. An example of this is +\code{stat_density(geom = "area", outline.type = "both")}. The geom's +documentation lists which parameters it can accept. \item Inversely, when constructing a layer using a -\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters to -the \code{stat} part of the layer. An example of this is \code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists which parameters it -can accept. +\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters +to the \code{stat} part of the layer. An example of this is +\code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists +which parameters it can accept. \item The \code{key_glyph} argument of \code{\link[=layer]{layer()}} may also be passed on through -\code{...}. This can be one of the functions described as \link[=draw_key]{key glyphs}, -to change the display of the layer in the legend. +\code{...}. This can be one of the functions described as +\link[=draw_key]{key glyphs}, to change the display of the layer in the legend. }} \item{outliers}{Whether to display (\code{TRUE}) or discard (\code{FALSE}) outliers @@ -157,10 +157,7 @@ weighted, using the \code{weight} aesthetic).} \item{na.rm}{If \code{FALSE}, the default, missing values are removed with a warning. If \code{TRUE}, missing values are silently removed.} -\item{orientation}{The orientation of the layer. The default (\code{NA}) -automatically determines the orientation from the aesthetic mapping. In the -rare event that this fails it can be given explicitly by setting \code{orientation} -to either \code{"x"} or \code{"y"}. See the \emph{Orientation} section for more detail.} +\item{orientation}{The orientation of the layer. The default (\code{NA}) automatically determines the orientation from the aesthetic mapping. In the rare event that this fails it can be given explicitly by setting \code{orientation} to either \code{"x"}` or \code{"y"}. See the \emph{Orientation} section for more detail.} \item{show.legend}{Logical. Should this layer be included in the legends? \code{NA}, the default, includes if any aesthetics are mapped. \code{FALSE} never includes, and \code{TRUE} diff --git a/man/geom_contour.Rd b/man/geom_contour.Rd index eb325d60e1..0236191536 100644 --- a/man/geom_contour.Rd +++ b/man/geom_contour.Rd @@ -73,10 +73,8 @@ stat_contour_filled( ) } \arguments{ -\item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}. If specified and -\code{inherit.aes = TRUE} (the default), it is combined with the default mapping -at the top level of the plot. You must supply \code{mapping} if there is no plot -mapping.} +\item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}. If specified and \code{inherit.aes = TRUE} (the default), it is combined with the default mapping at the top level +of the plot. You must supply \code{mapping} if there is no plot mapping.} \item{data}{The data to be displayed in this layer. There are three options: \itemize{ @@ -97,8 +95,8 @@ accepts the following: \itemize{ \item A \code{Stat} ggproto subclass, for example \code{StatCount}. \item A string naming the stat. To give the stat as a string, strip the -function name of the \code{stat_} prefix. For example, to use \code{stat_count()}, give -the stat as \code{"count"}. +function name of the \code{stat_} prefix. For example, to use \code{stat_count()}, +give the stat as \code{"count"}. \item For more information and other ways to specify the stat, see the \link[=layer_stats]{layer stat} documentation. }} @@ -118,28 +116,30 @@ use \code{position_jitter()}, give the position as \code{"jitter"}. \item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These arguments broadly fall into one of 4 categories below. Notably, further arguments to -the \code{position} argument, or aesthetics that are required can \emph{not} be passed -through \code{...}. Unknown arguments that are not part of the 4 categories below -are ignored. +the \code{position} argument, or aesthetics that are required can +\emph{not} be passed through \code{...}. Unknown arguments that are not part of the 4 +categories below are ignored. \itemize{ \item Static aesthetics that are not mapped to a scale, but are at a fixed value and apply to the layer as a whole. For example, \code{colour = "red"} or -\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section that -lists the available options. The 'required' aesthetics cannot be passed on to -the \code{params}. Please note that while passing unmapped aesthetics as vectors -is technically possible, the order and required length is not guaranteed to -be parallel to the input data. +\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section +that lists the available options. The 'required' aesthetics cannot be +passed on to the \code{params}. Please note that while passing unmapped +aesthetics as vectors is technically possible, the order and required +length is not guaranteed to be parallel to the input data. \item When constructing a layer using a \verb{stat_*()} function, the \code{...} argument can be used to pass on parameters -to the \code{geom} part of the layer. An example of this is \code{stat_density(geom = "area", outline.type = "both")}. The geom's documentation lists which -parameters it can accept. +to the \code{geom} part of the layer. An example of this is +\code{stat_density(geom = "area", outline.type = "both")}. The geom's +documentation lists which parameters it can accept. \item Inversely, when constructing a layer using a -\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters to -the \code{stat} part of the layer. An example of this is \code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists which parameters it -can accept. +\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters +to the \code{stat} part of the layer. An example of this is +\code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists +which parameters it can accept. \item The \code{key_glyph} argument of \code{\link[=layer]{layer()}} may also be passed on through -\code{...}. This can be one of the functions described as \link[=draw_key]{key glyphs}, -to change the display of the layer in the legend. +\code{...}. This can be one of the functions described as +\link[=draw_key]{key glyphs}, to change the display of the layer in the legend. }} \item{bins}{Number of contour bins. Overridden by \code{breaks}.} @@ -195,8 +195,8 @@ accepts the following: \itemize{ \item A \code{Geom} ggproto subclass, for example \code{GeomPoint}. \item A string naming the geom. To give the geom as a string, strip the -function name of the \code{geom_} prefix. For example, to use \code{geom_point()}, give -the geom as \code{"point"}. +function name of the \code{geom_} prefix. For example, to use \code{geom_point()}, +give the geom as \code{"point"}. \item For more information and other ways to specify the geom, see the \link[=layer_geoms]{layer geom} documentation. }} diff --git a/man/geom_count.Rd b/man/geom_count.Rd index c0242b91b3..1250870c5c 100644 --- a/man/geom_count.Rd +++ b/man/geom_count.Rd @@ -28,10 +28,8 @@ stat_sum( ) } \arguments{ -\item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}. If specified and -\code{inherit.aes = TRUE} (the default), it is combined with the default mapping -at the top level of the plot. You must supply \code{mapping} if there is no plot -mapping.} +\item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}. If specified and \code{inherit.aes = TRUE} (the default), it is combined with the default mapping at the top level +of the plot. You must supply \code{mapping} if there is no plot mapping.} \item{data}{The data to be displayed in this layer. There are three options: \itemize{ @@ -60,28 +58,30 @@ use \code{position_jitter()}, give the position as \code{"jitter"}. \item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These arguments broadly fall into one of 4 categories below. Notably, further arguments to -the \code{position} argument, or aesthetics that are required can \emph{not} be passed -through \code{...}. Unknown arguments that are not part of the 4 categories below -are ignored. +the \code{position} argument, or aesthetics that are required can +\emph{not} be passed through \code{...}. Unknown arguments that are not part of the 4 +categories below are ignored. \itemize{ \item Static aesthetics that are not mapped to a scale, but are at a fixed value and apply to the layer as a whole. For example, \code{colour = "red"} or -\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section that -lists the available options. The 'required' aesthetics cannot be passed on to -the \code{params}. Please note that while passing unmapped aesthetics as vectors -is technically possible, the order and required length is not guaranteed to -be parallel to the input data. +\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section +that lists the available options. The 'required' aesthetics cannot be +passed on to the \code{params}. Please note that while passing unmapped +aesthetics as vectors is technically possible, the order and required +length is not guaranteed to be parallel to the input data. \item When constructing a layer using a \verb{stat_*()} function, the \code{...} argument can be used to pass on parameters -to the \code{geom} part of the layer. An example of this is \code{stat_density(geom = "area", outline.type = "both")}. The geom's documentation lists which -parameters it can accept. +to the \code{geom} part of the layer. An example of this is +\code{stat_density(geom = "area", outline.type = "both")}. The geom's +documentation lists which parameters it can accept. \item Inversely, when constructing a layer using a -\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters to -the \code{stat} part of the layer. An example of this is \code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists which parameters it -can accept. +\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters +to the \code{stat} part of the layer. An example of this is +\code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists +which parameters it can accept. \item The \code{key_glyph} argument of \code{\link[=layer]{layer()}} may also be passed on through -\code{...}. This can be one of the functions described as \link[=draw_key]{key glyphs}, -to change the display of the layer in the legend. +\code{...}. This can be one of the functions described as +\link[=draw_key]{key glyphs}, to change the display of the layer in the legend. }} \item{na.rm}{If \code{FALSE}, the default, missing values are removed with a warning. If diff --git a/man/geom_density.Rd b/man/geom_density.Rd index ec6181b54d..0a201e00a9 100644 --- a/man/geom_density.Rd +++ b/man/geom_density.Rd @@ -39,10 +39,8 @@ stat_density( ) } \arguments{ -\item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}. If specified and -\code{inherit.aes = TRUE} (the default), it is combined with the default mapping -at the top level of the plot. You must supply \code{mapping} if there is no plot -mapping.} +\item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}. If specified and \code{inherit.aes = TRUE} (the default), it is combined with the default mapping at the top level +of the plot. You must supply \code{mapping} if there is no plot mapping.} \item{data}{The data to be displayed in this layer. There are three options: \itemize{ @@ -71,28 +69,30 @@ use \code{position_jitter()}, give the position as \code{"jitter"}. \item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These arguments broadly fall into one of 4 categories below. Notably, further arguments to -the \code{position} argument, or aesthetics that are required can \emph{not} be passed -through \code{...}. Unknown arguments that are not part of the 4 categories below -are ignored. +the \code{position} argument, or aesthetics that are required can +\emph{not} be passed through \code{...}. Unknown arguments that are not part of the 4 +categories below are ignored. \itemize{ \item Static aesthetics that are not mapped to a scale, but are at a fixed value and apply to the layer as a whole. For example, \code{colour = "red"} or -\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section that -lists the available options. The 'required' aesthetics cannot be passed on to -the \code{params}. Please note that while passing unmapped aesthetics as vectors -is technically possible, the order and required length is not guaranteed to -be parallel to the input data. +\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section +that lists the available options. The 'required' aesthetics cannot be +passed on to the \code{params}. Please note that while passing unmapped +aesthetics as vectors is technically possible, the order and required +length is not guaranteed to be parallel to the input data. \item When constructing a layer using a \verb{stat_*()} function, the \code{...} argument can be used to pass on parameters -to the \code{geom} part of the layer. An example of this is \code{stat_density(geom = "area", outline.type = "both")}. The geom's documentation lists which -parameters it can accept. +to the \code{geom} part of the layer. An example of this is +\code{stat_density(geom = "area", outline.type = "both")}. The geom's +documentation lists which parameters it can accept. \item Inversely, when constructing a layer using a -\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters to -the \code{stat} part of the layer. An example of this is \code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists which parameters it -can accept. +\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters +to the \code{stat} part of the layer. An example of this is +\code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists +which parameters it can accept. \item The \code{key_glyph} argument of \code{\link[=layer]{layer()}} may also be passed on through -\code{...}. This can be one of the functions described as \link[=draw_key]{key glyphs}, -to change the display of the layer in the legend. +\code{...}. This can be one of the functions described as +\link[=draw_key]{key glyphs}, to change the display of the layer in the legend. }} \item{outline.type}{Type of the outline of the area; \code{"both"} draws both the @@ -125,10 +125,7 @@ specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} overriding these connections, see how the \link[=layer_stats]{stat} and \link[=layer_geoms]{geom} arguments work.} -\item{orientation}{The orientation of the layer. The default (\code{NA}) -automatically determines the orientation from the aesthetic mapping. In the -rare event that this fails it can be given explicitly by setting \code{orientation} -to either \code{"x"} or \code{"y"}. See the \emph{Orientation} section for more detail.} +\item{orientation}{The orientation of the layer. The default (\code{NA}) automatically determines the orientation from the aesthetic mapping. In the rare event that this fails it can be given explicitly by setting \code{orientation} to either \code{"x"}` or \code{"y"}. See the \emph{Orientation} section for more detail.} \item{bw}{The smoothing bandwidth to be used. If numeric, the standard deviation of the smoothing kernel. diff --git a/man/geom_density_2d.Rd b/man/geom_density_2d.Rd index 6af5a9f459..36cd1628fa 100644 --- a/man/geom_density_2d.Rd +++ b/man/geom_density_2d.Rd @@ -71,10 +71,8 @@ stat_density_2d_filled( ) } \arguments{ -\item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}. If specified and -\code{inherit.aes = TRUE} (the default), it is combined with the default mapping -at the top level of the plot. You must supply \code{mapping} if there is no plot -mapping.} +\item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}. If specified and \code{inherit.aes = TRUE} (the default), it is combined with the default mapping at the top level +of the plot. You must supply \code{mapping} if there is no plot mapping.} \item{data}{The data to be displayed in this layer. There are three options: \itemize{ diff --git a/man/geom_dotplot.Rd b/man/geom_dotplot.Rd index 0587e53510..0ea33fbe82 100644 --- a/man/geom_dotplot.Rd +++ b/man/geom_dotplot.Rd @@ -27,10 +27,8 @@ geom_dotplot( ) } \arguments{ -\item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}. If specified and -\code{inherit.aes = TRUE} (the default), it is combined with the default mapping -at the top level of the plot. You must supply \code{mapping} if there is no plot -mapping.} +\item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}. If specified and \code{inherit.aes = TRUE} (the default), it is combined with the default mapping at the top level +of the plot. You must supply \code{mapping} if there is no plot mapping.} \item{data}{The data to be displayed in this layer. There are three options: \itemize{ @@ -59,28 +57,30 @@ use \code{position_jitter()}, give the position as \code{"jitter"}. \item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These arguments broadly fall into one of 4 categories below. Notably, further arguments to -the \code{position} argument, or aesthetics that are required can \emph{not} be passed -through \code{...}. Unknown arguments that are not part of the 4 categories below -are ignored. +the \code{position} argument, or aesthetics that are required can +\emph{not} be passed through \code{...}. Unknown arguments that are not part of the 4 +categories below are ignored. \itemize{ \item Static aesthetics that are not mapped to a scale, but are at a fixed value and apply to the layer as a whole. For example, \code{colour = "red"} or -\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section that -lists the available options. The 'required' aesthetics cannot be passed on to -the \code{params}. Please note that while passing unmapped aesthetics as vectors -is technically possible, the order and required length is not guaranteed to -be parallel to the input data. +\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section +that lists the available options. The 'required' aesthetics cannot be +passed on to the \code{params}. Please note that while passing unmapped +aesthetics as vectors is technically possible, the order and required +length is not guaranteed to be parallel to the input data. \item When constructing a layer using a \verb{stat_*()} function, the \code{...} argument can be used to pass on parameters -to the \code{geom} part of the layer. An example of this is \code{stat_density(geom = "area", outline.type = "both")}. The geom's documentation lists which -parameters it can accept. +to the \code{geom} part of the layer. An example of this is +\code{stat_density(geom = "area", outline.type = "both")}. The geom's +documentation lists which parameters it can accept. \item Inversely, when constructing a layer using a -\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters to -the \code{stat} part of the layer. An example of this is \code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists which parameters it -can accept. +\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters +to the \code{stat} part of the layer. An example of this is +\code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists +which parameters it can accept. \item The \code{key_glyph} argument of \code{\link[=layer]{layer()}} may also be passed on through -\code{...}. This can be one of the functions described as \link[=draw_key]{key glyphs}, -to change the display of the layer in the legend. +\code{...}. This can be one of the functions described as +\link[=draw_key]{key glyphs}, to change the display of the layer in the legend. }} \item{binwidth}{When \code{method} is "dotdensity", this specifies maximum bin diff --git a/man/geom_function.Rd b/man/geom_function.Rd index 2522947675..2cb7a2b56e 100644 --- a/man/geom_function.Rd +++ b/man/geom_function.Rd @@ -37,10 +37,8 @@ stat_function( ) } \arguments{ -\item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}. If specified and -\code{inherit.aes = TRUE} (the default), it is combined with the default mapping -at the top level of the plot. You must supply \code{mapping} if there is no plot -mapping.} +\item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}. If specified and \code{inherit.aes = TRUE} (the default), it is combined with the default mapping at the top level +of the plot. You must supply \code{mapping} if there is no plot mapping.} \item{data}{Ignored by \code{stat_function()}, do not use.} @@ -51,8 +49,8 @@ accepts the following: \itemize{ \item A \code{Stat} ggproto subclass, for example \code{StatCount}. \item A string naming the stat. To give the stat as a string, strip the -function name of the \code{stat_} prefix. For example, to use \code{stat_count()}, give -the stat as \code{"count"}. +function name of the \code{stat_} prefix. For example, to use \code{stat_count()}, +give the stat as \code{"count"}. \item For more information and other ways to specify the stat, see the \link[=layer_stats]{layer stat} documentation. }} @@ -72,28 +70,30 @@ use \code{position_jitter()}, give the position as \code{"jitter"}. \item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These arguments broadly fall into one of 4 categories below. Notably, further arguments to -the \code{position} argument, or aesthetics that are required can \emph{not} be passed -through \code{...}. Unknown arguments that are not part of the 4 categories below -are ignored. +the \code{position} argument, or aesthetics that are required can +\emph{not} be passed through \code{...}. Unknown arguments that are not part of the 4 +categories below are ignored. \itemize{ \item Static aesthetics that are not mapped to a scale, but are at a fixed value and apply to the layer as a whole. For example, \code{colour = "red"} or -\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section that -lists the available options. The 'required' aesthetics cannot be passed on to -the \code{params}. Please note that while passing unmapped aesthetics as vectors -is technically possible, the order and required length is not guaranteed to -be parallel to the input data. +\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section +that lists the available options. The 'required' aesthetics cannot be +passed on to the \code{params}. Please note that while passing unmapped +aesthetics as vectors is technically possible, the order and required +length is not guaranteed to be parallel to the input data. \item When constructing a layer using a \verb{stat_*()} function, the \code{...} argument can be used to pass on parameters -to the \code{geom} part of the layer. An example of this is \code{stat_density(geom = "area", outline.type = "both")}. The geom's documentation lists which -parameters it can accept. +to the \code{geom} part of the layer. An example of this is +\code{stat_density(geom = "area", outline.type = "both")}. The geom's +documentation lists which parameters it can accept. \item Inversely, when constructing a layer using a -\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters to -the \code{stat} part of the layer. An example of this is \code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists which parameters it -can accept. +\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters +to the \code{stat} part of the layer. An example of this is +\code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists +which parameters it can accept. \item The \code{key_glyph} argument of \code{\link[=layer]{layer()}} may also be passed on through -\code{...}. This can be one of the functions described as \link[=draw_key]{key glyphs}, -to change the display of the layer in the legend. +\code{...}. This can be one of the functions described as +\link[=draw_key]{key glyphs}, to change the display of the layer in the legend. }} \item{arrow}{Arrow specification, as created by \code{\link[grid:arrow]{grid::arrow()}}.} @@ -129,8 +129,8 @@ accepts the following: \itemize{ \item A \code{Geom} ggproto subclass, for example \code{GeomPoint}. \item A string naming the geom. To give the geom as a string, strip the -function name of the \code{geom_} prefix. For example, to use \code{geom_point()}, give -the geom as \code{"point"}. +function name of the \code{geom_} prefix. For example, to use \code{geom_point()}, +give the geom as \code{"point"}. \item For more information and other ways to specify the geom, see the \link[=layer_geoms]{layer geom} documentation. }} diff --git a/man/geom_hex.Rd b/man/geom_hex.Rd index b9a69a3f6e..dfd79f9504 100644 --- a/man/geom_hex.Rd +++ b/man/geom_hex.Rd @@ -34,10 +34,8 @@ stat_bin_hex( ) } \arguments{ -\item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}. If specified and -\code{inherit.aes = TRUE} (the default), it is combined with the default mapping -at the top level of the plot. You must supply \code{mapping} if there is no plot -mapping.} +\item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}. If specified and \code{inherit.aes = TRUE} (the default), it is combined with the default mapping at the top level +of the plot. You must supply \code{mapping} if there is no plot mapping.} \item{data}{The data to be displayed in this layer. There are three options: \itemize{ @@ -66,28 +64,30 @@ use \code{position_jitter()}, give the position as \code{"jitter"}. \item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These arguments broadly fall into one of 4 categories below. Notably, further arguments to -the \code{position} argument, or aesthetics that are required can \emph{not} be passed -through \code{...}. Unknown arguments that are not part of the 4 categories below -are ignored. +the \code{position} argument, or aesthetics that are required can +\emph{not} be passed through \code{...}. Unknown arguments that are not part of the 4 +categories below are ignored. \itemize{ \item Static aesthetics that are not mapped to a scale, but are at a fixed value and apply to the layer as a whole. For example, \code{colour = "red"} or -\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section that -lists the available options. The 'required' aesthetics cannot be passed on to -the \code{params}. Please note that while passing unmapped aesthetics as vectors -is technically possible, the order and required length is not guaranteed to -be parallel to the input data. +\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section +that lists the available options. The 'required' aesthetics cannot be +passed on to the \code{params}. Please note that while passing unmapped +aesthetics as vectors is technically possible, the order and required +length is not guaranteed to be parallel to the input data. \item When constructing a layer using a \verb{stat_*()} function, the \code{...} argument can be used to pass on parameters -to the \code{geom} part of the layer. An example of this is \code{stat_density(geom = "area", outline.type = "both")}. The geom's documentation lists which -parameters it can accept. +to the \code{geom} part of the layer. An example of this is +\code{stat_density(geom = "area", outline.type = "both")}. The geom's +documentation lists which parameters it can accept. \item Inversely, when constructing a layer using a -\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters to -the \code{stat} part of the layer. An example of this is \code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists which parameters it -can accept. +\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters +to the \code{stat} part of the layer. An example of this is +\code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists +which parameters it can accept. \item The \code{key_glyph} argument of \code{\link[=layer]{layer()}} may also be passed on through -\code{...}. This can be one of the functions described as \link[=draw_key]{key glyphs}, -to change the display of the layer in the legend. +\code{...}. This can be one of the functions described as +\link[=draw_key]{key glyphs}, to change the display of the layer in the legend. }} \item{lineend}{Line end style (round, butt, square).} diff --git a/man/geom_histogram.Rd b/man/geom_histogram.Rd index 42fe58ee55..ebfacc06ea 100644 --- a/man/geom_histogram.Rd +++ b/man/geom_histogram.Rd @@ -55,10 +55,8 @@ stat_bin( ) } \arguments{ -\item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}. If specified and -\code{inherit.aes = TRUE} (the default), it is combined with the default mapping -at the top level of the plot. You must supply \code{mapping} if there is no plot -mapping.} +\item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}. If specified and \code{inherit.aes = TRUE} (the default), it is combined with the default mapping at the top level +of the plot. You must supply \code{mapping} if there is no plot mapping.} \item{data}{The data to be displayed in this layer. There are three options: \itemize{ @@ -87,28 +85,30 @@ use \code{position_jitter()}, give the position as \code{"jitter"}. \item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These arguments broadly fall into one of 4 categories below. Notably, further arguments to -the \code{position} argument, or aesthetics that are required can \emph{not} be passed -through \code{...}. Unknown arguments that are not part of the 4 categories below -are ignored. +the \code{position} argument, or aesthetics that are required can +\emph{not} be passed through \code{...}. Unknown arguments that are not part of the 4 +categories below are ignored. \itemize{ \item Static aesthetics that are not mapped to a scale, but are at a fixed value and apply to the layer as a whole. For example, \code{colour = "red"} or -\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section that -lists the available options. The 'required' aesthetics cannot be passed on to -the \code{params}. Please note that while passing unmapped aesthetics as vectors -is technically possible, the order and required length is not guaranteed to -be parallel to the input data. +\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section +that lists the available options. The 'required' aesthetics cannot be +passed on to the \code{params}. Please note that while passing unmapped +aesthetics as vectors is technically possible, the order and required +length is not guaranteed to be parallel to the input data. \item When constructing a layer using a \verb{stat_*()} function, the \code{...} argument can be used to pass on parameters -to the \code{geom} part of the layer. An example of this is \code{stat_density(geom = "area", outline.type = "both")}. The geom's documentation lists which -parameters it can accept. +to the \code{geom} part of the layer. An example of this is +\code{stat_density(geom = "area", outline.type = "both")}. The geom's +documentation lists which parameters it can accept. \item Inversely, when constructing a layer using a -\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters to -the \code{stat} part of the layer. An example of this is \code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists which parameters it -can accept. +\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters +to the \code{stat} part of the layer. An example of this is +\code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists +which parameters it can accept. \item The \code{key_glyph} argument of \code{\link[=layer]{layer()}} may also be passed on through -\code{...}. This can be one of the functions described as \link[=draw_key]{key glyphs}, -to change the display of the layer in the legend. +\code{...}. This can be one of the functions described as +\link[=draw_key]{key glyphs}, to change the display of the layer in the legend. }} \item{na.rm}{If \code{FALSE}, the default, missing values are removed with a warning. If @@ -140,10 +140,7 @@ bin width of a time variable is the number of seconds.} \item{bins}{Number of bins. Overridden by \code{binwidth}. Defaults to 30.} -\item{orientation}{The orientation of the layer. The default (\code{NA}) -automatically determines the orientation from the aesthetic mapping. In the -rare event that this fails it can be given explicitly by setting \code{orientation} -to either \code{"x"} or \code{"y"}. See the \emph{Orientation} section for more detail.} +\item{orientation}{The orientation of the layer. The default (\code{NA}) automatically determines the orientation from the aesthetic mapping. In the rare event that this fails it can be given explicitly by setting \code{orientation} to either \code{"x"}` or \code{"y"}. See the \emph{Orientation} section for more detail.} \item{lineend}{Line end style (round, butt, square).} diff --git a/man/geom_jitter.Rd b/man/geom_jitter.Rd index 029d273694..9f38a9c9ab 100644 --- a/man/geom_jitter.Rd +++ b/man/geom_jitter.Rd @@ -18,10 +18,8 @@ geom_jitter( ) } \arguments{ -\item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}. If specified and -\code{inherit.aes = TRUE} (the default), it is combined with the default mapping -at the top level of the plot. You must supply \code{mapping} if there is no plot -mapping.} +\item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}. If specified and \code{inherit.aes = TRUE} (the default), it is combined with the default mapping at the top level +of the plot. You must supply \code{mapping} if there is no plot mapping.} \item{data}{The data to be displayed in this layer. There are three options: \itemize{ @@ -42,8 +40,8 @@ accepts the following: \itemize{ \item A \code{Stat} ggproto subclass, for example \code{StatCount}. \item A string naming the stat. To give the stat as a string, strip the -function name of the \code{stat_} prefix. For example, to use \code{stat_count()}, give -the stat as \code{"count"}. +function name of the \code{stat_} prefix. For example, to use \code{stat_count()}, +give the stat as \code{"count"}. \item For more information and other ways to specify the stat, see the \link[=layer_stats]{layer stat} documentation. }} @@ -63,28 +61,30 @@ use \code{position_jitter()}, give the position as \code{"jitter"}. \item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These arguments broadly fall into one of 4 categories below. Notably, further arguments to -the \code{position} argument, or aesthetics that are required can \emph{not} be passed -through \code{...}. Unknown arguments that are not part of the 4 categories below -are ignored. +the \code{position} argument, or aesthetics that are required can +\emph{not} be passed through \code{...}. Unknown arguments that are not part of the 4 +categories below are ignored. \itemize{ \item Static aesthetics that are not mapped to a scale, but are at a fixed value and apply to the layer as a whole. For example, \code{colour = "red"} or -\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section that -lists the available options. The 'required' aesthetics cannot be passed on to -the \code{params}. Please note that while passing unmapped aesthetics as vectors -is technically possible, the order and required length is not guaranteed to -be parallel to the input data. +\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section +that lists the available options. The 'required' aesthetics cannot be +passed on to the \code{params}. Please note that while passing unmapped +aesthetics as vectors is technically possible, the order and required +length is not guaranteed to be parallel to the input data. \item When constructing a layer using a \verb{stat_*()} function, the \code{...} argument can be used to pass on parameters -to the \code{geom} part of the layer. An example of this is \code{stat_density(geom = "area", outline.type = "both")}. The geom's documentation lists which -parameters it can accept. +to the \code{geom} part of the layer. An example of this is +\code{stat_density(geom = "area", outline.type = "both")}. The geom's +documentation lists which parameters it can accept. \item Inversely, when constructing a layer using a -\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters to -the \code{stat} part of the layer. An example of this is \code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists which parameters it -can accept. +\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters +to the \code{stat} part of the layer. An example of this is +\code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists +which parameters it can accept. \item The \code{key_glyph} argument of \code{\link[=layer]{layer()}} may also be passed on through -\code{...}. This can be one of the functions described as \link[=draw_key]{key glyphs}, -to change the display of the layer in the legend. +\code{...}. This can be one of the functions described as +\link[=draw_key]{key glyphs}, to change the display of the layer in the legend. }} \item{width, height}{Amount of vertical and horizontal jitter. The jitter diff --git a/man/geom_linerange.Rd b/man/geom_linerange.Rd index 6136cc80d9..2d8eadcdb5 100644 --- a/man/geom_linerange.Rd +++ b/man/geom_linerange.Rd @@ -73,10 +73,8 @@ geom_pointrange( ) } \arguments{ -\item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}. If specified and -\code{inherit.aes = TRUE} (the default), it is combined with the default mapping -at the top level of the plot. You must supply \code{mapping} if there is no plot -mapping.} +\item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}. If specified and \code{inherit.aes = TRUE} (the default), it is combined with the default mapping at the top level +of the plot. You must supply \code{mapping} if there is no plot mapping.} \item{data}{The data to be displayed in this layer. There are three options: \itemize{ @@ -97,8 +95,8 @@ accepts the following: \itemize{ \item A \code{Stat} ggproto subclass, for example \code{StatCount}. \item A string naming the stat. To give the stat as a string, strip the -function name of the \code{stat_} prefix. For example, to use \code{stat_count()}, give -the stat as \code{"count"}. +function name of the \code{stat_} prefix. For example, to use \code{stat_count()}, +give the stat as \code{"count"}. \item For more information and other ways to specify the stat, see the \link[=layer_stats]{layer stat} documentation. }} @@ -118,28 +116,30 @@ use \code{position_jitter()}, give the position as \code{"jitter"}. \item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These arguments broadly fall into one of 4 categories below. Notably, further arguments to -the \code{position} argument, or aesthetics that are required can \emph{not} be passed -through \code{...}. Unknown arguments that are not part of the 4 categories below -are ignored. +the \code{position} argument, or aesthetics that are required can +\emph{not} be passed through \code{...}. Unknown arguments that are not part of the 4 +categories below are ignored. \itemize{ \item Static aesthetics that are not mapped to a scale, but are at a fixed value and apply to the layer as a whole. For example, \code{colour = "red"} or -\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section that -lists the available options. The 'required' aesthetics cannot be passed on to -the \code{params}. Please note that while passing unmapped aesthetics as vectors -is technically possible, the order and required length is not guaranteed to -be parallel to the input data. +\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section +that lists the available options. The 'required' aesthetics cannot be +passed on to the \code{params}. Please note that while passing unmapped +aesthetics as vectors is technically possible, the order and required +length is not guaranteed to be parallel to the input data. \item When constructing a layer using a \verb{stat_*()} function, the \code{...} argument can be used to pass on parameters -to the \code{geom} part of the layer. An example of this is \code{stat_density(geom = "area", outline.type = "both")}. The geom's documentation lists which -parameters it can accept. +to the \code{geom} part of the layer. An example of this is +\code{stat_density(geom = "area", outline.type = "both")}. The geom's +documentation lists which parameters it can accept. \item Inversely, when constructing a layer using a -\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters to -the \code{stat} part of the layer. An example of this is \code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists which parameters it -can accept. +\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters +to the \code{stat} part of the layer. An example of this is +\code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists +which parameters it can accept. \item The \code{key_glyph} argument of \code{\link[=layer]{layer()}} may also be passed on through -\code{...}. This can be one of the functions described as \link[=draw_key]{key glyphs}, -to change the display of the layer in the legend. +\code{...}. This can be one of the functions described as +\link[=draw_key]{key glyphs}, to change the display of the layer in the legend. }} \item{middle.colour, middle.color, middle.linetype, middle.linewidth}{Default aesthetics for the middle line. Set to \code{NULL} to inherit from the @@ -155,10 +155,7 @@ middle point in \code{geom_pointrange()}.} \item{na.rm}{If \code{FALSE}, the default, missing values are removed with a warning. If \code{TRUE}, missing values are silently removed.} -\item{orientation}{The orientation of the layer. The default (\code{NA}) -automatically determines the orientation from the aesthetic mapping. In the -rare event that this fails it can be given explicitly by setting \code{orientation} -to either \code{"x"} or \code{"y"}. See the \emph{Orientation} section for more detail.} +\item{orientation}{The orientation of the layer. The default (\code{NA}) automatically determines the orientation from the aesthetic mapping. In the rare event that this fails it can be given explicitly by setting \code{orientation} to either \code{"x"}` or \code{"y"}. See the \emph{Orientation} section for more detail.} \item{show.legend}{Logical. Should this layer be included in the legends? \code{NA}, the default, includes if any aesthetics are mapped. \code{FALSE} never includes, and \code{TRUE} diff --git a/man/geom_map.Rd b/man/geom_map.Rd index c4444e8086..ca94ad5d7d 100644 --- a/man/geom_map.Rd +++ b/man/geom_map.Rd @@ -16,10 +16,8 @@ geom_map( ) } \arguments{ -\item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}. If specified and -\code{inherit.aes = TRUE} (the default), it is combined with the default mapping -at the top level of the plot. You must supply \code{mapping} if there is no plot -mapping.} +\item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}. If specified and \code{inherit.aes = TRUE} (the default), it is combined with the default mapping at the top level +of the plot. You must supply \code{mapping} if there is no plot mapping.} \item{data}{The data to be displayed in this layer. There are three options: \itemize{ @@ -40,36 +38,38 @@ accepts the following: \itemize{ \item A \code{Stat} ggproto subclass, for example \code{StatCount}. \item A string naming the stat. To give the stat as a string, strip the -function name of the \code{stat_} prefix. For example, to use \code{stat_count()}, give -the stat as \code{"count"}. +function name of the \code{stat_} prefix. For example, to use \code{stat_count()}, +give the stat as \code{"count"}. \item For more information and other ways to specify the stat, see the \link[=layer_stats]{layer stat} documentation. }} \item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These arguments broadly fall into one of 4 categories below. Notably, further arguments to -the \code{position} argument, or aesthetics that are required can \emph{not} be passed -through \code{...}. Unknown arguments that are not part of the 4 categories below -are ignored. +the \code{position} argument, or aesthetics that are required can +\emph{not} be passed through \code{...}. Unknown arguments that are not part of the 4 +categories below are ignored. \itemize{ \item Static aesthetics that are not mapped to a scale, but are at a fixed value and apply to the layer as a whole. For example, \code{colour = "red"} or -\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section that -lists the available options. The 'required' aesthetics cannot be passed on to -the \code{params}. Please note that while passing unmapped aesthetics as vectors -is technically possible, the order and required length is not guaranteed to -be parallel to the input data. +\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section +that lists the available options. The 'required' aesthetics cannot be +passed on to the \code{params}. Please note that while passing unmapped +aesthetics as vectors is technically possible, the order and required +length is not guaranteed to be parallel to the input data. \item When constructing a layer using a \verb{stat_*()} function, the \code{...} argument can be used to pass on parameters -to the \code{geom} part of the layer. An example of this is \code{stat_density(geom = "area", outline.type = "both")}. The geom's documentation lists which -parameters it can accept. +to the \code{geom} part of the layer. An example of this is +\code{stat_density(geom = "area", outline.type = "both")}. The geom's +documentation lists which parameters it can accept. \item Inversely, when constructing a layer using a -\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters to -the \code{stat} part of the layer. An example of this is \code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists which parameters it -can accept. +\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters +to the \code{stat} part of the layer. An example of this is +\code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists +which parameters it can accept. \item The \code{key_glyph} argument of \code{\link[=layer]{layer()}} may also be passed on through -\code{...}. This can be one of the functions described as \link[=draw_key]{key glyphs}, -to change the display of the layer in the legend. +\code{...}. This can be one of the functions described as +\link[=draw_key]{key glyphs}, to change the display of the layer in the legend. }} \item{map}{Data frame that contains the map coordinates. This will diff --git a/man/geom_path.Rd b/man/geom_path.Rd index 4a9d3af377..dd7d768db6 100644 --- a/man/geom_path.Rd +++ b/man/geom_path.Rd @@ -58,10 +58,8 @@ geom_step( ) } \arguments{ -\item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}. If specified and -\code{inherit.aes = TRUE} (the default), it is combined with the default mapping -at the top level of the plot. You must supply \code{mapping} if there is no plot -mapping.} +\item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}. If specified and \code{inherit.aes = TRUE} (the default), it is combined with the default mapping at the top level +of the plot. You must supply \code{mapping} if there is no plot mapping.} \item{data}{The data to be displayed in this layer. There are three options: \itemize{ @@ -82,8 +80,8 @@ accepts the following: \itemize{ \item A \code{Stat} ggproto subclass, for example \code{StatCount}. \item A string naming the stat. To give the stat as a string, strip the -function name of the \code{stat_} prefix. For example, to use \code{stat_count()}, give -the stat as \code{"count"}. +function name of the \code{stat_} prefix. For example, to use \code{stat_count()}, +give the stat as \code{"count"}. \item For more information and other ways to specify the stat, see the \link[=layer_stats]{layer stat} documentation. }} @@ -103,28 +101,30 @@ use \code{position_jitter()}, give the position as \code{"jitter"}. \item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These arguments broadly fall into one of 4 categories below. Notably, further arguments to -the \code{position} argument, or aesthetics that are required can \emph{not} be passed -through \code{...}. Unknown arguments that are not part of the 4 categories below -are ignored. +the \code{position} argument, or aesthetics that are required can +\emph{not} be passed through \code{...}. Unknown arguments that are not part of the 4 +categories below are ignored. \itemize{ \item Static aesthetics that are not mapped to a scale, but are at a fixed value and apply to the layer as a whole. For example, \code{colour = "red"} or -\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section that -lists the available options. The 'required' aesthetics cannot be passed on to -the \code{params}. Please note that while passing unmapped aesthetics as vectors -is technically possible, the order and required length is not guaranteed to -be parallel to the input data. +\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section +that lists the available options. The 'required' aesthetics cannot be +passed on to the \code{params}. Please note that while passing unmapped +aesthetics as vectors is technically possible, the order and required +length is not guaranteed to be parallel to the input data. \item When constructing a layer using a \verb{stat_*()} function, the \code{...} argument can be used to pass on parameters -to the \code{geom} part of the layer. An example of this is \code{stat_density(geom = "area", outline.type = "both")}. The geom's documentation lists which -parameters it can accept. +to the \code{geom} part of the layer. An example of this is +\code{stat_density(geom = "area", outline.type = "both")}. The geom's +documentation lists which parameters it can accept. \item Inversely, when constructing a layer using a -\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters to -the \code{stat} part of the layer. An example of this is \code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists which parameters it -can accept. +\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters +to the \code{stat} part of the layer. An example of this is +\code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists +which parameters it can accept. \item The \code{key_glyph} argument of \code{\link[=layer]{layer()}} may also be passed on through -\code{...}. This can be one of the functions described as \link[=draw_key]{key glyphs}, -to change the display of the layer in the legend. +\code{...}. This can be one of the functions described as +\link[=draw_key]{key glyphs}, to change the display of the layer in the legend. }} \item{arrow}{Arrow specification, as created by \code{\link[grid:arrow]{grid::arrow()}}.} @@ -153,10 +153,7 @@ them. This is most useful for helper functions that define both data and aesthetics and shouldn't inherit behaviour from the default plot specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} -\item{orientation}{The orientation of the layer. The default (\code{NA}) -automatically determines the orientation from the aesthetic mapping. In the -rare event that this fails it can be given explicitly by setting \code{orientation} -to either \code{"x"} or \code{"y"}. See the \emph{Orientation} section for more detail.} +\item{orientation}{The orientation of the layer. The default (\code{NA}) automatically determines the orientation from the aesthetic mapping. In the rare event that this fails it can be given explicitly by setting \code{orientation} to either \code{"x"}` or \code{"y"}. See the \emph{Orientation} section for more detail.} \item{direction}{direction of stairs: 'vh' for vertical then horizontal, 'hv' for horizontal then vertical, or 'mid' for step half-way between diff --git a/man/geom_point.Rd b/man/geom_point.Rd index 6cb853b615..7175de4249 100644 --- a/man/geom_point.Rd +++ b/man/geom_point.Rd @@ -16,10 +16,8 @@ geom_point( ) } \arguments{ -\item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}. If specified and -\code{inherit.aes = TRUE} (the default), it is combined with the default mapping -at the top level of the plot. You must supply \code{mapping} if there is no plot -mapping.} +\item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}. If specified and \code{inherit.aes = TRUE} (the default), it is combined with the default mapping at the top level +of the plot. You must supply \code{mapping} if there is no plot mapping.} \item{data}{The data to be displayed in this layer. There are three options: \itemize{ @@ -40,8 +38,8 @@ accepts the following: \itemize{ \item A \code{Stat} ggproto subclass, for example \code{StatCount}. \item A string naming the stat. To give the stat as a string, strip the -function name of the \code{stat_} prefix. For example, to use \code{stat_count()}, give -the stat as \code{"count"}. +function name of the \code{stat_} prefix. For example, to use \code{stat_count()}, +give the stat as \code{"count"}. \item For more information and other ways to specify the stat, see the \link[=layer_stats]{layer stat} documentation. }} @@ -61,28 +59,30 @@ use \code{position_jitter()}, give the position as \code{"jitter"}. \item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These arguments broadly fall into one of 4 categories below. Notably, further arguments to -the \code{position} argument, or aesthetics that are required can \emph{not} be passed -through \code{...}. Unknown arguments that are not part of the 4 categories below -are ignored. +the \code{position} argument, or aesthetics that are required can +\emph{not} be passed through \code{...}. Unknown arguments that are not part of the 4 +categories below are ignored. \itemize{ \item Static aesthetics that are not mapped to a scale, but are at a fixed value and apply to the layer as a whole. For example, \code{colour = "red"} or -\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section that -lists the available options. The 'required' aesthetics cannot be passed on to -the \code{params}. Please note that while passing unmapped aesthetics as vectors -is technically possible, the order and required length is not guaranteed to -be parallel to the input data. +\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section +that lists the available options. The 'required' aesthetics cannot be +passed on to the \code{params}. Please note that while passing unmapped +aesthetics as vectors is technically possible, the order and required +length is not guaranteed to be parallel to the input data. \item When constructing a layer using a \verb{stat_*()} function, the \code{...} argument can be used to pass on parameters -to the \code{geom} part of the layer. An example of this is \code{stat_density(geom = "area", outline.type = "both")}. The geom's documentation lists which -parameters it can accept. +to the \code{geom} part of the layer. An example of this is +\code{stat_density(geom = "area", outline.type = "both")}. The geom's +documentation lists which parameters it can accept. \item Inversely, when constructing a layer using a -\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters to -the \code{stat} part of the layer. An example of this is \code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists which parameters it -can accept. +\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters +to the \code{stat} part of the layer. An example of this is +\code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists +which parameters it can accept. \item The \code{key_glyph} argument of \code{\link[=layer]{layer()}} may also be passed on through -\code{...}. This can be one of the functions described as \link[=draw_key]{key glyphs}, -to change the display of the layer in the legend. +\code{...}. This can be one of the functions described as +\link[=draw_key]{key glyphs}, to change the display of the layer in the legend. }} \item{na.rm}{If \code{FALSE}, the default, missing values are removed with a warning. If diff --git a/man/geom_polygon.Rd b/man/geom_polygon.Rd index 368d0bcf76..92ab721337 100644 --- a/man/geom_polygon.Rd +++ b/man/geom_polygon.Rd @@ -20,10 +20,8 @@ geom_polygon( ) } \arguments{ -\item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}. If specified and -\code{inherit.aes = TRUE} (the default), it is combined with the default mapping -at the top level of the plot. You must supply \code{mapping} if there is no plot -mapping.} +\item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}. If specified and \code{inherit.aes = TRUE} (the default), it is combined with the default mapping at the top level +of the plot. You must supply \code{mapping} if there is no plot mapping.} \item{data}{The data to be displayed in this layer. There are three options: \itemize{ @@ -44,8 +42,8 @@ accepts the following: \itemize{ \item A \code{Stat} ggproto subclass, for example \code{StatCount}. \item A string naming the stat. To give the stat as a string, strip the -function name of the \code{stat_} prefix. For example, to use \code{stat_count()}, give -the stat as \code{"count"}. +function name of the \code{stat_} prefix. For example, to use \code{stat_count()}, +give the stat as \code{"count"}. \item For more information and other ways to specify the stat, see the \link[=layer_stats]{layer stat} documentation. }} @@ -65,28 +63,30 @@ use \code{position_jitter()}, give the position as \code{"jitter"}. \item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These arguments broadly fall into one of 4 categories below. Notably, further arguments to -the \code{position} argument, or aesthetics that are required can \emph{not} be passed -through \code{...}. Unknown arguments that are not part of the 4 categories below -are ignored. +the \code{position} argument, or aesthetics that are required can +\emph{not} be passed through \code{...}. Unknown arguments that are not part of the 4 +categories below are ignored. \itemize{ \item Static aesthetics that are not mapped to a scale, but are at a fixed value and apply to the layer as a whole. For example, \code{colour = "red"} or -\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section that -lists the available options. The 'required' aesthetics cannot be passed on to -the \code{params}. Please note that while passing unmapped aesthetics as vectors -is technically possible, the order and required length is not guaranteed to -be parallel to the input data. +\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section +that lists the available options. The 'required' aesthetics cannot be +passed on to the \code{params}. Please note that while passing unmapped +aesthetics as vectors is technically possible, the order and required +length is not guaranteed to be parallel to the input data. \item When constructing a layer using a \verb{stat_*()} function, the \code{...} argument can be used to pass on parameters -to the \code{geom} part of the layer. An example of this is \code{stat_density(geom = "area", outline.type = "both")}. The geom's documentation lists which -parameters it can accept. +to the \code{geom} part of the layer. An example of this is +\code{stat_density(geom = "area", outline.type = "both")}. The geom's +documentation lists which parameters it can accept. \item Inversely, when constructing a layer using a -\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters to -the \code{stat} part of the layer. An example of this is \code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists which parameters it -can accept. +\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters +to the \code{stat} part of the layer. An example of this is +\code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists +which parameters it can accept. \item The \code{key_glyph} argument of \code{\link[=layer]{layer()}} may also be passed on through -\code{...}. This can be one of the functions described as \link[=draw_key]{key glyphs}, -to change the display of the layer in the legend. +\code{...}. This can be one of the functions described as +\link[=draw_key]{key glyphs}, to change the display of the layer in the legend. }} \item{rule}{Either \code{"evenodd"} or \code{"winding"}. If polygons with holes are diff --git a/man/geom_qq.Rd b/man/geom_qq.Rd index 3631d32229..5eea2f4138 100644 --- a/man/geom_qq.Rd +++ b/man/geom_qq.Rd @@ -64,10 +64,8 @@ stat_qq( ) } \arguments{ -\item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}. If specified and -\code{inherit.aes = TRUE} (the default), it is combined with the default mapping -at the top level of the plot. You must supply \code{mapping} if there is no plot -mapping.} +\item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}. If specified and \code{inherit.aes = TRUE} (the default), it is combined with the default mapping at the top level +of the plot. You must supply \code{mapping} if there is no plot mapping.} \item{data}{The data to be displayed in this layer. There are three options: \itemize{ @@ -88,8 +86,8 @@ accepts the following: \itemize{ \item A \code{Geom} ggproto subclass, for example \code{GeomPoint}. \item A string naming the geom. To give the geom as a string, strip the -function name of the \code{geom_} prefix. For example, to use \code{geom_point()}, give -the geom as \code{"point"}. +function name of the \code{geom_} prefix. For example, to use \code{geom_point()}, +give the geom as \code{"point"}. \item For more information and other ways to specify the geom, see the \link[=layer_geoms]{layer geom} documentation. }} @@ -109,28 +107,30 @@ use \code{position_jitter()}, give the position as \code{"jitter"}. \item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These arguments broadly fall into one of 4 categories below. Notably, further arguments to -the \code{position} argument, or aesthetics that are required can \emph{not} be passed -through \code{...}. Unknown arguments that are not part of the 4 categories below -are ignored. +the \code{position} argument, or aesthetics that are required can +\emph{not} be passed through \code{...}. Unknown arguments that are not part of the 4 +categories below are ignored. \itemize{ \item Static aesthetics that are not mapped to a scale, but are at a fixed value and apply to the layer as a whole. For example, \code{colour = "red"} or -\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section that -lists the available options. The 'required' aesthetics cannot be passed on to -the \code{params}. Please note that while passing unmapped aesthetics as vectors -is technically possible, the order and required length is not guaranteed to -be parallel to the input data. +\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section +that lists the available options. The 'required' aesthetics cannot be +passed on to the \code{params}. Please note that while passing unmapped +aesthetics as vectors is technically possible, the order and required +length is not guaranteed to be parallel to the input data. \item When constructing a layer using a \verb{stat_*()} function, the \code{...} argument can be used to pass on parameters -to the \code{geom} part of the layer. An example of this is \code{stat_density(geom = "area", outline.type = "both")}. The geom's documentation lists which -parameters it can accept. +to the \code{geom} part of the layer. An example of this is +\code{stat_density(geom = "area", outline.type = "both")}. The geom's +documentation lists which parameters it can accept. \item Inversely, when constructing a layer using a -\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters to -the \code{stat} part of the layer. An example of this is \code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists which parameters it -can accept. +\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters +to the \code{stat} part of the layer. An example of this is +\code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists +which parameters it can accept. \item The \code{key_glyph} argument of \code{\link[=layer]{layer()}} may also be passed on through -\code{...}. This can be one of the functions described as \link[=draw_key]{key glyphs}, -to change the display of the layer in the legend. +\code{...}. This can be one of the functions described as +\link[=draw_key]{key glyphs}, to change the display of the layer in the legend. }} \item{distribution}{Distribution function to use, if x not specified} diff --git a/man/geom_quantile.Rd b/man/geom_quantile.Rd index 916db030e5..c110f0f2b2 100644 --- a/man/geom_quantile.Rd +++ b/man/geom_quantile.Rd @@ -37,10 +37,8 @@ stat_quantile( ) } \arguments{ -\item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}. If specified and -\code{inherit.aes = TRUE} (the default), it is combined with the default mapping -at the top level of the plot. You must supply \code{mapping} if there is no plot -mapping.} +\item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}. If specified and \code{inherit.aes = TRUE} (the default), it is combined with the default mapping at the top level +of the plot. You must supply \code{mapping} if there is no plot mapping.} \item{data}{The data to be displayed in this layer. There are three options: \itemize{ @@ -69,28 +67,30 @@ use \code{position_jitter()}, give the position as \code{"jitter"}. \item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These arguments broadly fall into one of 4 categories below. Notably, further arguments to -the \code{position} argument, or aesthetics that are required can \emph{not} be passed -through \code{...}. Unknown arguments that are not part of the 4 categories below -are ignored. +the \code{position} argument, or aesthetics that are required can +\emph{not} be passed through \code{...}. Unknown arguments that are not part of the 4 +categories below are ignored. \itemize{ \item Static aesthetics that are not mapped to a scale, but are at a fixed value and apply to the layer as a whole. For example, \code{colour = "red"} or -\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section that -lists the available options. The 'required' aesthetics cannot be passed on to -the \code{params}. Please note that while passing unmapped aesthetics as vectors -is technically possible, the order and required length is not guaranteed to -be parallel to the input data. +\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section +that lists the available options. The 'required' aesthetics cannot be +passed on to the \code{params}. Please note that while passing unmapped +aesthetics as vectors is technically possible, the order and required +length is not guaranteed to be parallel to the input data. \item When constructing a layer using a \verb{stat_*()} function, the \code{...} argument can be used to pass on parameters -to the \code{geom} part of the layer. An example of this is \code{stat_density(geom = "area", outline.type = "both")}. The geom's documentation lists which -parameters it can accept. +to the \code{geom} part of the layer. An example of this is +\code{stat_density(geom = "area", outline.type = "both")}. The geom's +documentation lists which parameters it can accept. \item Inversely, when constructing a layer using a -\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters to -the \code{stat} part of the layer. An example of this is \code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists which parameters it -can accept. +\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters +to the \code{stat} part of the layer. An example of this is +\code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists +which parameters it can accept. \item The \code{key_glyph} argument of \code{\link[=layer]{layer()}} may also be passed on through -\code{...}. This can be one of the functions described as \link[=draw_key]{key glyphs}, -to change the display of the layer in the legend. +\code{...}. This can be one of the functions described as +\link[=draw_key]{key glyphs}, to change the display of the layer in the legend. }} \item{arrow}{Arrow specification, as created by \code{\link[grid:arrow]{grid::arrow()}}.} diff --git a/man/geom_ribbon.Rd b/man/geom_ribbon.Rd index e7ced5f4b6..de2d0ccbc7 100644 --- a/man/geom_ribbon.Rd +++ b/man/geom_ribbon.Rd @@ -50,10 +50,8 @@ stat_align( ) } \arguments{ -\item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}. If specified and -\code{inherit.aes = TRUE} (the default), it is combined with the default mapping -at the top level of the plot. You must supply \code{mapping} if there is no plot -mapping.} +\item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}. If specified and \code{inherit.aes = TRUE} (the default), it is combined with the default mapping at the top level +of the plot. You must supply \code{mapping} if there is no plot mapping.} \item{data}{The data to be displayed in this layer. There are three options: \itemize{ @@ -74,8 +72,8 @@ accepts the following: \itemize{ \item A \code{Stat} ggproto subclass, for example \code{StatCount}. \item A string naming the stat. To give the stat as a string, strip the -function name of the \code{stat_} prefix. For example, to use \code{stat_count()}, give -the stat as \code{"count"}. +function name of the \code{stat_} prefix. For example, to use \code{stat_count()}, +give the stat as \code{"count"}. \item For more information and other ways to specify the stat, see the \link[=layer_stats]{layer stat} documentation. }} @@ -95,34 +93,33 @@ use \code{position_jitter()}, give the position as \code{"jitter"}. \item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These arguments broadly fall into one of 4 categories below. Notably, further arguments to -the \code{position} argument, or aesthetics that are required can \emph{not} be passed -through \code{...}. Unknown arguments that are not part of the 4 categories below -are ignored. +the \code{position} argument, or aesthetics that are required can +\emph{not} be passed through \code{...}. Unknown arguments that are not part of the 4 +categories below are ignored. \itemize{ \item Static aesthetics that are not mapped to a scale, but are at a fixed value and apply to the layer as a whole. For example, \code{colour = "red"} or -\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section that -lists the available options. The 'required' aesthetics cannot be passed on to -the \code{params}. Please note that while passing unmapped aesthetics as vectors -is technically possible, the order and required length is not guaranteed to -be parallel to the input data. +\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section +that lists the available options. The 'required' aesthetics cannot be +passed on to the \code{params}. Please note that while passing unmapped +aesthetics as vectors is technically possible, the order and required +length is not guaranteed to be parallel to the input data. \item When constructing a layer using a \verb{stat_*()} function, the \code{...} argument can be used to pass on parameters -to the \code{geom} part of the layer. An example of this is \code{stat_density(geom = "area", outline.type = "both")}. The geom's documentation lists which -parameters it can accept. +to the \code{geom} part of the layer. An example of this is +\code{stat_density(geom = "area", outline.type = "both")}. The geom's +documentation lists which parameters it can accept. \item Inversely, when constructing a layer using a -\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters to -the \code{stat} part of the layer. An example of this is \code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists which parameters it -can accept. +\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters +to the \code{stat} part of the layer. An example of this is +\code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists +which parameters it can accept. \item The \code{key_glyph} argument of \code{\link[=layer]{layer()}} may also be passed on through -\code{...}. This can be one of the functions described as \link[=draw_key]{key glyphs}, -to change the display of the layer in the legend. +\code{...}. This can be one of the functions described as +\link[=draw_key]{key glyphs}, to change the display of the layer in the legend. }} -\item{orientation}{The orientation of the layer. The default (\code{NA}) -automatically determines the orientation from the aesthetic mapping. In the -rare event that this fails it can be given explicitly by setting \code{orientation} -to either \code{"x"} or \code{"y"}. See the \emph{Orientation} section for more detail.} +\item{orientation}{The orientation of the layer. The default (\code{NA}) automatically determines the orientation from the aesthetic mapping. In the rare event that this fails it can be given explicitly by setting \code{orientation} to either \code{"x"}` or \code{"y"}. See the \emph{Orientation} section for more detail.} \item{lineend}{Line end style (round, butt, square).} @@ -156,8 +153,8 @@ accepts the following: \itemize{ \item A \code{Geom} ggproto subclass, for example \code{GeomPoint}. \item A string naming the geom. To give the geom as a string, strip the -function name of the \code{geom_} prefix. For example, to use \code{geom_point()}, give -the geom as \code{"point"}. +function name of the \code{geom_} prefix. For example, to use \code{geom_point()}, +give the geom as \code{"point"}. \item For more information and other ways to specify the geom, see the \link[=layer_geoms]{layer geom} documentation. }} diff --git a/man/geom_rug.Rd b/man/geom_rug.Rd index 7bd960f5bb..01e0c7ed92 100644 --- a/man/geom_rug.Rd +++ b/man/geom_rug.Rd @@ -20,10 +20,8 @@ geom_rug( ) } \arguments{ -\item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}. If specified and -\code{inherit.aes = TRUE} (the default), it is combined with the default mapping -at the top level of the plot. You must supply \code{mapping} if there is no plot -mapping.} +\item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}. If specified and \code{inherit.aes = TRUE} (the default), it is combined with the default mapping at the top level +of the plot. You must supply \code{mapping} if there is no plot mapping.} \item{data}{The data to be displayed in this layer. There are three options: \itemize{ @@ -44,8 +42,8 @@ accepts the following: \itemize{ \item A \code{Stat} ggproto subclass, for example \code{StatCount}. \item A string naming the stat. To give the stat as a string, strip the -function name of the \code{stat_} prefix. For example, to use \code{stat_count()}, give -the stat as \code{"count"}. +function name of the \code{stat_} prefix. For example, to use \code{stat_count()}, +give the stat as \code{"count"}. \item For more information and other ways to specify the stat, see the \link[=layer_stats]{layer stat} documentation. }} @@ -65,28 +63,30 @@ use \code{position_jitter()}, give the position as \code{"jitter"}. \item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These arguments broadly fall into one of 4 categories below. Notably, further arguments to -the \code{position} argument, or aesthetics that are required can \emph{not} be passed -through \code{...}. Unknown arguments that are not part of the 4 categories below -are ignored. +the \code{position} argument, or aesthetics that are required can +\emph{not} be passed through \code{...}. Unknown arguments that are not part of the 4 +categories below are ignored. \itemize{ \item Static aesthetics that are not mapped to a scale, but are at a fixed value and apply to the layer as a whole. For example, \code{colour = "red"} or -\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section that -lists the available options. The 'required' aesthetics cannot be passed on to -the \code{params}. Please note that while passing unmapped aesthetics as vectors -is technically possible, the order and required length is not guaranteed to -be parallel to the input data. +\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section +that lists the available options. The 'required' aesthetics cannot be +passed on to the \code{params}. Please note that while passing unmapped +aesthetics as vectors is technically possible, the order and required +length is not guaranteed to be parallel to the input data. \item When constructing a layer using a \verb{stat_*()} function, the \code{...} argument can be used to pass on parameters -to the \code{geom} part of the layer. An example of this is \code{stat_density(geom = "area", outline.type = "both")}. The geom's documentation lists which -parameters it can accept. +to the \code{geom} part of the layer. An example of this is +\code{stat_density(geom = "area", outline.type = "both")}. The geom's +documentation lists which parameters it can accept. \item Inversely, when constructing a layer using a -\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters to -the \code{stat} part of the layer. An example of this is \code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists which parameters it -can accept. +\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters +to the \code{stat} part of the layer. An example of this is +\code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists +which parameters it can accept. \item The \code{key_glyph} argument of \code{\link[=layer]{layer()}} may also be passed on through -\code{...}. This can be one of the functions described as \link[=draw_key]{key glyphs}, -to change the display of the layer in the legend. +\code{...}. This can be one of the functions described as +\link[=draw_key]{key glyphs}, to change the display of the layer in the legend. }} \item{lineend}{Line end style (round, butt, square).} diff --git a/man/geom_segment.Rd b/man/geom_segment.Rd index a89594e36f..903161c1ca 100644 --- a/man/geom_segment.Rd +++ b/man/geom_segment.Rd @@ -38,10 +38,8 @@ geom_curve( ) } \arguments{ -\item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}. If specified and -\code{inherit.aes = TRUE} (the default), it is combined with the default mapping -at the top level of the plot. You must supply \code{mapping} if there is no plot -mapping.} +\item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}. If specified and \code{inherit.aes = TRUE} (the default), it is combined with the default mapping at the top level +of the plot. You must supply \code{mapping} if there is no plot mapping.} \item{data}{The data to be displayed in this layer. There are three options: \itemize{ @@ -62,8 +60,8 @@ accepts the following: \itemize{ \item A \code{Stat} ggproto subclass, for example \code{StatCount}. \item A string naming the stat. To give the stat as a string, strip the -function name of the \code{stat_} prefix. For example, to use \code{stat_count()}, give -the stat as \code{"count"}. +function name of the \code{stat_} prefix. For example, to use \code{stat_count()}, +give the stat as \code{"count"}. \item For more information and other ways to specify the stat, see the \link[=layer_stats]{layer stat} documentation. }} @@ -83,28 +81,30 @@ use \code{position_jitter()}, give the position as \code{"jitter"}. \item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These arguments broadly fall into one of 4 categories below. Notably, further arguments to -the \code{position} argument, or aesthetics that are required can \emph{not} be passed -through \code{...}. Unknown arguments that are not part of the 4 categories below -are ignored. +the \code{position} argument, or aesthetics that are required can +\emph{not} be passed through \code{...}. Unknown arguments that are not part of the 4 +categories below are ignored. \itemize{ \item Static aesthetics that are not mapped to a scale, but are at a fixed value and apply to the layer as a whole. For example, \code{colour = "red"} or -\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section that -lists the available options. The 'required' aesthetics cannot be passed on to -the \code{params}. Please note that while passing unmapped aesthetics as vectors -is technically possible, the order and required length is not guaranteed to -be parallel to the input data. +\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section +that lists the available options. The 'required' aesthetics cannot be +passed on to the \code{params}. Please note that while passing unmapped +aesthetics as vectors is technically possible, the order and required +length is not guaranteed to be parallel to the input data. \item When constructing a layer using a \verb{stat_*()} function, the \code{...} argument can be used to pass on parameters -to the \code{geom} part of the layer. An example of this is \code{stat_density(geom = "area", outline.type = "both")}. The geom's documentation lists which -parameters it can accept. +to the \code{geom} part of the layer. An example of this is +\code{stat_density(geom = "area", outline.type = "both")}. The geom's +documentation lists which parameters it can accept. \item Inversely, when constructing a layer using a -\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters to -the \code{stat} part of the layer. An example of this is \code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists which parameters it -can accept. +\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters +to the \code{stat} part of the layer. An example of this is +\code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists +which parameters it can accept. \item The \code{key_glyph} argument of \code{\link[=layer]{layer()}} may also be passed on through -\code{...}. This can be one of the functions described as \link[=draw_key]{key glyphs}, -to change the display of the layer in the legend. +\code{...}. This can be one of the functions described as +\link[=draw_key]{key glyphs}, to change the display of the layer in the legend. }} \item{arrow}{specification for arrow heads, as created by \code{\link[grid:arrow]{grid::arrow()}}.} diff --git a/man/geom_smooth.Rd b/man/geom_smooth.Rd index 0359bd7a3a..53b33760f8 100644 --- a/man/geom_smooth.Rd +++ b/man/geom_smooth.Rd @@ -42,10 +42,8 @@ stat_smooth( ) } \arguments{ -\item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}. If specified and -\code{inherit.aes = TRUE} (the default), it is combined with the default mapping -at the top level of the plot. You must supply \code{mapping} if there is no plot -mapping.} +\item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}. If specified and \code{inherit.aes = TRUE} (the default), it is combined with the default mapping at the top level +of the plot. You must supply \code{mapping} if there is no plot mapping.} \item{data}{The data to be displayed in this layer. There are three options: \itemize{ @@ -74,28 +72,30 @@ use \code{position_jitter()}, give the position as \code{"jitter"}. \item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These arguments broadly fall into one of 4 categories below. Notably, further arguments to -the \code{position} argument, or aesthetics that are required can \emph{not} be passed -through \code{...}. Unknown arguments that are not part of the 4 categories below -are ignored. +the \code{position} argument, or aesthetics that are required can +\emph{not} be passed through \code{...}. Unknown arguments that are not part of the 4 +categories below are ignored. \itemize{ \item Static aesthetics that are not mapped to a scale, but are at a fixed value and apply to the layer as a whole. For example, \code{colour = "red"} or -\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section that -lists the available options. The 'required' aesthetics cannot be passed on to -the \code{params}. Please note that while passing unmapped aesthetics as vectors -is technically possible, the order and required length is not guaranteed to -be parallel to the input data. +\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section +that lists the available options. The 'required' aesthetics cannot be +passed on to the \code{params}. Please note that while passing unmapped +aesthetics as vectors is technically possible, the order and required +length is not guaranteed to be parallel to the input data. \item When constructing a layer using a \verb{stat_*()} function, the \code{...} argument can be used to pass on parameters -to the \code{geom} part of the layer. An example of this is \code{stat_density(geom = "area", outline.type = "both")}. The geom's documentation lists which -parameters it can accept. +to the \code{geom} part of the layer. An example of this is +\code{stat_density(geom = "area", outline.type = "both")}. The geom's +documentation lists which parameters it can accept. \item Inversely, when constructing a layer using a -\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters to -the \code{stat} part of the layer. An example of this is \code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists which parameters it -can accept. +\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters +to the \code{stat} part of the layer. An example of this is +\code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists +which parameters it can accept. \item The \code{key_glyph} argument of \code{\link[=layer]{layer()}} may also be passed on through -\code{...}. This can be one of the functions described as \link[=draw_key]{key glyphs}, -to change the display of the layer in the legend. +\code{...}. This can be one of the functions described as +\link[=draw_key]{key glyphs}, to change the display of the layer in the legend. }} \item{method}{Smoothing method (function) to use, accepts either @@ -126,10 +126,7 @@ observations and \code{formula = y ~ s(x, bs = "cs")} otherwise.} \item{na.rm}{If \code{FALSE}, the default, missing values are removed with a warning. If \code{TRUE}, missing values are silently removed.} -\item{orientation}{The orientation of the layer. The default (\code{NA}) -automatically determines the orientation from the aesthetic mapping. In the -rare event that this fails it can be given explicitly by setting \code{orientation} -to either \code{"x"} or \code{"y"}. See the \emph{Orientation} section for more detail.} +\item{orientation}{The orientation of the layer. The default (\code{NA}) automatically determines the orientation from the aesthetic mapping. In the rare event that this fails it can be given explicitly by setting \code{orientation} to either \code{"x"}` or \code{"y"}. See the \emph{Orientation} section for more detail.} \item{show.legend}{Logical. Should this layer be included in the legends? \code{NA}, the default, includes if any aesthetics are mapped. \code{FALSE} never includes, and \code{TRUE} diff --git a/man/geom_spoke.Rd b/man/geom_spoke.Rd index d36a9f84f8..5cc9bec268 100644 --- a/man/geom_spoke.Rd +++ b/man/geom_spoke.Rd @@ -21,10 +21,8 @@ geom_spoke( ) } \arguments{ -\item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}. If specified and -\code{inherit.aes = TRUE} (the default), it is combined with the default mapping -at the top level of the plot. You must supply \code{mapping} if there is no plot -mapping.} +\item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}. If specified and \code{inherit.aes = TRUE} (the default), it is combined with the default mapping at the top level +of the plot. You must supply \code{mapping} if there is no plot mapping.} \item{data}{The data to be displayed in this layer. There are three options: \itemize{ @@ -45,8 +43,8 @@ accepts the following: \itemize{ \item A \code{Stat} ggproto subclass, for example \code{StatCount}. \item A string naming the stat. To give the stat as a string, strip the -function name of the \code{stat_} prefix. For example, to use \code{stat_count()}, give -the stat as \code{"count"}. +function name of the \code{stat_} prefix. For example, to use \code{stat_count()}, +give the stat as \code{"count"}. \item For more information and other ways to specify the stat, see the \link[=layer_stats]{layer stat} documentation. }} @@ -66,28 +64,30 @@ use \code{position_jitter()}, give the position as \code{"jitter"}. \item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These arguments broadly fall into one of 4 categories below. Notably, further arguments to -the \code{position} argument, or aesthetics that are required can \emph{not} be passed -through \code{...}. Unknown arguments that are not part of the 4 categories below -are ignored. +the \code{position} argument, or aesthetics that are required can +\emph{not} be passed through \code{...}. Unknown arguments that are not part of the 4 +categories below are ignored. \itemize{ \item Static aesthetics that are not mapped to a scale, but are at a fixed value and apply to the layer as a whole. For example, \code{colour = "red"} or -\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section that -lists the available options. The 'required' aesthetics cannot be passed on to -the \code{params}. Please note that while passing unmapped aesthetics as vectors -is technically possible, the order and required length is not guaranteed to -be parallel to the input data. +\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section +that lists the available options. The 'required' aesthetics cannot be +passed on to the \code{params}. Please note that while passing unmapped +aesthetics as vectors is technically possible, the order and required +length is not guaranteed to be parallel to the input data. \item When constructing a layer using a \verb{stat_*()} function, the \code{...} argument can be used to pass on parameters -to the \code{geom} part of the layer. An example of this is \code{stat_density(geom = "area", outline.type = "both")}. The geom's documentation lists which -parameters it can accept. +to the \code{geom} part of the layer. An example of this is +\code{stat_density(geom = "area", outline.type = "both")}. The geom's +documentation lists which parameters it can accept. \item Inversely, when constructing a layer using a -\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters to -the \code{stat} part of the layer. An example of this is \code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists which parameters it -can accept. +\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters +to the \code{stat} part of the layer. An example of this is +\code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists +which parameters it can accept. \item The \code{key_glyph} argument of \code{\link[=layer]{layer()}} may also be passed on through -\code{...}. This can be one of the functions described as \link[=draw_key]{key glyphs}, -to change the display of the layer in the legend. +\code{...}. This can be one of the functions described as +\link[=draw_key]{key glyphs}, to change the display of the layer in the legend. }} \item{arrow}{specification for arrow heads, as created by \code{\link[grid:arrow]{grid::arrow()}}.} diff --git a/man/geom_text.Rd b/man/geom_text.Rd index c801be3fbc..069aba43d3 100644 --- a/man/geom_text.Rd +++ b/man/geom_text.Rd @@ -40,10 +40,8 @@ geom_text( ) } \arguments{ -\item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}. If specified and -\code{inherit.aes = TRUE} (the default), it is combined with the default mapping -at the top level of the plot. You must supply \code{mapping} if there is no plot -mapping.} +\item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}. If specified and \code{inherit.aes = TRUE} (the default), it is combined with the default mapping at the top level +of the plot. You must supply \code{mapping} if there is no plot mapping.} \item{data}{The data to be displayed in this layer. There are three options: \itemize{ @@ -64,8 +62,8 @@ accepts the following: \itemize{ \item A \code{Stat} ggproto subclass, for example \code{StatCount}. \item A string naming the stat. To give the stat as a string, strip the -function name of the \code{stat_} prefix. For example, to use \code{stat_count()}, give -the stat as \code{"count"}. +function name of the \code{stat_} prefix. For example, to use \code{stat_count()}, +give the stat as \code{"count"}. \item For more information and other ways to specify the stat, see the \link[=layer_stats]{layer stat} documentation. }} @@ -85,28 +83,30 @@ use \code{position_jitter()}, give the position as \code{"jitter"}. \item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These arguments broadly fall into one of 4 categories below. Notably, further arguments to -the \code{position} argument, or aesthetics that are required can \emph{not} be passed -through \code{...}. Unknown arguments that are not part of the 4 categories below -are ignored. +the \code{position} argument, or aesthetics that are required can +\emph{not} be passed through \code{...}. Unknown arguments that are not part of the 4 +categories below are ignored. \itemize{ \item Static aesthetics that are not mapped to a scale, but are at a fixed value and apply to the layer as a whole. For example, \code{colour = "red"} or -\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section that -lists the available options. The 'required' aesthetics cannot be passed on to -the \code{params}. Please note that while passing unmapped aesthetics as vectors -is technically possible, the order and required length is not guaranteed to -be parallel to the input data. +\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section +that lists the available options. The 'required' aesthetics cannot be +passed on to the \code{params}. Please note that while passing unmapped +aesthetics as vectors is technically possible, the order and required +length is not guaranteed to be parallel to the input data. \item When constructing a layer using a \verb{stat_*()} function, the \code{...} argument can be used to pass on parameters -to the \code{geom} part of the layer. An example of this is \code{stat_density(geom = "area", outline.type = "both")}. The geom's documentation lists which -parameters it can accept. +to the \code{geom} part of the layer. An example of this is +\code{stat_density(geom = "area", outline.type = "both")}. The geom's +documentation lists which parameters it can accept. \item Inversely, when constructing a layer using a -\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters to -the \code{stat} part of the layer. An example of this is \code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists which parameters it -can accept. +\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters +to the \code{stat} part of the layer. An example of this is +\code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists +which parameters it can accept. \item The \code{key_glyph} argument of \code{\link[=layer]{layer()}} may also be passed on through -\code{...}. This can be one of the functions described as \link[=draw_key]{key glyphs}, -to change the display of the layer in the legend. +\code{...}. This can be one of the functions described as +\link[=draw_key]{key glyphs}, to change the display of the layer in the legend. }} \item{parse}{If \code{TRUE}, the labels will be parsed into expressions and diff --git a/man/geom_tile.Rd b/man/geom_tile.Rd index b6621f444f..e87aa0ab75 100644 --- a/man/geom_tile.Rd +++ b/man/geom_tile.Rd @@ -47,10 +47,8 @@ geom_tile( ) } \arguments{ -\item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}. If specified and -\code{inherit.aes = TRUE} (the default), it is combined with the default mapping -at the top level of the plot. You must supply \code{mapping} if there is no plot -mapping.} +\item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}. If specified and \code{inherit.aes = TRUE} (the default), it is combined with the default mapping at the top level +of the plot. You must supply \code{mapping} if there is no plot mapping.} \item{data}{The data to be displayed in this layer. There are three options: \itemize{ @@ -71,8 +69,8 @@ accepts the following: \itemize{ \item A \code{Stat} ggproto subclass, for example \code{StatCount}. \item A string naming the stat. To give the stat as a string, strip the -function name of the \code{stat_} prefix. For example, to use \code{stat_count()}, give -the stat as \code{"count"}. +function name of the \code{stat_} prefix. For example, to use \code{stat_count()}, +give the stat as \code{"count"}. \item For more information and other ways to specify the stat, see the \link[=layer_stats]{layer stat} documentation. }} @@ -92,28 +90,30 @@ use \code{position_jitter()}, give the position as \code{"jitter"}. \item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These arguments broadly fall into one of 4 categories below. Notably, further arguments to -the \code{position} argument, or aesthetics that are required can \emph{not} be passed -through \code{...}. Unknown arguments that are not part of the 4 categories below -are ignored. +the \code{position} argument, or aesthetics that are required can +\emph{not} be passed through \code{...}. Unknown arguments that are not part of the 4 +categories below are ignored. \itemize{ \item Static aesthetics that are not mapped to a scale, but are at a fixed value and apply to the layer as a whole. For example, \code{colour = "red"} or -\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section that -lists the available options. The 'required' aesthetics cannot be passed on to -the \code{params}. Please note that while passing unmapped aesthetics as vectors -is technically possible, the order and required length is not guaranteed to -be parallel to the input data. +\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section +that lists the available options. The 'required' aesthetics cannot be +passed on to the \code{params}. Please note that while passing unmapped +aesthetics as vectors is technically possible, the order and required +length is not guaranteed to be parallel to the input data. \item When constructing a layer using a \verb{stat_*()} function, the \code{...} argument can be used to pass on parameters -to the \code{geom} part of the layer. An example of this is \code{stat_density(geom = "area", outline.type = "both")}. The geom's documentation lists which -parameters it can accept. +to the \code{geom} part of the layer. An example of this is +\code{stat_density(geom = "area", outline.type = "both")}. The geom's +documentation lists which parameters it can accept. \item Inversely, when constructing a layer using a -\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters to -the \code{stat} part of the layer. An example of this is \code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists which parameters it -can accept. +\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters +to the \code{stat} part of the layer. An example of this is +\code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists +which parameters it can accept. \item The \code{key_glyph} argument of \code{\link[=layer]{layer()}} may also be passed on through -\code{...}. This can be one of the functions described as \link[=draw_key]{key glyphs}, -to change the display of the layer in the legend. +\code{...}. This can be one of the functions described as +\link[=draw_key]{key glyphs}, to change the display of the layer in the legend. }} \item{interpolate}{If \code{TRUE} interpolate linearly, if \code{FALSE} diff --git a/man/geom_violin.Rd b/man/geom_violin.Rd index aef1063443..3c38fc1e9a 100644 --- a/man/geom_violin.Rd +++ b/man/geom_violin.Rd @@ -46,10 +46,8 @@ stat_ydensity( ) } \arguments{ -\item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}. If specified and -\code{inherit.aes = TRUE} (the default), it is combined with the default mapping -at the top level of the plot. You must supply \code{mapping} if there is no plot -mapping.} +\item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}. If specified and \code{inherit.aes = TRUE} (the default), it is combined with the default mapping at the top level +of the plot. You must supply \code{mapping} if there is no plot mapping.} \item{data}{The data to be displayed in this layer. There are three options: \itemize{ @@ -78,28 +76,30 @@ use \code{position_jitter()}, give the position as \code{"jitter"}. \item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These arguments broadly fall into one of 4 categories below. Notably, further arguments to -the \code{position} argument, or aesthetics that are required can \emph{not} be passed -through \code{...}. Unknown arguments that are not part of the 4 categories below -are ignored. +the \code{position} argument, or aesthetics that are required can +\emph{not} be passed through \code{...}. Unknown arguments that are not part of the 4 +categories below are ignored. \itemize{ \item Static aesthetics that are not mapped to a scale, but are at a fixed value and apply to the layer as a whole. For example, \code{colour = "red"} or -\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section that -lists the available options. The 'required' aesthetics cannot be passed on to -the \code{params}. Please note that while passing unmapped aesthetics as vectors -is technically possible, the order and required length is not guaranteed to -be parallel to the input data. +\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section +that lists the available options. The 'required' aesthetics cannot be +passed on to the \code{params}. Please note that while passing unmapped +aesthetics as vectors is technically possible, the order and required +length is not guaranteed to be parallel to the input data. \item When constructing a layer using a \verb{stat_*()} function, the \code{...} argument can be used to pass on parameters -to the \code{geom} part of the layer. An example of this is \code{stat_density(geom = "area", outline.type = "both")}. The geom's documentation lists which -parameters it can accept. +to the \code{geom} part of the layer. An example of this is +\code{stat_density(geom = "area", outline.type = "both")}. The geom's +documentation lists which parameters it can accept. \item Inversely, when constructing a layer using a -\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters to -the \code{stat} part of the layer. An example of this is \code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists which parameters it -can accept. +\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters +to the \code{stat} part of the layer. An example of this is +\code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists +which parameters it can accept. \item The \code{key_glyph} argument of \code{\link[=layer]{layer()}} may also be passed on through -\code{...}. This can be one of the functions described as \link[=draw_key]{key glyphs}, -to change the display of the layer in the legend. +\code{...}. This can be one of the functions described as +\link[=draw_key]{key glyphs}, to change the display of the layer in the legend. }} \item{trim}{If \code{TRUE} (default), trim the tails of the violins @@ -126,10 +126,7 @@ observations. If "width", all violins have the same maximum width.} \item{na.rm}{If \code{FALSE}, the default, missing values are removed with a warning. If \code{TRUE}, missing values are silently removed.} -\item{orientation}{The orientation of the layer. The default (\code{NA}) -automatically determines the orientation from the aesthetic mapping. In the -rare event that this fails it can be given explicitly by setting \code{orientation} -to either \code{"x"} or \code{"y"}. See the \emph{Orientation} section for more detail.} +\item{orientation}{The orientation of the layer. The default (\code{NA}) automatically determines the orientation from the aesthetic mapping. In the rare event that this fails it can be given explicitly by setting \code{orientation} to either \code{"x"}` or \code{"y"}. See the \emph{Orientation} section for more detail.} \item{show.legend}{Logical. Should this layer be included in the legends? \code{NA}, the default, includes if any aesthetics are mapped. \code{FALSE} never includes, and \code{TRUE} diff --git a/man/ggsf.Rd b/man/ggsf.Rd index bddc269b09..15e6e6c089 100644 --- a/man/ggsf.Rd +++ b/man/ggsf.Rd @@ -185,10 +185,8 @@ legend, the plot title, or the plot margins.} their respective directions. \code{"xy"} can be used to reverse both directions.} -\item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}. If specified and -\code{inherit.aes = TRUE} (the default), it is combined with the default mapping -at the top level of the plot. You must supply \code{mapping} if there is no plot -mapping.} +\item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}. If specified and \code{inherit.aes = TRUE} (the default), it is combined with the default mapping at the top level +of the plot. You must supply \code{mapping} if there is no plot mapping.} \item{data}{The data to be displayed in this layer. There are three options: \itemize{ @@ -209,8 +207,8 @@ accepts the following: \itemize{ \item A \code{Stat} ggproto subclass, for example \code{StatCount}. \item A string naming the stat. To give the stat as a string, strip the -function name of the \code{stat_} prefix. For example, to use \code{stat_count()}, give -the stat as \code{"count"}. +function name of the \code{stat_} prefix. For example, to use \code{stat_count()}, +give the stat as \code{"count"}. \item For more information and other ways to specify the stat, see the \link[=layer_stats]{layer stat} documentation. }} @@ -245,28 +243,30 @@ specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} \item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These arguments broadly fall into one of 4 categories below. Notably, further arguments to -the \code{position} argument, or aesthetics that are required can \emph{not} be passed -through \code{...}. Unknown arguments that are not part of the 4 categories below -are ignored. +the \code{position} argument, or aesthetics that are required can +\emph{not} be passed through \code{...}. Unknown arguments that are not part of the 4 +categories below are ignored. \itemize{ \item Static aesthetics that are not mapped to a scale, but are at a fixed value and apply to the layer as a whole. For example, \code{colour = "red"} or -\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section that -lists the available options. The 'required' aesthetics cannot be passed on to -the \code{params}. Please note that while passing unmapped aesthetics as vectors -is technically possible, the order and required length is not guaranteed to -be parallel to the input data. +\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section +that lists the available options. The 'required' aesthetics cannot be +passed on to the \code{params}. Please note that while passing unmapped +aesthetics as vectors is technically possible, the order and required +length is not guaranteed to be parallel to the input data. \item When constructing a layer using a \verb{stat_*()} function, the \code{...} argument can be used to pass on parameters -to the \code{geom} part of the layer. An example of this is \code{stat_density(geom = "area", outline.type = "both")}. The geom's documentation lists which -parameters it can accept. +to the \code{geom} part of the layer. An example of this is +\code{stat_density(geom = "area", outline.type = "both")}. The geom's +documentation lists which parameters it can accept. \item Inversely, when constructing a layer using a -\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters to -the \code{stat} part of the layer. An example of this is \code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists which parameters it -can accept. +\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters +to the \code{stat} part of the layer. An example of this is +\code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists +which parameters it can accept. \item The \code{key_glyph} argument of \code{\link[=layer]{layer()}} may also be passed on through -\code{...}. This can be one of the functions described as \link[=draw_key]{key glyphs}, -to change the display of the layer in the legend. +\code{...}. This can be one of the functions described as +\link[=draw_key]{key glyphs}, to change the display of the layer in the legend. }} \item{parse}{If \code{TRUE}, the labels will be parsed into expressions and @@ -306,8 +306,8 @@ accepts the following: \itemize{ \item A \code{Geom} ggproto subclass, for example \code{GeomPoint}. \item A string naming the geom. To give the geom as a string, strip the -function name of the \code{geom_} prefix. For example, to use \code{geom_point()}, give -the geom as \code{"point"}. +function name of the \code{geom_} prefix. For example, to use \code{geom_point()}, +give the geom as \code{"point"}. \item For more information and other ways to specify the geom, see the \link[=layer_geoms]{layer geom} documentation. }} diff --git a/man/layer.Rd b/man/layer.Rd index a3812e268b..307b0e419d 100644 --- a/man/layer.Rd +++ b/man/layer.Rd @@ -28,8 +28,8 @@ accepts the following: \itemize{ \item A \code{Geom} ggproto subclass, for example \code{GeomPoint}. \item A string naming the geom. To give the geom as a string, strip the -function name of the \code{geom_} prefix. For example, to use \code{geom_point()}, give -the geom as \code{"point"}. +function name of the \code{geom_} prefix. For example, to use \code{geom_point()}, +give the geom as \code{"point"}. \item For more information and other ways to specify the geom, see the \link[=layer_geoms]{layer geom} documentation. }} @@ -41,8 +41,8 @@ accepts the following: \itemize{ \item A \code{Stat} ggproto subclass, for example \code{StatCount}. \item A string naming the stat. To give the stat as a string, strip the -function name of the \code{stat_} prefix. For example, to use \code{stat_count()}, give -the stat as \code{"count"}. +function name of the \code{stat_} prefix. For example, to use \code{stat_count()}, +give the stat as \code{"count"}. \item For more information and other ways to specify the stat, see the \link[=layer_stats]{layer stat} documentation. }} @@ -59,10 +59,8 @@ value must be a \code{data.frame}, and will be used as the layer data. A \code{function} can be created from a \code{formula} (e.g. \code{~ head(.x, 10)}). }} -\item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}. If specified and -\code{inherit.aes = TRUE} (the default), it is combined with the default mapping -at the top level of the plot. You must supply \code{mapping} if there is no plot -mapping.} +\item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}. If specified and \code{inherit.aes = TRUE} (the default), it is combined with the default mapping at the top level +of the plot. You must supply \code{mapping} if there is no plot mapping.} \item{position}{A position adjustment to use on the data for this layer. This can be used in various ways, including to prevent overplotting and improving the display. diff --git a/man/layer_sf.Rd b/man/layer_sf.Rd index 62cb200aef..13cd8f402c 100644 --- a/man/layer_sf.Rd +++ b/man/layer_sf.Rd @@ -25,8 +25,8 @@ accepts the following: \itemize{ \item A \code{Geom} ggproto subclass, for example \code{GeomPoint}. \item A string naming the geom. To give the geom as a string, strip the -function name of the \code{geom_} prefix. For example, to use \code{geom_point()}, give -the geom as \code{"point"}. +function name of the \code{geom_} prefix. For example, to use \code{geom_point()}, +give the geom as \code{"point"}. \item For more information and other ways to specify the geom, see the \link[=layer_geoms]{layer geom} documentation. }} @@ -38,8 +38,8 @@ accepts the following: \itemize{ \item A \code{Stat} ggproto subclass, for example \code{StatCount}. \item A string naming the stat. To give the stat as a string, strip the -function name of the \code{stat_} prefix. For example, to use \code{stat_count()}, give -the stat as \code{"count"}. +function name of the \code{stat_} prefix. For example, to use \code{stat_count()}, +give the stat as \code{"count"}. \item For more information and other ways to specify the stat, see the \link[=layer_stats]{layer stat} documentation. }} @@ -56,10 +56,8 @@ value must be a \code{data.frame}, and will be used as the layer data. A \code{function} can be created from a \code{formula} (e.g. \code{~ head(.x, 10)}). }} -\item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}. If specified and -\code{inherit.aes = TRUE} (the default), it is combined with the default mapping -at the top level of the plot. You must supply \code{mapping} if there is no plot -mapping.} +\item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}. If specified and \code{inherit.aes = TRUE} (the default), it is combined with the default mapping at the top level +of the plot. You must supply \code{mapping} if there is no plot mapping.} \item{position}{A position adjustment to use on the data for this layer. This can be used in various ways, including to prevent overplotting and improving the display. diff --git a/man/shared_layer_parameters.Rd b/man/shared_layer_parameters.Rd index 3b4994f2ef..3cab292d63 100644 --- a/man/shared_layer_parameters.Rd +++ b/man/shared_layer_parameters.Rd @@ -1,12 +1,11 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/layer.R \name{shared_layer_parameters} +\alias{shared_layer_parameters} \title{Shared layer parameters} \arguments{ -\item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}. If specified and -\code{inherit.aes = TRUE} (the default), it is combined with the default mapping -at the top level of the plot. You must supply \code{mapping} if there is no plot -mapping.} +\item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}. If specified and \code{inherit.aes = TRUE} (the default), it is combined with the default mapping at the top level +of the plot. You must supply \code{mapping} if there is no plot mapping.} \item{data}{The data to be displayed in this layer. There are three options: \itemize{ @@ -27,8 +26,8 @@ accepts the following: \itemize{ \item A \code{Geom} ggproto subclass, for example \code{GeomPoint}. \item A string naming the geom. To give the geom as a string, strip the -function name of the \code{geom_} prefix. For example, to use \code{geom_point()}, give -the geom as \code{"point"}. +function name of the \code{geom_} prefix. For example, to use \code{geom_point()}, +give the geom as \code{"point"}. \item For more information and other ways to specify the geom, see the \link[=layer_geoms]{layer geom} documentation. }} @@ -40,8 +39,8 @@ accepts the following: \itemize{ \item A \code{Stat} ggproto subclass, for example \code{StatCount}. \item A string naming the stat. To give the stat as a string, strip the -function name of the \code{stat_} prefix. For example, to use \code{stat_count()}, give -the stat as \code{"count"}. +function name of the \code{stat_} prefix. For example, to use \code{stat_count()}, +give the stat as \code{"count"}. \item For more information and other ways to specify the stat, see the \link[=layer_stats]{layer stat} documentation. }} @@ -76,32 +75,33 @@ specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} \item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These arguments broadly fall into one of 4 categories below. Notably, further arguments to -the \code{position} argument, or aesthetics that are required can \emph{not} be passed -through \code{...}. Unknown arguments that are not part of the 4 categories below -are ignored. +the \code{position} argument, or aesthetics that are required can +\emph{not} be passed through \code{...}. Unknown arguments that are not part of the 4 +categories below are ignored. \itemize{ \item Static aesthetics that are not mapped to a scale, but are at a fixed value and apply to the layer as a whole. For example, \code{colour = "red"} or -\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section that -lists the available options. The 'required' aesthetics cannot be passed on to -the \code{params}. Please note that while passing unmapped aesthetics as vectors -is technically possible, the order and required length is not guaranteed to -be parallel to the input data. +\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section +that lists the available options. The 'required' aesthetics cannot be +passed on to the \code{params}. Please note that while passing unmapped +aesthetics as vectors is technically possible, the order and required +length is not guaranteed to be parallel to the input data. \item When constructing a layer using a \verb{stat_*()} function, the \code{...} argument can be used to pass on parameters -to the \code{geom} part of the layer. An example of this is \code{stat_density(geom = "area", outline.type = "both")}. The geom's documentation lists which -parameters it can accept. +to the \code{geom} part of the layer. An example of this is +\code{stat_density(geom = "area", outline.type = "both")}. The geom's +documentation lists which parameters it can accept. \item Inversely, when constructing a layer using a -\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters to -the \code{stat} part of the layer. An example of this is \code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists which parameters it -can accept. +\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters +to the \code{stat} part of the layer. An example of this is +\code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists +which parameters it can accept. \item The \code{key_glyph} argument of \code{\link[=layer]{layer()}} may also be passed on through -\code{...}. This can be one of the functions described as \link[=draw_key]{key glyphs}, -to change the display of the layer in the legend. +\code{...}. This can be one of the functions described as +\link[=draw_key]{key glyphs}, to change the display of the layer in the legend. }} } \description{ -This is a central place for describing typical layer parameters. It prevents -cluttered definitions all over the place. +This is a central place for describing typical layer parameters. +It prevents cluttered definitions all over the place. } -\keyword{internal} diff --git a/man/stat_connect.Rd b/man/stat_connect.Rd index 557ae3ec9e..b8e78c0d81 100644 --- a/man/stat_connect.Rd +++ b/man/stat_connect.Rd @@ -17,10 +17,8 @@ stat_connect( ) } \arguments{ -\item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}. If specified and -\code{inherit.aes = TRUE} (the default), it is combined with the default mapping -at the top level of the plot. You must supply \code{mapping} if there is no plot -mapping.} +\item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}. If specified and \code{inherit.aes = TRUE} (the default), it is combined with the default mapping at the top level +of the plot. You must supply \code{mapping} if there is no plot mapping.} \item{data}{The data to be displayed in this layer. There are three options: \itemize{ @@ -41,8 +39,8 @@ accepts the following: \itemize{ \item A \code{Geom} ggproto subclass, for example \code{GeomPoint}. \item A string naming the geom. To give the geom as a string, strip the -function name of the \code{geom_} prefix. For example, to use \code{geom_point()}, give -the geom as \code{"point"}. +function name of the \code{geom_} prefix. For example, to use \code{geom_point()}, +give the geom as \code{"point"}. \item For more information and other ways to specify the geom, see the \link[=layer_geoms]{layer geom} documentation. }} @@ -62,28 +60,30 @@ use \code{position_jitter()}, give the position as \code{"jitter"}. \item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These arguments broadly fall into one of 4 categories below. Notably, further arguments to -the \code{position} argument, or aesthetics that are required can \emph{not} be passed -through \code{...}. Unknown arguments that are not part of the 4 categories below -are ignored. +the \code{position} argument, or aesthetics that are required can +\emph{not} be passed through \code{...}. Unknown arguments that are not part of the 4 +categories below are ignored. \itemize{ \item Static aesthetics that are not mapped to a scale, but are at a fixed value and apply to the layer as a whole. For example, \code{colour = "red"} or -\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section that -lists the available options. The 'required' aesthetics cannot be passed on to -the \code{params}. Please note that while passing unmapped aesthetics as vectors -is technically possible, the order and required length is not guaranteed to -be parallel to the input data. +\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section +that lists the available options. The 'required' aesthetics cannot be +passed on to the \code{params}. Please note that while passing unmapped +aesthetics as vectors is technically possible, the order and required +length is not guaranteed to be parallel to the input data. \item When constructing a layer using a \verb{stat_*()} function, the \code{...} argument can be used to pass on parameters -to the \code{geom} part of the layer. An example of this is \code{stat_density(geom = "area", outline.type = "both")}. The geom's documentation lists which -parameters it can accept. +to the \code{geom} part of the layer. An example of this is +\code{stat_density(geom = "area", outline.type = "both")}. The geom's +documentation lists which parameters it can accept. \item Inversely, when constructing a layer using a -\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters to -the \code{stat} part of the layer. An example of this is \code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists which parameters it -can accept. +\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters +to the \code{stat} part of the layer. An example of this is +\code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists +which parameters it can accept. \item The \code{key_glyph} argument of \code{\link[=layer]{layer()}} may also be passed on through -\code{...}. This can be one of the functions described as \link[=draw_key]{key glyphs}, -to change the display of the layer in the legend. +\code{...}. This can be one of the functions described as +\link[=draw_key]{key glyphs}, to change the display of the layer in the legend. }} \item{connection}{A specification of how two points are connected. Can be one diff --git a/man/stat_ecdf.Rd b/man/stat_ecdf.Rd index 38a49ba5a7..8073cf0770 100644 --- a/man/stat_ecdf.Rd +++ b/man/stat_ecdf.Rd @@ -18,10 +18,8 @@ stat_ecdf( ) } \arguments{ -\item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}. If specified and -\code{inherit.aes = TRUE} (the default), it is combined with the default mapping -at the top level of the plot. You must supply \code{mapping} if there is no plot -mapping.} +\item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}. If specified and \code{inherit.aes = TRUE} (the default), it is combined with the default mapping at the top level +of the plot. You must supply \code{mapping} if there is no plot mapping.} \item{data}{The data to be displayed in this layer. There are three options: \itemize{ @@ -42,8 +40,8 @@ accepts the following: \itemize{ \item A \code{Geom} ggproto subclass, for example \code{GeomPoint}. \item A string naming the geom. To give the geom as a string, strip the -function name of the \code{geom_} prefix. For example, to use \code{geom_point()}, give -the geom as \code{"point"}. +function name of the \code{geom_} prefix. For example, to use \code{geom_point()}, +give the geom as \code{"point"}. \item For more information and other ways to specify the geom, see the \link[=layer_geoms]{layer geom} documentation. }} @@ -63,28 +61,30 @@ use \code{position_jitter()}, give the position as \code{"jitter"}. \item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These arguments broadly fall into one of 4 categories below. Notably, further arguments to -the \code{position} argument, or aesthetics that are required can \emph{not} be passed -through \code{...}. Unknown arguments that are not part of the 4 categories below -are ignored. +the \code{position} argument, or aesthetics that are required can +\emph{not} be passed through \code{...}. Unknown arguments that are not part of the 4 +categories below are ignored. \itemize{ \item Static aesthetics that are not mapped to a scale, but are at a fixed value and apply to the layer as a whole. For example, \code{colour = "red"} or -\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section that -lists the available options. The 'required' aesthetics cannot be passed on to -the \code{params}. Please note that while passing unmapped aesthetics as vectors -is technically possible, the order and required length is not guaranteed to -be parallel to the input data. +\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section +that lists the available options. The 'required' aesthetics cannot be +passed on to the \code{params}. Please note that while passing unmapped +aesthetics as vectors is technically possible, the order and required +length is not guaranteed to be parallel to the input data. \item When constructing a layer using a \verb{stat_*()} function, the \code{...} argument can be used to pass on parameters -to the \code{geom} part of the layer. An example of this is \code{stat_density(geom = "area", outline.type = "both")}. The geom's documentation lists which -parameters it can accept. +to the \code{geom} part of the layer. An example of this is +\code{stat_density(geom = "area", outline.type = "both")}. The geom's +documentation lists which parameters it can accept. \item Inversely, when constructing a layer using a -\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters to -the \code{stat} part of the layer. An example of this is \code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists which parameters it -can accept. +\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters +to the \code{stat} part of the layer. An example of this is +\code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists +which parameters it can accept. \item The \code{key_glyph} argument of \code{\link[=layer]{layer()}} may also be passed on through -\code{...}. This can be one of the functions described as \link[=draw_key]{key glyphs}, -to change the display of the layer in the legend. +\code{...}. This can be one of the functions described as +\link[=draw_key]{key glyphs}, to change the display of the layer in the legend. }} \item{n}{if NULL, do not interpolate. If not NULL, this is the number diff --git a/man/stat_ellipse.Rd b/man/stat_ellipse.Rd index a8c6c3c260..8e0651be63 100644 --- a/man/stat_ellipse.Rd +++ b/man/stat_ellipse.Rd @@ -19,10 +19,8 @@ stat_ellipse( ) } \arguments{ -\item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}. If specified and -\code{inherit.aes = TRUE} (the default), it is combined with the default mapping -at the top level of the plot. You must supply \code{mapping} if there is no plot -mapping.} +\item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}. If specified and \code{inherit.aes = TRUE} (the default), it is combined with the default mapping at the top level +of the plot. You must supply \code{mapping} if there is no plot mapping.} \item{data}{The data to be displayed in this layer. There are three options: \itemize{ @@ -43,8 +41,8 @@ accepts the following: \itemize{ \item A \code{Geom} ggproto subclass, for example \code{GeomPoint}. \item A string naming the geom. To give the geom as a string, strip the -function name of the \code{geom_} prefix. For example, to use \code{geom_point()}, give -the geom as \code{"point"}. +function name of the \code{geom_} prefix. For example, to use \code{geom_point()}, +give the geom as \code{"point"}. \item For more information and other ways to specify the geom, see the \link[=layer_geoms]{layer geom} documentation. }} @@ -64,28 +62,30 @@ use \code{position_jitter()}, give the position as \code{"jitter"}. \item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These arguments broadly fall into one of 4 categories below. Notably, further arguments to -the \code{position} argument, or aesthetics that are required can \emph{not} be passed -through \code{...}. Unknown arguments that are not part of the 4 categories below -are ignored. +the \code{position} argument, or aesthetics that are required can +\emph{not} be passed through \code{...}. Unknown arguments that are not part of the 4 +categories below are ignored. \itemize{ \item Static aesthetics that are not mapped to a scale, but are at a fixed value and apply to the layer as a whole. For example, \code{colour = "red"} or -\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section that -lists the available options. The 'required' aesthetics cannot be passed on to -the \code{params}. Please note that while passing unmapped aesthetics as vectors -is technically possible, the order and required length is not guaranteed to -be parallel to the input data. +\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section +that lists the available options. The 'required' aesthetics cannot be +passed on to the \code{params}. Please note that while passing unmapped +aesthetics as vectors is technically possible, the order and required +length is not guaranteed to be parallel to the input data. \item When constructing a layer using a \verb{stat_*()} function, the \code{...} argument can be used to pass on parameters -to the \code{geom} part of the layer. An example of this is \code{stat_density(geom = "area", outline.type = "both")}. The geom's documentation lists which -parameters it can accept. +to the \code{geom} part of the layer. An example of this is +\code{stat_density(geom = "area", outline.type = "both")}. The geom's +documentation lists which parameters it can accept. \item Inversely, when constructing a layer using a -\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters to -the \code{stat} part of the layer. An example of this is \code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists which parameters it -can accept. +\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters +to the \code{stat} part of the layer. An example of this is +\code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists +which parameters it can accept. \item The \code{key_glyph} argument of \code{\link[=layer]{layer()}} may also be passed on through -\code{...}. This can be one of the functions described as \link[=draw_key]{key glyphs}, -to change the display of the layer in the legend. +\code{...}. This can be one of the functions described as +\link[=draw_key]{key glyphs}, to change the display of the layer in the legend. }} \item{type}{The type of ellipse. diff --git a/man/stat_identity.Rd b/man/stat_identity.Rd index e165152c59..e73e256df6 100644 --- a/man/stat_identity.Rd +++ b/man/stat_identity.Rd @@ -16,10 +16,8 @@ stat_identity( ) } \arguments{ -\item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}. If specified and -\code{inherit.aes = TRUE} (the default), it is combined with the default mapping -at the top level of the plot. You must supply \code{mapping} if there is no plot -mapping.} +\item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}. If specified and \code{inherit.aes = TRUE} (the default), it is combined with the default mapping at the top level +of the plot. You must supply \code{mapping} if there is no plot mapping.} \item{data}{The data to be displayed in this layer. There are three options: \itemize{ @@ -40,8 +38,8 @@ accepts the following: \itemize{ \item A \code{Geom} ggproto subclass, for example \code{GeomPoint}. \item A string naming the geom. To give the geom as a string, strip the -function name of the \code{geom_} prefix. For example, to use \code{geom_point()}, give -the geom as \code{"point"}. +function name of the \code{geom_} prefix. For example, to use \code{geom_point()}, +give the geom as \code{"point"}. \item For more information and other ways to specify the geom, see the \link[=layer_geoms]{layer geom} documentation. }} @@ -61,28 +59,30 @@ use \code{position_jitter()}, give the position as \code{"jitter"}. \item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These arguments broadly fall into one of 4 categories below. Notably, further arguments to -the \code{position} argument, or aesthetics that are required can \emph{not} be passed -through \code{...}. Unknown arguments that are not part of the 4 categories below -are ignored. +the \code{position} argument, or aesthetics that are required can +\emph{not} be passed through \code{...}. Unknown arguments that are not part of the 4 +categories below are ignored. \itemize{ \item Static aesthetics that are not mapped to a scale, but are at a fixed value and apply to the layer as a whole. For example, \code{colour = "red"} or -\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section that -lists the available options. The 'required' aesthetics cannot be passed on to -the \code{params}. Please note that while passing unmapped aesthetics as vectors -is technically possible, the order and required length is not guaranteed to -be parallel to the input data. +\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section +that lists the available options. The 'required' aesthetics cannot be +passed on to the \code{params}. Please note that while passing unmapped +aesthetics as vectors is technically possible, the order and required +length is not guaranteed to be parallel to the input data. \item When constructing a layer using a \verb{stat_*()} function, the \code{...} argument can be used to pass on parameters -to the \code{geom} part of the layer. An example of this is \code{stat_density(geom = "area", outline.type = "both")}. The geom's documentation lists which -parameters it can accept. +to the \code{geom} part of the layer. An example of this is +\code{stat_density(geom = "area", outline.type = "both")}. The geom's +documentation lists which parameters it can accept. \item Inversely, when constructing a layer using a -\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters to -the \code{stat} part of the layer. An example of this is \code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists which parameters it -can accept. +\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters +to the \code{stat} part of the layer. An example of this is +\code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists +which parameters it can accept. \item The \code{key_glyph} argument of \code{\link[=layer]{layer()}} may also be passed on through -\code{...}. This can be one of the functions described as \link[=draw_key]{key glyphs}, -to change the display of the layer in the legend. +\code{...}. This can be one of the functions described as +\link[=draw_key]{key glyphs}, to change the display of the layer in the legend. }} \item{na.rm}{If \code{FALSE}, the default, missing values are removed with a warning. If diff --git a/man/stat_manual.Rd b/man/stat_manual.Rd index 46421a5de3..2689626479 100644 --- a/man/stat_manual.Rd +++ b/man/stat_manual.Rd @@ -18,10 +18,8 @@ stat_manual( ) } \arguments{ -\item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}. If specified and -\code{inherit.aes = TRUE} (the default), it is combined with the default mapping -at the top level of the plot. You must supply \code{mapping} if there is no plot -mapping.} +\item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}. If specified and \code{inherit.aes = TRUE} (the default), it is combined with the default mapping at the top level +of the plot. You must supply \code{mapping} if there is no plot mapping.} \item{data}{The data to be displayed in this layer. There are three options: \itemize{ @@ -42,8 +40,8 @@ accepts the following: \itemize{ \item A \code{Geom} ggproto subclass, for example \code{GeomPoint}. \item A string naming the geom. To give the geom as a string, strip the -function name of the \code{geom_} prefix. For example, to use \code{geom_point()}, give -the geom as \code{"point"}. +function name of the \code{geom_} prefix. For example, to use \code{geom_point()}, +give the geom as \code{"point"}. \item For more information and other ways to specify the geom, see the \link[=layer_geoms]{layer geom} documentation. }} @@ -63,28 +61,30 @@ use \code{position_jitter()}, give the position as \code{"jitter"}. \item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These arguments broadly fall into one of 4 categories below. Notably, further arguments to -the \code{position} argument, or aesthetics that are required can \emph{not} be passed -through \code{...}. Unknown arguments that are not part of the 4 categories below -are ignored. +the \code{position} argument, or aesthetics that are required can +\emph{not} be passed through \code{...}. Unknown arguments that are not part of the 4 +categories below are ignored. \itemize{ \item Static aesthetics that are not mapped to a scale, but are at a fixed value and apply to the layer as a whole. For example, \code{colour = "red"} or -\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section that -lists the available options. The 'required' aesthetics cannot be passed on to -the \code{params}. Please note that while passing unmapped aesthetics as vectors -is technically possible, the order and required length is not guaranteed to -be parallel to the input data. +\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section +that lists the available options. The 'required' aesthetics cannot be +passed on to the \code{params}. Please note that while passing unmapped +aesthetics as vectors is technically possible, the order and required +length is not guaranteed to be parallel to the input data. \item When constructing a layer using a \verb{stat_*()} function, the \code{...} argument can be used to pass on parameters -to the \code{geom} part of the layer. An example of this is \code{stat_density(geom = "area", outline.type = "both")}. The geom's documentation lists which -parameters it can accept. +to the \code{geom} part of the layer. An example of this is +\code{stat_density(geom = "area", outline.type = "both")}. The geom's +documentation lists which parameters it can accept. \item Inversely, when constructing a layer using a -\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters to -the \code{stat} part of the layer. An example of this is \code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists which parameters it -can accept. +\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters +to the \code{stat} part of the layer. An example of this is +\code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists +which parameters it can accept. \item The \code{key_glyph} argument of \code{\link[=layer]{layer()}} may also be passed on through -\code{...}. This can be one of the functions described as \link[=draw_key]{key glyphs}, -to change the display of the layer in the legend. +\code{...}. This can be one of the functions described as +\link[=draw_key]{key glyphs}, to change the display of the layer in the legend. }} \item{fun}{Function that takes a data frame as input and returns a data diff --git a/man/stat_sf_coordinates.Rd b/man/stat_sf_coordinates.Rd index 5d90735b8f..3b4931b62d 100644 --- a/man/stat_sf_coordinates.Rd +++ b/man/stat_sf_coordinates.Rd @@ -19,10 +19,8 @@ stat_sf_coordinates( ) } \arguments{ -\item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}. If specified and -\code{inherit.aes = TRUE} (the default), it is combined with the default mapping -at the top level of the plot. You must supply \code{mapping} if there is no plot -mapping.} +\item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}. If specified and \code{inherit.aes = TRUE} (the default), it is combined with the default mapping at the top level +of the plot. You must supply \code{mapping} if there is no plot mapping.} \item{data}{The data to be displayed in this layer. There are three options: \itemize{ @@ -43,8 +41,8 @@ accepts the following: \itemize{ \item A \code{Geom} ggproto subclass, for example \code{GeomPoint}. \item A string naming the geom. To give the geom as a string, strip the -function name of the \code{geom_} prefix. For example, to use \code{geom_point()}, give -the geom as \code{"point"}. +function name of the \code{geom_} prefix. For example, to use \code{geom_point()}, +give the geom as \code{"point"}. \item For more information and other ways to specify the geom, see the \link[=layer_geoms]{layer geom} documentation. }} @@ -85,28 +83,30 @@ when you really care about the exact locations.} \item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These arguments broadly fall into one of 4 categories below. Notably, further arguments to -the \code{position} argument, or aesthetics that are required can \emph{not} be passed -through \code{...}. Unknown arguments that are not part of the 4 categories below -are ignored. +the \code{position} argument, or aesthetics that are required can +\emph{not} be passed through \code{...}. Unknown arguments that are not part of the 4 +categories below are ignored. \itemize{ \item Static aesthetics that are not mapped to a scale, but are at a fixed value and apply to the layer as a whole. For example, \code{colour = "red"} or -\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section that -lists the available options. The 'required' aesthetics cannot be passed on to -the \code{params}. Please note that while passing unmapped aesthetics as vectors -is technically possible, the order and required length is not guaranteed to -be parallel to the input data. +\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section +that lists the available options. The 'required' aesthetics cannot be +passed on to the \code{params}. Please note that while passing unmapped +aesthetics as vectors is technically possible, the order and required +length is not guaranteed to be parallel to the input data. \item When constructing a layer using a \verb{stat_*()} function, the \code{...} argument can be used to pass on parameters -to the \code{geom} part of the layer. An example of this is \code{stat_density(geom = "area", outline.type = "both")}. The geom's documentation lists which -parameters it can accept. +to the \code{geom} part of the layer. An example of this is +\code{stat_density(geom = "area", outline.type = "both")}. The geom's +documentation lists which parameters it can accept. \item Inversely, when constructing a layer using a -\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters to -the \code{stat} part of the layer. An example of this is \code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists which parameters it -can accept. +\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters +to the \code{stat} part of the layer. An example of this is +\code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists +which parameters it can accept. \item The \code{key_glyph} argument of \code{\link[=layer]{layer()}} may also be passed on through -\code{...}. This can be one of the functions described as \link[=draw_key]{key glyphs}, -to change the display of the layer in the legend. +\code{...}. This can be one of the functions described as +\link[=draw_key]{key glyphs}, to change the display of the layer in the legend. }} } \description{ diff --git a/man/stat_summary.Rd b/man/stat_summary.Rd index d9b7446e75..46eea1b8ea 100644 --- a/man/stat_summary.Rd +++ b/man/stat_summary.Rd @@ -49,10 +49,8 @@ stat_summary( ) } \arguments{ -\item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}. If specified and -\code{inherit.aes = TRUE} (the default), it is combined with the default mapping -at the top level of the plot. You must supply \code{mapping} if there is no plot -mapping.} +\item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}. If specified and \code{inherit.aes = TRUE} (the default), it is combined with the default mapping at the top level +of the plot. You must supply \code{mapping} if there is no plot mapping.} \item{data}{The data to be displayed in this layer. There are three options: \itemize{ @@ -73,8 +71,8 @@ accepts the following: \itemize{ \item A \code{Geom} ggproto subclass, for example \code{GeomPoint}. \item A string naming the geom. To give the geom as a string, strip the -function name of the \code{geom_} prefix. For example, to use \code{geom_point()}, give -the geom as \code{"point"}. +function name of the \code{geom_} prefix. For example, to use \code{geom_point()}, +give the geom as \code{"point"}. \item For more information and other ways to specify the geom, see the \link[=layer_geoms]{layer geom} documentation. }} @@ -94,28 +92,30 @@ use \code{position_jitter()}, give the position as \code{"jitter"}. \item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These arguments broadly fall into one of 4 categories below. Notably, further arguments to -the \code{position} argument, or aesthetics that are required can \emph{not} be passed -through \code{...}. Unknown arguments that are not part of the 4 categories below -are ignored. +the \code{position} argument, or aesthetics that are required can +\emph{not} be passed through \code{...}. Unknown arguments that are not part of the 4 +categories below are ignored. \itemize{ \item Static aesthetics that are not mapped to a scale, but are at a fixed value and apply to the layer as a whole. For example, \code{colour = "red"} or -\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section that -lists the available options. The 'required' aesthetics cannot be passed on to -the \code{params}. Please note that while passing unmapped aesthetics as vectors -is technically possible, the order and required length is not guaranteed to -be parallel to the input data. +\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section +that lists the available options. The 'required' aesthetics cannot be +passed on to the \code{params}. Please note that while passing unmapped +aesthetics as vectors is technically possible, the order and required +length is not guaranteed to be parallel to the input data. \item When constructing a layer using a \verb{stat_*()} function, the \code{...} argument can be used to pass on parameters -to the \code{geom} part of the layer. An example of this is \code{stat_density(geom = "area", outline.type = "both")}. The geom's documentation lists which -parameters it can accept. +to the \code{geom} part of the layer. An example of this is +\code{stat_density(geom = "area", outline.type = "both")}. The geom's +documentation lists which parameters it can accept. \item Inversely, when constructing a layer using a -\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters to -the \code{stat} part of the layer. An example of this is \code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists which parameters it -can accept. +\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters +to the \code{stat} part of the layer. An example of this is +\code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists +which parameters it can accept. \item The \code{key_glyph} argument of \code{\link[=layer]{layer()}} may also be passed on through -\code{...}. This can be one of the functions described as \link[=draw_key]{key glyphs}, -to change the display of the layer in the legend. +\code{...}. This can be one of the functions described as +\link[=draw_key]{key glyphs}, to change the display of the layer in the legend. }} \item{fun.data}{A function that is given the complete data and should @@ -147,10 +147,7 @@ boundaries. Overrides \code{binwidth} and \code{bins}.} \item{na.rm}{If \code{FALSE}, the default, missing values are removed with a warning. If \code{TRUE}, missing values are silently removed.} -\item{orientation}{The orientation of the layer. The default (\code{NA}) -automatically determines the orientation from the aesthetic mapping. In the -rare event that this fails it can be given explicitly by setting \code{orientation} -to either \code{"x"} or \code{"y"}. See the \emph{Orientation} section for more detail.} +\item{orientation}{The orientation of the layer. The default (\code{NA}) automatically determines the orientation from the aesthetic mapping. In the rare event that this fails it can be given explicitly by setting \code{orientation} to either \code{"x"}` or \code{"y"}. See the \emph{Orientation} section for more detail.} \item{show.legend}{Logical. Should this layer be included in the legends? \code{NA}, the default, includes if any aesthetics are mapped. \code{FALSE} never includes, and \code{TRUE} diff --git a/man/stat_summary_2d.Rd b/man/stat_summary_2d.Rd index 70b3d8d963..b21bf0aa1a 100644 --- a/man/stat_summary_2d.Rd +++ b/man/stat_summary_2d.Rd @@ -43,10 +43,8 @@ stat_summary_hex( ) } \arguments{ -\item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}. If specified and -\code{inherit.aes = TRUE} (the default), it is combined with the default mapping -at the top level of the plot. You must supply \code{mapping} if there is no plot -mapping.} +\item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}. If specified and \code{inherit.aes = TRUE} (the default), it is combined with the default mapping at the top level +of the plot. You must supply \code{mapping} if there is no plot mapping.} \item{data}{The data to be displayed in this layer. There are three options: \itemize{ @@ -67,8 +65,8 @@ accepts the following: \itemize{ \item A \code{Geom} ggproto subclass, for example \code{GeomPoint}. \item A string naming the geom. To give the geom as a string, strip the -function name of the \code{geom_} prefix. For example, to use \code{geom_point()}, give -the geom as \code{"point"}. +function name of the \code{geom_} prefix. For example, to use \code{geom_point()}, +give the geom as \code{"point"}. \item For more information and other ways to specify the geom, see the \link[=layer_geoms]{layer geom} documentation. }} @@ -88,28 +86,30 @@ use \code{position_jitter()}, give the position as \code{"jitter"}. \item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These arguments broadly fall into one of 4 categories below. Notably, further arguments to -the \code{position} argument, or aesthetics that are required can \emph{not} be passed -through \code{...}. Unknown arguments that are not part of the 4 categories below -are ignored. +the \code{position} argument, or aesthetics that are required can +\emph{not} be passed through \code{...}. Unknown arguments that are not part of the 4 +categories below are ignored. \itemize{ \item Static aesthetics that are not mapped to a scale, but are at a fixed value and apply to the layer as a whole. For example, \code{colour = "red"} or -\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section that -lists the available options. The 'required' aesthetics cannot be passed on to -the \code{params}. Please note that while passing unmapped aesthetics as vectors -is technically possible, the order and required length is not guaranteed to -be parallel to the input data. +\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section +that lists the available options. The 'required' aesthetics cannot be +passed on to the \code{params}. Please note that while passing unmapped +aesthetics as vectors is technically possible, the order and required +length is not guaranteed to be parallel to the input data. \item When constructing a layer using a \verb{stat_*()} function, the \code{...} argument can be used to pass on parameters -to the \code{geom} part of the layer. An example of this is \code{stat_density(geom = "area", outline.type = "both")}. The geom's documentation lists which -parameters it can accept. +to the \code{geom} part of the layer. An example of this is +\code{stat_density(geom = "area", outline.type = "both")}. The geom's +documentation lists which parameters it can accept. \item Inversely, when constructing a layer using a -\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters to -the \code{stat} part of the layer. An example of this is \code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists which parameters it -can accept. +\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters +to the \code{stat} part of the layer. An example of this is +\code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists +which parameters it can accept. \item The \code{key_glyph} argument of \code{\link[=layer]{layer()}} may also be passed on through -\code{...}. This can be one of the functions described as \link[=draw_key]{key glyphs}, -to change the display of the layer in the legend. +\code{...}. This can be one of the functions described as +\link[=draw_key]{key glyphs}, to change the display of the layer in the legend. }} \item{binwidth}{The width of the bins. Can be specified as a numeric value diff --git a/man/stat_unique.Rd b/man/stat_unique.Rd index 37984d4dad..02e354aded 100644 --- a/man/stat_unique.Rd +++ b/man/stat_unique.Rd @@ -16,10 +16,8 @@ stat_unique( ) } \arguments{ -\item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}. If specified and -\code{inherit.aes = TRUE} (the default), it is combined with the default mapping -at the top level of the plot. You must supply \code{mapping} if there is no plot -mapping.} +\item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}. If specified and \code{inherit.aes = TRUE} (the default), it is combined with the default mapping at the top level +of the plot. You must supply \code{mapping} if there is no plot mapping.} \item{data}{The data to be displayed in this layer. There are three options: \itemize{ @@ -40,8 +38,8 @@ accepts the following: \itemize{ \item A \code{Geom} ggproto subclass, for example \code{GeomPoint}. \item A string naming the geom. To give the geom as a string, strip the -function name of the \code{geom_} prefix. For example, to use \code{geom_point()}, give -the geom as \code{"point"}. +function name of the \code{geom_} prefix. For example, to use \code{geom_point()}, +give the geom as \code{"point"}. \item For more information and other ways to specify the geom, see the \link[=layer_geoms]{layer geom} documentation. }} @@ -61,28 +59,30 @@ use \code{position_jitter()}, give the position as \code{"jitter"}. \item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}'s \code{params} argument. These arguments broadly fall into one of 4 categories below. Notably, further arguments to -the \code{position} argument, or aesthetics that are required can \emph{not} be passed -through \code{...}. Unknown arguments that are not part of the 4 categories below -are ignored. +the \code{position} argument, or aesthetics that are required can +\emph{not} be passed through \code{...}. Unknown arguments that are not part of the 4 +categories below are ignored. \itemize{ \item Static aesthetics that are not mapped to a scale, but are at a fixed value and apply to the layer as a whole. For example, \code{colour = "red"} or -\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section that -lists the available options. The 'required' aesthetics cannot be passed on to -the \code{params}. Please note that while passing unmapped aesthetics as vectors -is technically possible, the order and required length is not guaranteed to -be parallel to the input data. +\code{linewidth = 3}. The geom's documentation has an \strong{Aesthetics} section +that lists the available options. The 'required' aesthetics cannot be +passed on to the \code{params}. Please note that while passing unmapped +aesthetics as vectors is technically possible, the order and required +length is not guaranteed to be parallel to the input data. \item When constructing a layer using a \verb{stat_*()} function, the \code{...} argument can be used to pass on parameters -to the \code{geom} part of the layer. An example of this is \code{stat_density(geom = "area", outline.type = "both")}. The geom's documentation lists which -parameters it can accept. +to the \code{geom} part of the layer. An example of this is +\code{stat_density(geom = "area", outline.type = "both")}. The geom's +documentation lists which parameters it can accept. \item Inversely, when constructing a layer using a -\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters to -the \code{stat} part of the layer. An example of this is \code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists which parameters it -can accept. +\verb{geom_*()} function, the \code{...} argument can be used to pass on parameters +to the \code{stat} part of the layer. An example of this is +\code{geom_area(stat = "density", adjust = 0.5)}. The stat's documentation lists +which parameters it can accept. \item The \code{key_glyph} argument of \code{\link[=layer]{layer()}} may also be passed on through -\code{...}. This can be one of the functions described as \link[=draw_key]{key glyphs}, -to change the display of the layer in the legend. +\code{...}. This can be one of the functions described as +\link[=draw_key]{key glyphs}, to change the display of the layer in the legend. }} \item{na.rm}{If \code{FALSE}, the default, missing values are removed with a warning. If From 0b49d149f98e6b3f5260e53dcfa3e4971b70468a Mon Sep 17 00:00:00 2001 From: Teun van den Brand Date: Wed, 5 Nov 2025 15:41:26 +0100 Subject: [PATCH 3/6] canonise `orientation` arg --- R/geom-bar.R | 4 ---- R/geom-boxplot.R | 1 - R/geom-density.R | 1 - R/geom-histogram.R | 1 - R/geom-linerange.R | 1 - R/geom-path.R | 1 - R/geom-ribbon.R | 1 - R/geom-smooth.R | 1 - R/geom-violin.R | 1 - R/layer.R | 6 ++++++ man/geom_bar.Rd | 8 ++++---- man/geom_boxplot.Rd | 5 ++++- man/geom_density.Rd | 9 ++++----- man/geom_histogram.Rd | 9 ++++----- man/geom_linerange.Rd | 7 ++++--- man/geom_path.Rd | 5 ++++- man/geom_ribbon.Rd | 9 ++++----- man/geom_smooth.Rd | 5 ++++- man/geom_violin.Rd | 5 ++++- man/shared_layer_parameters.Rd | 5 +++++ man/stat_summary.Rd | 5 ++++- 21 files changed, 51 insertions(+), 39 deletions(-) diff --git a/R/geom-bar.R b/R/geom-bar.R index 328d2f3a9c..30061d5089 100644 --- a/R/geom-bar.R +++ b/R/geom-bar.R @@ -77,10 +77,6 @@ GeomBar <- ggproto( #' bar charts. #' @export #' @inheritParams shared_layer_parameters -#' @param orientation The orientation of the layer. The default (`NA`) -#' automatically determines the orientation from the aesthetic mapping. In the -#' rare event that this fails it can be given explicitly by setting `orientation` -#' to either `"x"` or `"y"`. See the *Orientation* section for more detail. #' @param just Adjustment for column placement. Set to `0.5` by default, meaning #' that columns will be centered about axis breaks. Set to `0` or `1` to place #' columns to the left/right of axis breaks. Note that this argument may have diff --git a/R/geom-boxplot.R b/R/geom-boxplot.R index 260ad92f47..d2edbdd11b 100644 --- a/R/geom-boxplot.R +++ b/R/geom-boxplot.R @@ -30,7 +30,6 @@ #' [geom_violin()] for a richer display of the distribution, and #' [geom_jitter()] for a useful technique for small data. #' @inheritParams shared_layer_parameters -#' @inheritParams geom_bar #' @param geom,stat Use to override the default connection between #' `geom_boxplot()` and `stat_boxplot()`. For more information about #' overriding these connections, see how the [stat][layer_stats] and diff --git a/R/geom-density.R b/R/geom-density.R index c66ead8c87..ba7b81375a 100644 --- a/R/geom-density.R +++ b/R/geom-density.R @@ -27,7 +27,6 @@ GeomDensity <- ggproto( #' other methods of displaying continuous distribution. #' See [geom_violin()] for a compact density display. #' @inheritParams shared_layer_parameters -#' @inheritParams geom_bar #' @inheritParams geom_ribbon #' @param geom,stat Use to override the default connection between #' `geom_density()` and `stat_density()`. For more information about diff --git a/R/geom-histogram.R b/R/geom-histogram.R index c8122465dd..5c623fe820 100644 --- a/R/geom-histogram.R +++ b/R/geom-histogram.R @@ -35,7 +35,6 @@ #' #' @export #' @inheritParams shared_layer_parameters -#' @inheritParams geom_bar #' @param geom,stat Use to override the default connection between #' `geom_histogram()`/`geom_freqpoly()` and `stat_bin()`. For more information #' at overriding these connections, see how the [stat][layer_stats] and diff --git a/R/geom-linerange.R b/R/geom-linerange.R index 24af0537ee..808b547962 100644 --- a/R/geom-linerange.R +++ b/R/geom-linerange.R @@ -54,7 +54,6 @@ GeomLinerange <- ggproto( #' [geom_smooth()] for continuous analogue #' @export #' @inheritParams shared_layer_parameters -#' @inheritParams geom_bar #' @examples #' # Create a simple example dataset #' df <- data.frame( diff --git a/R/geom-path.R b/R/geom-path.R index e4654a9f91..2e10562e38 100644 --- a/R/geom-path.R +++ b/R/geom-path.R @@ -182,7 +182,6 @@ GeomStep <- ggproto( #' #' @aesthetics GeomPath #' @inheritParams shared_layer_parameters -#' @inheritParams geom_bar #' @param lineend Line end style (round, butt, square). #' @param linejoin Line join style (round, mitre, bevel). #' @param linemitre Line mitre limit (number greater than 1). diff --git a/R/geom-ribbon.R b/R/geom-ribbon.R index f0f6727156..32a8b35a9b 100644 --- a/R/geom-ribbon.R +++ b/R/geom-ribbon.R @@ -249,7 +249,6 @@ GeomArea <- ggproto("GeomArea", GeomRibbon, #' [geom_linerange()] for discrete intervals (lines), #' [geom_polygon()] for general polygons #' @inheritParams shared_layer_parameters -#' @inheritParams geom_bar #' @param linemitre Line mitre limit (number greater than 1). #' @param outline.type Type of the outline of the area; `"both"` draws both the #' upper and lower lines, `"upper"`/`"lower"` draws the respective lines only. diff --git a/R/geom-smooth.R b/R/geom-smooth.R index f858b92a59..56962eae5d 100644 --- a/R/geom-smooth.R +++ b/R/geom-smooth.R @@ -78,7 +78,6 @@ GeomSmooth <- ggproto( #' #' @aesthetics GeomSmooth #' @inheritParams shared_layer_parameters -#' @inheritParams geom_bar #' @param geom,stat Use to override the default connection between #' `geom_smooth()` and `stat_smooth()`. For more information about overriding #' these connections, see how the [stat][layer_stats] and [geom][layer_geoms] diff --git a/R/geom-violin.R b/R/geom-violin.R index b7dd7d76e8..59bca962cd 100644 --- a/R/geom-violin.R +++ b/R/geom-violin.R @@ -9,7 +9,6 @@ #' #' @aesthetics GeomViolin #' @inheritParams shared_layer_parameters -#' @inheritParams geom_bar #' @param trim If `TRUE` (default), trim the tails of the violins #' to the range of the data. If `FALSE`, don't trim the tails. #' @param geom,stat Use to override the default connection between diff --git a/R/layer.R b/R/layer.R index c54975b5aa..d4f470c270 100644 --- a/R/layer.R +++ b/R/layer.R @@ -100,6 +100,12 @@ #' * The `key_glyph` argument of [`layer()`] may also be passed on through #' `...`. This can be one of the functions described as #' [key glyphs][draw_key], to change the display of the layer in the legend. + +#' @param orientation +#' The orientation of the layer. The default (`NA`) automatically determines the +#' orientation from the aesthetic mapping. In the rare event that this fails it +#' can be given explicitly by setting `orientation` to either `"x"` or `"y"`. +#' See the *Orientation* section for more detail. #' #' @keywords internal #' @aliases NULL diff --git a/man/geom_bar.Rd b/man/geom_bar.Rd index 7a7889227c..2ac698ee15 100644 --- a/man/geom_bar.Rd +++ b/man/geom_bar.Rd @@ -132,10 +132,10 @@ specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} \code{stat_count()}. For more information about overriding these connections, see how the \link[=layer_stats]{stat} and \link[=layer_geoms]{geom} arguments work.} -\item{orientation}{The orientation of the layer. The default (\code{NA}) -automatically determines the orientation from the aesthetic mapping. In the -rare event that this fails it can be given explicitly by setting \code{orientation} -to either \code{"x"} or \code{"y"}. See the \emph{Orientation} section for more detail.} +\item{orientation}{The orientation of the layer. The default (\code{NA}) automatically determines the +orientation from the aesthetic mapping. In the rare event that this fails it +can be given explicitly by setting \code{orientation} to either \code{"x"} or \code{"y"}. +See the \emph{Orientation} section for more detail.} } \description{ There are two types of bar charts: \code{geom_bar()} and \code{geom_col()}. diff --git a/man/geom_boxplot.Rd b/man/geom_boxplot.Rd index e0b5440511..26b034324f 100644 --- a/man/geom_boxplot.Rd +++ b/man/geom_boxplot.Rd @@ -157,7 +157,10 @@ weighted, using the \code{weight} aesthetic).} \item{na.rm}{If \code{FALSE}, the default, missing values are removed with a warning. If \code{TRUE}, missing values are silently removed.} -\item{orientation}{The orientation of the layer. The default (\code{NA}) automatically determines the orientation from the aesthetic mapping. In the rare event that this fails it can be given explicitly by setting \code{orientation} to either \code{"x"}` or \code{"y"}. See the \emph{Orientation} section for more detail.} +\item{orientation}{The orientation of the layer. The default (\code{NA}) automatically determines the +orientation from the aesthetic mapping. In the rare event that this fails it +can be given explicitly by setting \code{orientation} to either \code{"x"} or \code{"y"}. +See the \emph{Orientation} section for more detail.} \item{show.legend}{Logical. Should this layer be included in the legends? \code{NA}, the default, includes if any aesthetics are mapped. \code{FALSE} never includes, and \code{TRUE} diff --git a/man/geom_density.Rd b/man/geom_density.Rd index 0a201e00a9..af06481290 100644 --- a/man/geom_density.Rd +++ b/man/geom_density.Rd @@ -99,10 +99,6 @@ which parameters it can accept. upper and lower lines, \code{"upper"}/\code{"lower"} draws the respective lines only. \code{"full"} draws a closed polygon around the area.} -\item{lineend}{Line end style (round, butt, square).} - -\item{linejoin}{Line join style (round, mitre, bevel).} - \item{linemitre}{Line mitre limit (number greater than 1).} \item{na.rm}{If \code{FALSE}, the default, missing values are removed with a warning. If @@ -125,7 +121,10 @@ specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} overriding these connections, see how the \link[=layer_stats]{stat} and \link[=layer_geoms]{geom} arguments work.} -\item{orientation}{The orientation of the layer. The default (\code{NA}) automatically determines the orientation from the aesthetic mapping. In the rare event that this fails it can be given explicitly by setting \code{orientation} to either \code{"x"}` or \code{"y"}. See the \emph{Orientation} section for more detail.} +\item{orientation}{The orientation of the layer. The default (\code{NA}) automatically determines the +orientation from the aesthetic mapping. In the rare event that this fails it +can be given explicitly by setting \code{orientation} to either \code{"x"} or \code{"y"}. +See the \emph{Orientation} section for more detail.} \item{bw}{The smoothing bandwidth to be used. If numeric, the standard deviation of the smoothing kernel. diff --git a/man/geom_histogram.Rd b/man/geom_histogram.Rd index ebfacc06ea..b62c5c9c8e 100644 --- a/man/geom_histogram.Rd +++ b/man/geom_histogram.Rd @@ -140,11 +140,10 @@ bin width of a time variable is the number of seconds.} \item{bins}{Number of bins. Overridden by \code{binwidth}. Defaults to 30.} -\item{orientation}{The orientation of the layer. The default (\code{NA}) automatically determines the orientation from the aesthetic mapping. In the rare event that this fails it can be given explicitly by setting \code{orientation} to either \code{"x"}` or \code{"y"}. See the \emph{Orientation} section for more detail.} - -\item{lineend}{Line end style (round, butt, square).} - -\item{linejoin}{Line join style (round, mitre, bevel).} +\item{orientation}{The orientation of the layer. The default (\code{NA}) automatically determines the +orientation from the aesthetic mapping. In the rare event that this fails it +can be given explicitly by setting \code{orientation} to either \code{"x"} or \code{"y"}. +See the \emph{Orientation} section for more detail.} \item{geom, stat}{Use to override the default connection between \code{geom_histogram()}/\code{geom_freqpoly()} and \code{stat_bin()}. For more information diff --git a/man/geom_linerange.Rd b/man/geom_linerange.Rd index 2d8eadcdb5..7757d1ce23 100644 --- a/man/geom_linerange.Rd +++ b/man/geom_linerange.Rd @@ -155,7 +155,10 @@ middle point in \code{geom_pointrange()}.} \item{na.rm}{If \code{FALSE}, the default, missing values are removed with a warning. If \code{TRUE}, missing values are silently removed.} -\item{orientation}{The orientation of the layer. The default (\code{NA}) automatically determines the orientation from the aesthetic mapping. In the rare event that this fails it can be given explicitly by setting \code{orientation} to either \code{"x"}` or \code{"y"}. See the \emph{Orientation} section for more detail.} +\item{orientation}{The orientation of the layer. The default (\code{NA}) automatically determines the +orientation from the aesthetic mapping. In the rare event that this fails it +can be given explicitly by setting \code{orientation} to either \code{"x"} or \code{"y"}. +See the \emph{Orientation} section for more detail.} \item{show.legend}{Logical. Should this layer be included in the legends? \code{NA}, the default, includes if any aesthetics are mapped. \code{FALSE} never includes, and \code{TRUE} @@ -168,8 +171,6 @@ unobserved levels are omitted.} them. This is most useful for helper functions that define both data and aesthetics and shouldn't inherit behaviour from the default plot specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} - -\item{lineend}{Line end style (round, butt, square).} } \description{ Various ways of representing a vertical interval defined by \code{x}, diff --git a/man/geom_path.Rd b/man/geom_path.Rd index dd7d768db6..de2a87b737 100644 --- a/man/geom_path.Rd +++ b/man/geom_path.Rd @@ -153,7 +153,10 @@ them. This is most useful for helper functions that define both data and aesthetics and shouldn't inherit behaviour from the default plot specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} -\item{orientation}{The orientation of the layer. The default (\code{NA}) automatically determines the orientation from the aesthetic mapping. In the rare event that this fails it can be given explicitly by setting \code{orientation} to either \code{"x"}` or \code{"y"}. See the \emph{Orientation} section for more detail.} +\item{orientation}{The orientation of the layer. The default (\code{NA}) automatically determines the +orientation from the aesthetic mapping. In the rare event that this fails it +can be given explicitly by setting \code{orientation} to either \code{"x"} or \code{"y"}. +See the \emph{Orientation} section for more detail.} \item{direction}{direction of stairs: 'vh' for vertical then horizontal, 'hv' for horizontal then vertical, or 'mid' for step half-way between diff --git a/man/geom_ribbon.Rd b/man/geom_ribbon.Rd index de2d0ccbc7..a5e8c1900b 100644 --- a/man/geom_ribbon.Rd +++ b/man/geom_ribbon.Rd @@ -119,11 +119,10 @@ which parameters it can accept. \link[=draw_key]{key glyphs}, to change the display of the layer in the legend. }} -\item{orientation}{The orientation of the layer. The default (\code{NA}) automatically determines the orientation from the aesthetic mapping. In the rare event that this fails it can be given explicitly by setting \code{orientation} to either \code{"x"}` or \code{"y"}. See the \emph{Orientation} section for more detail.} - -\item{lineend}{Line end style (round, butt, square).} - -\item{linejoin}{Line join style (round, mitre, bevel).} +\item{orientation}{The orientation of the layer. The default (\code{NA}) automatically determines the +orientation from the aesthetic mapping. In the rare event that this fails it +can be given explicitly by setting \code{orientation} to either \code{"x"} or \code{"y"}. +See the \emph{Orientation} section for more detail.} \item{linemitre}{Line mitre limit (number greater than 1).} diff --git a/man/geom_smooth.Rd b/man/geom_smooth.Rd index 53b33760f8..1857b68401 100644 --- a/man/geom_smooth.Rd +++ b/man/geom_smooth.Rd @@ -126,7 +126,10 @@ observations and \code{formula = y ~ s(x, bs = "cs")} otherwise.} \item{na.rm}{If \code{FALSE}, the default, missing values are removed with a warning. If \code{TRUE}, missing values are silently removed.} -\item{orientation}{The orientation of the layer. The default (\code{NA}) automatically determines the orientation from the aesthetic mapping. In the rare event that this fails it can be given explicitly by setting \code{orientation} to either \code{"x"}` or \code{"y"}. See the \emph{Orientation} section for more detail.} +\item{orientation}{The orientation of the layer. The default (\code{NA}) automatically determines the +orientation from the aesthetic mapping. In the rare event that this fails it +can be given explicitly by setting \code{orientation} to either \code{"x"} or \code{"y"}. +See the \emph{Orientation} section for more detail.} \item{show.legend}{Logical. Should this layer be included in the legends? \code{NA}, the default, includes if any aesthetics are mapped. \code{FALSE} never includes, and \code{TRUE} diff --git a/man/geom_violin.Rd b/man/geom_violin.Rd index 3c38fc1e9a..c40579fd19 100644 --- a/man/geom_violin.Rd +++ b/man/geom_violin.Rd @@ -126,7 +126,10 @@ observations. If "width", all violins have the same maximum width.} \item{na.rm}{If \code{FALSE}, the default, missing values are removed with a warning. If \code{TRUE}, missing values are silently removed.} -\item{orientation}{The orientation of the layer. The default (\code{NA}) automatically determines the orientation from the aesthetic mapping. In the rare event that this fails it can be given explicitly by setting \code{orientation} to either \code{"x"}` or \code{"y"}. See the \emph{Orientation} section for more detail.} +\item{orientation}{The orientation of the layer. The default (\code{NA}) automatically determines the +orientation from the aesthetic mapping. In the rare event that this fails it +can be given explicitly by setting \code{orientation} to either \code{"x"} or \code{"y"}. +See the \emph{Orientation} section for more detail.} \item{show.legend}{Logical. Should this layer be included in the legends? \code{NA}, the default, includes if any aesthetics are mapped. \code{FALSE} never includes, and \code{TRUE} diff --git a/man/shared_layer_parameters.Rd b/man/shared_layer_parameters.Rd index 3cab292d63..1468c75d54 100644 --- a/man/shared_layer_parameters.Rd +++ b/man/shared_layer_parameters.Rd @@ -100,6 +100,11 @@ which parameters it can accept. \code{...}. This can be one of the functions described as \link[=draw_key]{key glyphs}, to change the display of the layer in the legend. }} + +\item{orientation}{The orientation of the layer. The default (\code{NA}) automatically determines the +orientation from the aesthetic mapping. In the rare event that this fails it +can be given explicitly by setting \code{orientation} to either \code{"x"} or \code{"y"}. +See the \emph{Orientation} section for more detail.} } \description{ This is a central place for describing typical layer parameters. diff --git a/man/stat_summary.Rd b/man/stat_summary.Rd index 46eea1b8ea..ace62b25ee 100644 --- a/man/stat_summary.Rd +++ b/man/stat_summary.Rd @@ -147,7 +147,10 @@ boundaries. Overrides \code{binwidth} and \code{bins}.} \item{na.rm}{If \code{FALSE}, the default, missing values are removed with a warning. If \code{TRUE}, missing values are silently removed.} -\item{orientation}{The orientation of the layer. The default (\code{NA}) automatically determines the orientation from the aesthetic mapping. In the rare event that this fails it can be given explicitly by setting \code{orientation} to either \code{"x"}` or \code{"y"}. See the \emph{Orientation} section for more detail.} +\item{orientation}{The orientation of the layer. The default (\code{NA}) automatically determines the +orientation from the aesthetic mapping. In the rare event that this fails it +can be given explicitly by setting \code{orientation} to either \code{"x"} or \code{"y"}. +See the \emph{Orientation} section for more detail.} \item{show.legend}{Logical. Should this layer be included in the legends? \code{NA}, the default, includes if any aesthetics are mapped. \code{FALSE} never includes, and \code{TRUE} From e36e034eeb8a22749f60e18db85a06bff582ba4a Mon Sep 17 00:00:00 2001 From: Teun van den Brand Date: Wed, 5 Nov 2025 15:50:28 +0100 Subject: [PATCH 4/6] replace `rd_orientation()` with `@inheritSection` --- R/geom-bar.R | 2 +- R/geom-boxplot.R | 2 +- R/geom-density.R | 2 +- R/geom-histogram.R | 2 +- R/geom-linerange.R | 2 +- R/geom-path.R | 2 +- R/geom-ribbon.R | 2 +- R/geom-smooth.R | 2 +- R/geom-violin.R | 2 +- R/layer.R | 11 +++++++++++ R/stat-summary.R | 2 +- R/utilities-help.R | 15 ++------------- man/geom_bar.Rd | 18 +++++++++++++----- man/geom_boxplot.Rd | 18 +++++++++++++----- man/geom_density.Rd | 18 +++++++++++++----- man/geom_histogram.Rd | 18 +++++++++++++----- man/geom_linerange.Rd | 10 +++++++++- man/geom_path.Rd | 18 +++++++++++++----- man/geom_ribbon.Rd | 10 +++++++++- man/geom_smooth.Rd | 18 +++++++++++++----- man/geom_violin.Rd | 18 +++++++++++++----- man/shared_layer_parameters.Rd | 15 ++++++++++++++- man/stat_summary.Rd | 18 +++++++++++++----- 23 files changed, 159 insertions(+), 66 deletions(-) diff --git a/R/geom-bar.R b/R/geom-bar.R index 30061d5089..88783022d5 100644 --- a/R/geom-bar.R +++ b/R/geom-bar.R @@ -66,7 +66,7 @@ GeomBar <- ggproto( #' [position_fill()] shows relative proportions at each `x` by stacking the #' bars and then standardising each bar to have the same height. #' -#' @eval rd_orientation() +#' @inheritSection shared_layer_parameters Orientation #' #' @aesthetics GeomBar #' @aesthetics GeomCol diff --git a/R/geom-boxplot.R b/R/geom-boxplot.R index d2edbdd11b..1490f80557 100644 --- a/R/geom-boxplot.R +++ b/R/geom-boxplot.R @@ -4,7 +4,7 @@ #' It visualises five summary statistics (the median, two hinges #' and two whiskers), and all "outlying" points individually. #' -#' @eval rd_orientation() +#' @inheritSection shared_layer_parameters Orientation #' #' @section Summary statistics: #' The lower and upper hinges correspond to the first and third quartiles diff --git a/R/geom-density.R b/R/geom-density.R index ba7b81375a..1d1fde37b8 100644 --- a/R/geom-density.R +++ b/R/geom-density.R @@ -21,7 +21,7 @@ GeomDensity <- ggproto( #' the histogram. This is a useful alternative to the histogram for continuous #' data that comes from an underlying smooth distribution. #' -#' @eval rd_orientation() +#' @inheritSection shared_layer_parameters Orientation #' @aesthetics GeomDensity #' @seealso See [geom_histogram()], [geom_freqpoly()] for #' other methods of displaying continuous distribution. diff --git a/R/geom-histogram.R b/R/geom-histogram.R index 5c623fe820..90778d85a8 100644 --- a/R/geom-histogram.R +++ b/R/geom-histogram.R @@ -27,7 +27,7 @@ #' `scale_x_binned()` with [geom_bar()]. This method by default plots tick marks #' in between each bar. #' -#' @eval rd_orientation() +#' @inheritSection shared_layer_parameters Orientation #' #' @section Aesthetics: #' `geom_histogram()` uses the same aesthetics as [geom_bar()]; diff --git a/R/geom-linerange.R b/R/geom-linerange.R index 808b547962..e8d7f0985d 100644 --- a/R/geom-linerange.R +++ b/R/geom-linerange.R @@ -42,7 +42,7 @@ GeomLinerange <- ggproto( #' Various ways of representing a vertical interval defined by `x`, #' `ymin` and `ymax`. Each case draws a single graphical object. #' -#' @eval rd_orientation() +#' @inheritSection shared_layer_parameters Orientation #' #' @aesthetics GeomLinerange #' Note that `geom_pointrange()` also understands `size` for the size of the points. diff --git a/R/geom-path.R b/R/geom-path.R index 2e10562e38..d6773ed170 100644 --- a/R/geom-path.R +++ b/R/geom-path.R @@ -178,7 +178,7 @@ GeomStep <- ggproto( #' An alternative parameterisation is [geom_segment()], where each line #' corresponds to a single case which provides the start and end coordinates. #' -#' @eval rd_orientation() +#' @inheritSection shared_layer_parameters Orientation #' #' @aesthetics GeomPath #' @inheritParams shared_layer_parameters diff --git a/R/geom-ribbon.R b/R/geom-ribbon.R index 32a8b35a9b..7752fb2510 100644 --- a/R/geom-ribbon.R +++ b/R/geom-ribbon.R @@ -241,7 +241,7 @@ GeomArea <- ggproto("GeomArea", GeomRibbon, #' of x-coordinates. To turn off this interpolation, `stat = "identity"` can #' be used instead. #' -#' @eval rd_orientation() +#' @inheritSection shared_layer_parameters Orientation #' #' @aesthetics GeomRibbon #' @seealso diff --git a/R/geom-smooth.R b/R/geom-smooth.R index 56962eae5d..89fcb2dcdb 100644 --- a/R/geom-smooth.R +++ b/R/geom-smooth.R @@ -74,7 +74,7 @@ GeomSmooth <- ggproto( #' `glm()`, where the normal confidence band is constructed on the link #' scale and then back-transformed to the response scale. #' -#' @eval rd_orientation() +#' @inheritSection shared_layer_parameters Orientation #' #' @aesthetics GeomSmooth #' @inheritParams shared_layer_parameters diff --git a/R/geom-violin.R b/R/geom-violin.R index 59bca962cd..821b0de426 100644 --- a/R/geom-violin.R +++ b/R/geom-violin.R @@ -5,7 +5,7 @@ #' violin plot is a mirrored density plot displayed in the same way as a #' boxplot. #' -#' @eval rd_orientation() +#' @inheritSection shared_layer_parameters Orientation #' #' @aesthetics GeomViolin #' @inheritParams shared_layer_parameters diff --git a/R/layer.R b/R/layer.R index d4f470c270..6db838ea57 100644 --- a/R/layer.R +++ b/R/layer.R @@ -107,6 +107,17 @@ #' can be given explicitly by setting `orientation` to either `"x"` or `"y"`. #' See the *Orientation* section for more detail. #' +#' @section Orientation: +#' This geom treats each axis differently and, thus, can thus have two +#' orientations. Often the orientation is easy to deduce from a combination of +#' the given mappings and the types of positional scales in use. Thus, ggplot2 +#' will by default try to guess which orientation the layer should have. Under +#' rare circumstances, the orientation is ambiguous and guessing may fail. In +#' that case the orientation can be specified directly using the `orientation` +#' parameter, which can be either `"x"` or `"y"`. The value gives the axis that +#' the geom should run along, `"x"` being the default orientation you would +#' expect for the geom. +#' #' @keywords internal #' @aliases NULL NULL diff --git a/R/stat-summary.R b/R/stat-summary.R index 540e745ea2..c3e32a2ea7 100644 --- a/R/stat-summary.R +++ b/R/stat-summary.R @@ -5,7 +5,7 @@ #' [stat_bin()]: instead of just counting, they can compute any #' aggregate. #' -#' @eval rd_orientation() +#' @inheritSection shared_layer_parameters Orientation #' #' @aesthetics StatSummary #' @seealso [geom_errorbar()], [geom_pointrange()], diff --git a/R/utilities-help.R b/R/utilities-help.R index d0c0a15576..2c89b87df4 100644 --- a/R/utilities-help.R +++ b/R/utilities-help.R @@ -87,19 +87,8 @@ rd_match_docpage <- function(aes) { } rd_orientation <- function() { - c( - "@section Orientation: ", - paste( - 'This geom treats each axis differently and, thus, can thus have two orientations.', - 'Often the orientation is easy to deduce from a combination of the given', - 'mappings and the types of positional scales in use. Thus, ggplot2 will by', - 'default try to guess which orientation the layer should have. Under rare', - 'circumstances, the orientation is ambiguous and guessing may fail. In that', - 'case the orientation can be specified directly using the \\code{orientation} parameter,', - 'which can be either \\code{"x"} or \\code{"y"}. The value gives the axis that the geom', - 'should run along, \\code{"x"} being the default orientation you would expect for the geom.' - ) - ) + # This function is vestigial. It exists only not to break dependencies. + "@inheritSection ggplot2::shared_layer_parameters Orientation" } #' Format 'Computed variables' section diff --git a/man/geom_bar.Rd b/man/geom_bar.Rd index 2ac698ee15..aed68d482d 100644 --- a/man/geom_bar.Rd +++ b/man/geom_bar.Rd @@ -163,11 +163,6 @@ side-to-side, use \code{\link[=position_dodge]{position_dodge()}} or \code{\link \code{\link[=position_fill]{position_fill()}} shows relative proportions at each \code{x} by stacking the bars and then standardising each bar to have the same height. } -\section{Orientation}{ - -This geom treats each axis differently and, thus, can thus have two orientations. Often the orientation is easy to deduce from a combination of the given mappings and the types of positional scales in use. Thus, ggplot2 will by default try to guess which orientation the layer should have. Under rare circumstances, the orientation is ambiguous and guessing may fail. In that case the orientation can be specified directly using the \code{orientation} parameter, which can be either \code{"x"} or \code{"y"}. The value gives the axis that the geom should run along, \code{"x"} being the default orientation you would expect for the geom. -} - \section{Computed variables}{ These are calculated by the 'stat' part of layers and can be accessed with \link[=aes_eval]{delayed evaluation}. @@ -177,6 +172,19 @@ These are calculated by the 'stat' part of layers and can be accessed with \link } } +\section{Orientation}{ + +This geom treats each axis differently and, thus, can thus have two +orientations. Often the orientation is easy to deduce from a combination of +the given mappings and the types of positional scales in use. Thus, ggplot2 +will by default try to guess which orientation the layer should have. Under +rare circumstances, the orientation is ambiguous and guessing may fail. In +that case the orientation can be specified directly using the \code{orientation} +parameter, which can be either \code{"x"} or \code{"y"}. The value gives the axis that +the geom should run along, \code{"x"} being the default orientation you would +expect for the geom. +} + \examples{ # geom_bar is designed to make it easy to create bar charts that show # counts (or sums of weights) diff --git a/man/geom_boxplot.Rd b/man/geom_boxplot.Rd index 26b034324f..cb17ed5ffe 100644 --- a/man/geom_boxplot.Rd +++ b/man/geom_boxplot.Rd @@ -190,11 +190,6 @@ and two whiskers), and all "outlying" points individually. In the unlikely event you specify both US and UK spellings of colour, the US spelling will take precedence. } -\section{Orientation}{ - -This geom treats each axis differently and, thus, can thus have two orientations. Often the orientation is easy to deduce from a combination of the given mappings and the types of positional scales in use. Thus, ggplot2 will by default try to guess which orientation the layer should have. Under rare circumstances, the orientation is ambiguous and guessing may fail. In that case the orientation can be specified directly using the \code{orientation} parameter, which can be either \code{"x"} or \code{"y"}. The value gives the axis that the geom should run along, \code{"x"} being the default orientation you would expect for the geom. -} - \section{Summary statistics}{ The lower and upper hinges correspond to the first and third quartiles @@ -230,6 +225,19 @@ These are calculated by the 'stat' part of layers and can be accessed with \link } } +\section{Orientation}{ + +This geom treats each axis differently and, thus, can thus have two +orientations. Often the orientation is easy to deduce from a combination of +the given mappings and the types of positional scales in use. Thus, ggplot2 +will by default try to guess which orientation the layer should have. Under +rare circumstances, the orientation is ambiguous and guessing may fail. In +that case the orientation can be specified directly using the \code{orientation} +parameter, which can be either \code{"x"} or \code{"y"}. The value gives the axis that +the geom should run along, \code{"x"} being the default orientation you would +expect for the geom. +} + \examples{ p <- ggplot(mpg, aes(class, hwy)) p + geom_boxplot() diff --git a/man/geom_density.Rd b/man/geom_density.Rd index af06481290..ecaa32c4fb 100644 --- a/man/geom_density.Rd +++ b/man/geom_density.Rd @@ -160,11 +160,6 @@ Computes and draws kernel density estimate, which is a smoothed version of the histogram. This is a useful alternative to the histogram for continuous data that comes from an underlying smooth distribution. } -\section{Orientation}{ - -This geom treats each axis differently and, thus, can thus have two orientations. Often the orientation is easy to deduce from a combination of the given mappings and the types of positional scales in use. Thus, ggplot2 will by default try to guess which orientation the layer should have. Under rare circumstances, the orientation is ambiguous and guessing may fail. In that case the orientation can be specified directly using the \code{orientation} parameter, which can be either \code{"x"} or \code{"y"}. The value gives the axis that the geom should run along, \code{"x"} being the default orientation you would expect for the geom. -} - \section{Computed variables}{ These are calculated by the 'stat' part of layers and can be accessed with \link[=aes_eval]{delayed evaluation}. @@ -178,6 +173,19 @@ These are calculated by the 'stat' part of layers and can be accessed with \link } } +\section{Orientation}{ + +This geom treats each axis differently and, thus, can thus have two +orientations. Often the orientation is easy to deduce from a combination of +the given mappings and the types of positional scales in use. Thus, ggplot2 +will by default try to guess which orientation the layer should have. Under +rare circumstances, the orientation is ambiguous and guessing may fail. In +that case the orientation can be specified directly using the \code{orientation} +parameter, which can be either \code{"x"} or \code{"y"}. The value gives the axis that +the geom should run along, \code{"x"} being the default orientation you would +expect for the geom. +} + \examples{ ggplot(diamonds, aes(carat)) + geom_density() diff --git a/man/geom_histogram.Rd b/man/geom_histogram.Rd index b62c5c9c8e..ef3b7e2511 100644 --- a/man/geom_histogram.Rd +++ b/man/geom_histogram.Rd @@ -205,11 +205,6 @@ In addition to \code{geom_histogram()}, you can create a histogram plot by using \code{scale_x_binned()} with \code{\link[=geom_bar]{geom_bar()}}. This method by default plots tick marks in between each bar. } -\section{Orientation}{ - -This geom treats each axis differently and, thus, can thus have two orientations. Often the orientation is easy to deduce from a combination of the given mappings and the types of positional scales in use. Thus, ggplot2 will by default try to guess which orientation the layer should have. Under rare circumstances, the orientation is ambiguous and guessing may fail. In that case the orientation can be specified directly using the \code{orientation} parameter, which can be either \code{"x"} or \code{"y"}. The value gives the axis that the geom should run along, \code{"x"} being the default orientation you would expect for the geom. -} - \section{Aesthetics}{ \code{geom_histogram()} uses the same aesthetics as \code{\link[=geom_bar]{geom_bar()}}; @@ -235,6 +230,19 @@ These are calculated by the 'stat' part of layers and can be accessed with \link } } +\section{Orientation}{ + +This geom treats each axis differently and, thus, can thus have two +orientations. Often the orientation is easy to deduce from a combination of +the given mappings and the types of positional scales in use. Thus, ggplot2 +will by default try to guess which orientation the layer should have. Under +rare circumstances, the orientation is ambiguous and guessing may fail. In +that case the orientation can be specified directly using the \code{orientation} +parameter, which can be either \code{"x"} or \code{"y"}. The value gives the axis that +the geom should run along, \code{"x"} being the default orientation you would +expect for the geom. +} + \examples{ ggplot(diamonds, aes(carat)) + geom_histogram() diff --git a/man/geom_linerange.Rd b/man/geom_linerange.Rd index 7757d1ce23..7af4d653e9 100644 --- a/man/geom_linerange.Rd +++ b/man/geom_linerange.Rd @@ -182,7 +182,15 @@ Various ways of representing a vertical interval defined by \code{x}, } \section{Orientation}{ -This geom treats each axis differently and, thus, can thus have two orientations. Often the orientation is easy to deduce from a combination of the given mappings and the types of positional scales in use. Thus, ggplot2 will by default try to guess which orientation the layer should have. Under rare circumstances, the orientation is ambiguous and guessing may fail. In that case the orientation can be specified directly using the \code{orientation} parameter, which can be either \code{"x"} or \code{"y"}. The value gives the axis that the geom should run along, \code{"x"} being the default orientation you would expect for the geom. +This geom treats each axis differently and, thus, can thus have two +orientations. Often the orientation is easy to deduce from a combination of +the given mappings and the types of positional scales in use. Thus, ggplot2 +will by default try to guess which orientation the layer should have. Under +rare circumstances, the orientation is ambiguous and guessing may fail. In +that case the orientation can be specified directly using the \code{orientation} +parameter, which can be either \code{"x"} or \code{"y"}. The value gives the axis that +the geom should run along, \code{"x"} being the default orientation you would +expect for the geom. } \examples{ diff --git a/man/geom_path.Rd b/man/geom_path.Rd index de2a87b737..006e46f1f2 100644 --- a/man/geom_path.Rd +++ b/man/geom_path.Rd @@ -173,11 +173,6 @@ connected together. An alternative parameterisation is \code{\link[=geom_segment]{geom_segment()}}, where each line corresponds to a single case which provides the start and end coordinates. } -\section{Orientation}{ - -This geom treats each axis differently and, thus, can thus have two orientations. Often the orientation is easy to deduce from a combination of the given mappings and the types of positional scales in use. Thus, ggplot2 will by default try to guess which orientation the layer should have. Under rare circumstances, the orientation is ambiguous and guessing may fail. In that case the orientation can be specified directly using the \code{orientation} parameter, which can be either \code{"x"} or \code{"y"}. The value gives the axis that the geom should run along, \code{"x"} being the default orientation you would expect for the geom. -} - \section{Missing value handling}{ \code{geom_path()}, \code{geom_line()}, and \code{geom_step()} handle \code{NA} as follows: @@ -191,6 +186,19 @@ the \code{NA} is removed silently, without warning. } } +\section{Orientation}{ + +This geom treats each axis differently and, thus, can thus have two +orientations. Often the orientation is easy to deduce from a combination of +the given mappings and the types of positional scales in use. Thus, ggplot2 +will by default try to guess which orientation the layer should have. Under +rare circumstances, the orientation is ambiguous and guessing may fail. In +that case the orientation can be specified directly using the \code{orientation} +parameter, which can be either \code{"x"} or \code{"y"}. The value gives the axis that +the geom should run along, \code{"x"} being the default orientation you would +expect for the geom. +} + \examples{ # geom_line() is suitable for time series ggplot(economics, aes(date, unemploy)) + geom_line() diff --git a/man/geom_ribbon.Rd b/man/geom_ribbon.Rd index a5e8c1900b..3be6ec0036 100644 --- a/man/geom_ribbon.Rd +++ b/man/geom_ribbon.Rd @@ -177,7 +177,15 @@ be used instead. } \section{Orientation}{ -This geom treats each axis differently and, thus, can thus have two orientations. Often the orientation is easy to deduce from a combination of the given mappings and the types of positional scales in use. Thus, ggplot2 will by default try to guess which orientation the layer should have. Under rare circumstances, the orientation is ambiguous and guessing may fail. In that case the orientation can be specified directly using the \code{orientation} parameter, which can be either \code{"x"} or \code{"y"}. The value gives the axis that the geom should run along, \code{"x"} being the default orientation you would expect for the geom. +This geom treats each axis differently and, thus, can thus have two +orientations. Often the orientation is easy to deduce from a combination of +the given mappings and the types of positional scales in use. Thus, ggplot2 +will by default try to guess which orientation the layer should have. Under +rare circumstances, the orientation is ambiguous and guessing may fail. In +that case the orientation can be specified directly using the \code{orientation} +parameter, which can be either \code{"x"} or \code{"y"}. The value gives the axis that +the geom should run along, \code{"x"} being the default orientation you would +expect for the geom. } \examples{ diff --git a/man/geom_smooth.Rd b/man/geom_smooth.Rd index 1857b68401..e6b31c7a8a 100644 --- a/man/geom_smooth.Rd +++ b/man/geom_smooth.Rd @@ -183,11 +183,6 @@ exceptions are \code{loess()}, which uses a t-based approximation, and \code{glm()}, where the normal confidence band is constructed on the link scale and then back-transformed to the response scale. } -\section{Orientation}{ - -This geom treats each axis differently and, thus, can thus have two orientations. Often the orientation is easy to deduce from a combination of the given mappings and the types of positional scales in use. Thus, ggplot2 will by default try to guess which orientation the layer should have. Under rare circumstances, the orientation is ambiguous and guessing may fail. In that case the orientation can be specified directly using the \code{orientation} parameter, which can be either \code{"x"} or \code{"y"}. The value gives the axis that the geom should run along, \code{"x"} being the default orientation you would expect for the geom. -} - \section{Computed variables}{ These are calculated by the 'stat' part of layers and can be accessed with \link[=aes_eval]{delayed evaluation}. \code{stat_smooth()} provides the following variables, some of which depend on the orientation: @@ -199,6 +194,19 @@ These are calculated by the 'stat' part of layers and can be accessed with \link } } +\section{Orientation}{ + +This geom treats each axis differently and, thus, can thus have two +orientations. Often the orientation is easy to deduce from a combination of +the given mappings and the types of positional scales in use. Thus, ggplot2 +will by default try to guess which orientation the layer should have. Under +rare circumstances, the orientation is ambiguous and guessing may fail. In +that case the orientation can be specified directly using the \code{orientation} +parameter, which can be either \code{"x"} or \code{"y"}. The value gives the axis that +the geom should run along, \code{"x"} being the default orientation you would +expect for the geom. +} + \examples{ ggplot(mpg, aes(displ, hwy)) + geom_point() + diff --git a/man/geom_violin.Rd b/man/geom_violin.Rd index c40579fd19..cba7d21064 100644 --- a/man/geom_violin.Rd +++ b/man/geom_violin.Rd @@ -176,11 +176,6 @@ blend of \code{\link[=geom_boxplot]{geom_boxplot()}} and \code{\link[=geom_densi violin plot is a mirrored density plot displayed in the same way as a boxplot. } -\section{Orientation}{ - -This geom treats each axis differently and, thus, can thus have two orientations. Often the orientation is easy to deduce from a combination of the given mappings and the types of positional scales in use. Thus, ggplot2 will by default try to guess which orientation the layer should have. Under rare circumstances, the orientation is ambiguous and guessing may fail. In that case the orientation can be specified directly using the \code{orientation} parameter, which can be either \code{"x"} or \code{"y"}. The value gives the axis that the geom should run along, \code{"x"} being the default orientation you would expect for the geom. -} - \section{Computed variables}{ These are calculated by the 'stat' part of layers and can be accessed with \link[=aes_eval]{delayed evaluation}. @@ -195,6 +190,19 @@ These are calculated by the 'stat' part of layers and can be accessed with \link } } +\section{Orientation}{ + +This geom treats each axis differently and, thus, can thus have two +orientations. Often the orientation is easy to deduce from a combination of +the given mappings and the types of positional scales in use. Thus, ggplot2 +will by default try to guess which orientation the layer should have. Under +rare circumstances, the orientation is ambiguous and guessing may fail. In +that case the orientation can be specified directly using the \code{orientation} +parameter, which can be either \code{"x"} or \code{"y"}. The value gives the axis that +the geom should run along, \code{"x"} being the default orientation you would +expect for the geom. +} + \examples{ p <- ggplot(mtcars, aes(factor(cyl), mpg)) p + geom_violin() diff --git a/man/shared_layer_parameters.Rd b/man/shared_layer_parameters.Rd index 1468c75d54..af47c4fe01 100644 --- a/man/shared_layer_parameters.Rd +++ b/man/shared_layer_parameters.Rd @@ -1,7 +1,6 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/layer.R \name{shared_layer_parameters} -\alias{shared_layer_parameters} \title{Shared layer parameters} \arguments{ \item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}}. If specified and \code{inherit.aes = TRUE} (the default), it is combined with the default mapping at the top level @@ -110,3 +109,17 @@ See the \emph{Orientation} section for more detail.} This is a central place for describing typical layer parameters. It prevents cluttered definitions all over the place. } +\section{Orientation}{ + +This geom treats each axis differently and, thus, can thus have two +orientations. Often the orientation is easy to deduce from a combination of +the given mappings and the types of positional scales in use. Thus, ggplot2 +will by default try to guess which orientation the layer should have. Under +rare circumstances, the orientation is ambiguous and guessing may fail. In +that case the orientation can be specified directly using the \code{orientation} +parameter, which can be either \code{"x"} or \code{"y"}. The value gives the axis that +the geom should run along, \code{"x"} being the default orientation you would +expect for the geom. +} + +\keyword{internal} diff --git a/man/stat_summary.Rd b/man/stat_summary.Rd index ace62b25ee..67a8e592c4 100644 --- a/man/stat_summary.Rd +++ b/man/stat_summary.Rd @@ -173,11 +173,6 @@ operates on binned \code{x} or \code{y}. They are more flexible versions of \code{\link[=stat_bin]{stat_bin()}}: instead of just counting, they can compute any aggregate. } -\section{Orientation}{ - -This geom treats each axis differently and, thus, can thus have two orientations. Often the orientation is easy to deduce from a combination of the given mappings and the types of positional scales in use. Thus, ggplot2 will by default try to guess which orientation the layer should have. Under rare circumstances, the orientation is ambiguous and guessing may fail. In that case the orientation can be specified directly using the \code{orientation} parameter, which can be either \code{"x"} or \code{"y"}. The value gives the axis that the geom should run along, \code{"x"} being the default orientation you would expect for the geom. -} - \section{Summary functions}{ You can either supply summary functions individually (\code{fun}, @@ -207,6 +202,19 @@ If no aggregation functions are supplied, will default to \code{\link[=mean_se]{mean_se()}}. } +\section{Orientation}{ + +This geom treats each axis differently and, thus, can thus have two +orientations. Often the orientation is easy to deduce from a combination of +the given mappings and the types of positional scales in use. Thus, ggplot2 +will by default try to guess which orientation the layer should have. Under +rare circumstances, the orientation is ambiguous and guessing may fail. In +that case the orientation can be specified directly using the \code{orientation} +parameter, which can be either \code{"x"} or \code{"y"}. The value gives the axis that +the geom should run along, \code{"x"} being the default orientation you would +expect for the geom. +} + \examples{ d <- ggplot(mtcars, aes(cyl, mpg)) + geom_point() d + stat_summary(fun.data = "mean_cl_boot", colour = "red", linewidth = 2, size = 3) From e20e1a2f69e1c158fe4c128bbccc127bb840f954 Mon Sep 17 00:00:00 2001 From: Teun van den Brand Date: Wed, 5 Nov 2025 16:10:04 +0100 Subject: [PATCH 5/6] canonise line params --- R/geom-bar.R | 2 -- R/geom-bin2d.R | 2 -- R/geom-hex.R | 3 --- R/geom-path.R | 3 --- R/geom-polygon.R | 3 --- R/geom-ribbon.R | 1 - R/geom-rug.R | 1 - R/geom-segment.R | 2 -- R/layer.R | 11 ++++++++++- man/annotation_borders.Rd | 6 +++--- man/geom_bar.Rd | 4 ++-- man/geom_bin_2d.Rd | 4 ++-- man/geom_contour.Rd | 6 +++--- man/geom_density.Rd | 6 +++++- man/geom_density_2d.Rd | 6 +++--- man/geom_function.Rd | 6 +++--- man/geom_hex.Rd | 6 +++--- man/geom_histogram.Rd | 4 ++++ man/geom_linerange.Rd | 2 ++ man/geom_path.Rd | 6 +++--- man/geom_polygon.Rd | 6 +++--- man/geom_quantile.Rd | 6 +++--- man/geom_ribbon.Rd | 6 +++++- man/geom_rug.Rd | 2 +- man/geom_segment.Rd | 4 ++-- man/geom_spoke.Rd | 4 ++-- man/geom_tile.Rd | 4 ++-- man/shared_layer_parameters.Rd | 6 ++++++ 28 files changed, 67 insertions(+), 55 deletions(-) diff --git a/R/geom-bar.R b/R/geom-bar.R index 88783022d5..219223cda4 100644 --- a/R/geom-bar.R +++ b/R/geom-bar.R @@ -85,8 +85,6 @@ GeomBar <- ggproto( #' @param geom,stat Override the default connection between `geom_bar()` and #' `stat_count()`. For more information about overriding these connections, #' see how the [stat][layer_stats] and [geom][layer_geoms] arguments work. -#' @param lineend Line end style (round, butt, square). -#' @param linejoin Line join style (round, mitre, bevel). #' @examples #' # geom_bar is designed to make it easy to create bar charts that show #' # counts (or sums of weights) diff --git a/R/geom-bin2d.R b/R/geom-bin2d.R index a5ff23d788..dba95a3cf9 100644 --- a/R/geom-bin2d.R +++ b/R/geom-bin2d.R @@ -22,8 +22,6 @@ GeomBin2d <- ggproto("GeomBin2d", GeomTile) #' `geom_bin_2d()` and `stat_bin_2d()`. For more information about overriding #' these connections, see how the [stat][layer_stats] and [geom][layer_geoms] #' arguments work. -#' @param lineend Line end style (round, butt, square). -#' @param linejoin Line join style (round, mitre, bevel). #' @seealso [stat_bin_hex()] for hexagonal binning #' @examples #' d <- ggplot(diamonds, aes(x, y)) + xlim(4, 10) + ylim(4, 10) diff --git a/R/geom-hex.R b/R/geom-hex.R index ea30799b60..9cef38c47c 100644 --- a/R/geom-hex.R +++ b/R/geom-hex.R @@ -81,9 +81,6 @@ GeomHex <- ggproto("GeomHex", Geom, #' see how the [stat][layer_stats] and [geom][layer_geoms] arguments work. #' @export #' @inheritParams shared_layer_parameters -#' @param lineend Line end style (round, butt, square). -#' @param linejoin Line join style (round, mitre, bevel). -#' @param linemitre Line mitre limit (number greater than 1). #' @export #' @examples #' d <- ggplot(diamonds, aes(carat, price)) diff --git a/R/geom-path.R b/R/geom-path.R index d6773ed170..b95b67b936 100644 --- a/R/geom-path.R +++ b/R/geom-path.R @@ -182,9 +182,6 @@ GeomStep <- ggproto( #' #' @aesthetics GeomPath #' @inheritParams shared_layer_parameters -#' @param lineend Line end style (round, butt, square). -#' @param linejoin Line join style (round, mitre, bevel). -#' @param linemitre Line mitre limit (number greater than 1). #' @param arrow Arrow specification, as created by [grid::arrow()]. #' @param arrow.fill fill colour to use for the arrow head (if closed). `NULL` #' means use `colour` aesthetic. diff --git a/R/geom-polygon.R b/R/geom-polygon.R index fc2a7fd441..fcbbe22711 100644 --- a/R/geom-polygon.R +++ b/R/geom-polygon.R @@ -106,9 +106,6 @@ GeomPolygon <- ggproto("GeomPolygon", Geom, #' [geom_ribbon()] for a polygon anchored on the x-axis #' @export #' @inheritParams shared_layer_parameters -#' @param lineend Line end style (round, butt, square). -#' @param linejoin Line join style (round, mitre, bevel). -#' @param linemitre Line mitre limit (number greater than 1). #' @param rule Either `"evenodd"` or `"winding"`. If polygons with holes are #' being drawn (using the `subgroup` aesthetic) this argument defines how the #' hole coordinates are interpreted. See the examples in [grid::pathGrob()] for diff --git a/R/geom-ribbon.R b/R/geom-ribbon.R index 7752fb2510..2072c3abc3 100644 --- a/R/geom-ribbon.R +++ b/R/geom-ribbon.R @@ -249,7 +249,6 @@ GeomArea <- ggproto("GeomArea", GeomRibbon, #' [geom_linerange()] for discrete intervals (lines), #' [geom_polygon()] for general polygons #' @inheritParams shared_layer_parameters -#' @param linemitre Line mitre limit (number greater than 1). #' @param outline.type Type of the outline of the area; `"both"` draws both the #' upper and lower lines, `"upper"`/`"lower"` draws the respective lines only. #' `"full"` draws a closed polygon around the area. diff --git a/R/geom-rug.R b/R/geom-rug.R index 459eff8dfe..dc46583a4d 100644 --- a/R/geom-rug.R +++ b/R/geom-rug.R @@ -139,7 +139,6 @@ GeomRug <- ggproto("GeomRug", Geom, #' bottom, and left. #' @param outside logical that controls whether to move the rug tassels outside of the plot area. Default is off (FALSE). You will also need to use `coord_cartesian(clip = "off")`. When set to TRUE, also consider changing the sides argument to "tr". See examples. #' @param length A [grid::unit()] object that sets the length of the rug lines. Use scale expansion to avoid overplotting of data. -#' @param lineend Line end style (round, butt, square). #' @export #' @examples #' p <- ggplot(mtcars, aes(wt, mpg)) + diff --git a/R/geom-segment.R b/R/geom-segment.R index 3722c2993a..1186c2cd38 100644 --- a/R/geom-segment.R +++ b/R/geom-segment.R @@ -69,8 +69,6 @@ GeomSegment <- ggproto( #' @param arrow specification for arrow heads, as created by [grid::arrow()]. #' @param arrow.fill fill colour to use for the arrow head (if closed). `NULL` #' means use `colour` aesthetic. -#' @param lineend Line end style (round, butt, square). -#' @param linejoin Line join style (round, mitre, bevel). #' @seealso [geom_path()] and [geom_line()] for multi- #' segment lines and paths. #' @seealso [geom_spoke()] for a segment parameterised by a location diff --git a/R/layer.R b/R/layer.R index 6db838ea57..1234445941 100644 --- a/R/layer.R +++ b/R/layer.R @@ -100,7 +100,16 @@ #' * The `key_glyph` argument of [`layer()`] may also be passed on through #' `...`. This can be one of the functions described as #' [key glyphs][draw_key], to change the display of the layer in the legend. - +#' +#' @param lineend +#' Line end style, one of `"round"`, `"butt"` or `"square"`. +#' +#' @param linejoin +#' Line join style, one of `"round"`, `"mitre"` or `"bevel"`. +#' +#' @param linemitre +#' Line mitre limit, a number greater than 1. +#' #' @param orientation #' The orientation of the layer. The default (`NA`) automatically determines the #' orientation from the aesthetic mapping. In the rare event that this fails it diff --git a/man/annotation_borders.Rd b/man/annotation_borders.Rd index 6f3667bcfb..ccf384d8a1 100644 --- a/man/annotation_borders.Rd +++ b/man/annotation_borders.Rd @@ -32,9 +32,6 @@ polygons, see \code{\link[maps:map]{maps::map()}} for details.} \item{...}{ Arguments passed on to \code{\link[=geom_polygon]{geom_polygon}} \describe{ - \item{\code{lineend}}{Line end style (round, butt, square).} - \item{\code{linejoin}}{Line join style (round, mitre, bevel).} - \item{\code{linemitre}}{Line mitre limit (number greater than 1).} \item{\code{rule}}{Either \code{"evenodd"} or \code{"winding"}. If polygons with holes are being drawn (using the \code{subgroup} aesthetic) this argument defines how the hole coordinates are interpreted. See the examples in \code{\link[grid:grid.path]{grid::pathGrob()}} for @@ -88,6 +85,9 @@ unobserved levels are omitted.} them. This is most useful for helper functions that define both data and aesthetics and shouldn't inherit behaviour from the default plot specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} + \item{\code{lineend}}{Line end style, one of \code{"round"}, \code{"butt"} or \code{"square"}.} + \item{\code{linejoin}}{Line join style, one of \code{"round"}, \code{"mitre"} or \code{"bevel"}.} + \item{\code{linemitre}}{Line mitre limit, a number greater than 1.} }} } \description{ diff --git a/man/geom_bar.Rd b/man/geom_bar.Rd index aed68d482d..cbb9d4a490 100644 --- a/man/geom_bar.Rd +++ b/man/geom_bar.Rd @@ -109,9 +109,9 @@ columns to the left/right of axis breaks. Note that this argument may have unintended behaviour when used with alternative positions, e.g. \code{position_dodge()}.} -\item{lineend}{Line end style (round, butt, square).} +\item{lineend}{Line end style, one of \code{"round"}, \code{"butt"} or \code{"square"}.} -\item{linejoin}{Line join style (round, mitre, bevel).} +\item{linejoin}{Line join style, one of \code{"round"}, \code{"mitre"} or \code{"bevel"}.} \item{na.rm}{If \code{FALSE}, the default, missing values are removed with a warning. If \code{TRUE}, missing values are silently removed.} diff --git a/man/geom_bin_2d.Rd b/man/geom_bin_2d.Rd index a21f940864..8525b163f8 100644 --- a/man/geom_bin_2d.Rd +++ b/man/geom_bin_2d.Rd @@ -95,9 +95,9 @@ which parameters it can accept. \link[=draw_key]{key glyphs}, to change the display of the layer in the legend. }} -\item{lineend}{Line end style (round, butt, square).} +\item{lineend}{Line end style, one of \code{"round"}, \code{"butt"} or \code{"square"}.} -\item{linejoin}{Line join style (round, mitre, bevel).} +\item{linejoin}{Line join style, one of \code{"round"}, \code{"mitre"} or \code{"bevel"}.} \item{na.rm}{If \code{FALSE}, the default, missing values are removed with a warning. If \code{TRUE}, missing values are silently removed.} diff --git a/man/geom_contour.Rd b/man/geom_contour.Rd index 0236191536..cdf0a5df4a 100644 --- a/man/geom_contour.Rd +++ b/man/geom_contour.Rd @@ -162,11 +162,11 @@ ten with \code{\link[=pretty]{pretty()}} breaks.} \item{arrow.fill}{fill colour to use for the arrow head (if closed). \code{NULL} means use \code{colour} aesthetic.} -\item{lineend}{Line end style (round, butt, square).} +\item{lineend}{Line end style, one of \code{"round"}, \code{"butt"} or \code{"square"}.} -\item{linejoin}{Line join style (round, mitre, bevel).} +\item{linejoin}{Line join style, one of \code{"round"}, \code{"mitre"} or \code{"bevel"}.} -\item{linemitre}{Line mitre limit (number greater than 1).} +\item{linemitre}{Line mitre limit, a number greater than 1.} \item{na.rm}{If \code{FALSE}, the default, missing values are removed with a warning. If \code{TRUE}, missing values are silently removed.} diff --git a/man/geom_density.Rd b/man/geom_density.Rd index ecaa32c4fb..55d85c75cb 100644 --- a/man/geom_density.Rd +++ b/man/geom_density.Rd @@ -99,7 +99,11 @@ which parameters it can accept. upper and lower lines, \code{"upper"}/\code{"lower"} draws the respective lines only. \code{"full"} draws a closed polygon around the area.} -\item{linemitre}{Line mitre limit (number greater than 1).} +\item{lineend}{Line end style, one of \code{"round"}, \code{"butt"} or \code{"square"}.} + +\item{linejoin}{Line join style, one of \code{"round"}, \code{"mitre"} or \code{"bevel"}.} + +\item{linemitre}{Line mitre limit, a number greater than 1.} \item{na.rm}{If \code{FALSE}, the default, missing values are removed with a warning. If \code{TRUE}, missing values are silently removed.} diff --git a/man/geom_density_2d.Rd b/man/geom_density_2d.Rd index 36cd1628fa..3ec2860104 100644 --- a/man/geom_density_2d.Rd +++ b/man/geom_density_2d.Rd @@ -120,11 +120,11 @@ ten with \code{\link[=pretty]{pretty()}} breaks.} by. Can be one of \code{"density"}, \code{"ndensity"}, or \code{"count"}. See the section on computed variables for details.} -\item{lineend}{Line end style (round, butt, square).} +\item{lineend}{Line end style, one of \code{"round"}, \code{"butt"} or \code{"square"}.} -\item{linejoin}{Line join style (round, mitre, bevel).} +\item{linejoin}{Line join style, one of \code{"round"}, \code{"mitre"} or \code{"bevel"}.} -\item{linemitre}{Line mitre limit (number greater than 1).} +\item{linemitre}{Line mitre limit, a number greater than 1.} \item{na.rm}{If \code{FALSE}, the default, missing values are removed with a warning. If \code{TRUE}, missing values are silently removed.} diff --git a/man/geom_function.Rd b/man/geom_function.Rd index 2cb7a2b56e..d5db09c247 100644 --- a/man/geom_function.Rd +++ b/man/geom_function.Rd @@ -101,11 +101,11 @@ which parameters it can accept. \item{arrow.fill}{fill colour to use for the arrow head (if closed). \code{NULL} means use \code{colour} aesthetic.} -\item{lineend}{Line end style (round, butt, square).} +\item{lineend}{Line end style, one of \code{"round"}, \code{"butt"} or \code{"square"}.} -\item{linejoin}{Line join style (round, mitre, bevel).} +\item{linejoin}{Line join style, one of \code{"round"}, \code{"mitre"} or \code{"bevel"}.} -\item{linemitre}{Line mitre limit (number greater than 1).} +\item{linemitre}{Line mitre limit, a number greater than 1.} \item{na.rm}{If \code{FALSE}, the default, missing values are removed with a warning. If \code{TRUE}, missing values are silently removed.} diff --git a/man/geom_hex.Rd b/man/geom_hex.Rd index dfd79f9504..b15fcd0b71 100644 --- a/man/geom_hex.Rd +++ b/man/geom_hex.Rd @@ -90,11 +90,11 @@ which parameters it can accept. \link[=draw_key]{key glyphs}, to change the display of the layer in the legend. }} -\item{lineend}{Line end style (round, butt, square).} +\item{lineend}{Line end style, one of \code{"round"}, \code{"butt"} or \code{"square"}.} -\item{linejoin}{Line join style (round, mitre, bevel).} +\item{linejoin}{Line join style, one of \code{"round"}, \code{"mitre"} or \code{"bevel"}.} -\item{linemitre}{Line mitre limit (number greater than 1).} +\item{linemitre}{Line mitre limit, a number greater than 1.} \item{na.rm}{If \code{FALSE}, the default, missing values are removed with a warning. If \code{TRUE}, missing values are silently removed.} diff --git a/man/geom_histogram.Rd b/man/geom_histogram.Rd index ef3b7e2511..7a1c07ebd9 100644 --- a/man/geom_histogram.Rd +++ b/man/geom_histogram.Rd @@ -145,6 +145,10 @@ orientation from the aesthetic mapping. In the rare event that this fails it can be given explicitly by setting \code{orientation} to either \code{"x"} or \code{"y"}. See the \emph{Orientation} section for more detail.} +\item{lineend}{Line end style, one of \code{"round"}, \code{"butt"} or \code{"square"}.} + +\item{linejoin}{Line join style, one of \code{"round"}, \code{"mitre"} or \code{"bevel"}.} + \item{geom, stat}{Use to override the default connection between \code{geom_histogram()}/\code{geom_freqpoly()} and \code{stat_bin()}. For more information at overriding these connections, see how the \link[=layer_stats]{stat} and diff --git a/man/geom_linerange.Rd b/man/geom_linerange.Rd index 7af4d653e9..921777d5cf 100644 --- a/man/geom_linerange.Rd +++ b/man/geom_linerange.Rd @@ -171,6 +171,8 @@ unobserved levels are omitted.} them. This is most useful for helper functions that define both data and aesthetics and shouldn't inherit behaviour from the default plot specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} + +\item{lineend}{Line end style, one of \code{"round"}, \code{"butt"} or \code{"square"}.} } \description{ Various ways of representing a vertical interval defined by \code{x}, diff --git a/man/geom_path.Rd b/man/geom_path.Rd index 006e46f1f2..1a3e5dcff9 100644 --- a/man/geom_path.Rd +++ b/man/geom_path.Rd @@ -132,11 +132,11 @@ which parameters it can accept. \item{arrow.fill}{fill colour to use for the arrow head (if closed). \code{NULL} means use \code{colour} aesthetic.} -\item{lineend}{Line end style (round, butt, square).} +\item{lineend}{Line end style, one of \code{"round"}, \code{"butt"} or \code{"square"}.} -\item{linejoin}{Line join style (round, mitre, bevel).} +\item{linejoin}{Line join style, one of \code{"round"}, \code{"mitre"} or \code{"bevel"}.} -\item{linemitre}{Line mitre limit (number greater than 1).} +\item{linemitre}{Line mitre limit, a number greater than 1.} \item{na.rm}{If \code{FALSE}, the default, missing values are removed with a warning. If \code{TRUE}, missing values are silently removed.} diff --git a/man/geom_polygon.Rd b/man/geom_polygon.Rd index 92ab721337..56164e7f27 100644 --- a/man/geom_polygon.Rd +++ b/man/geom_polygon.Rd @@ -94,11 +94,11 @@ being drawn (using the \code{subgroup} aesthetic) this argument defines how the hole coordinates are interpreted. See the examples in \code{\link[grid:grid.path]{grid::pathGrob()}} for an explanation.} -\item{lineend}{Line end style (round, butt, square).} +\item{lineend}{Line end style, one of \code{"round"}, \code{"butt"} or \code{"square"}.} -\item{linejoin}{Line join style (round, mitre, bevel).} +\item{linejoin}{Line join style, one of \code{"round"}, \code{"mitre"} or \code{"bevel"}.} -\item{linemitre}{Line mitre limit (number greater than 1).} +\item{linemitre}{Line mitre limit, a number greater than 1.} \item{na.rm}{If \code{FALSE}, the default, missing values are removed with a warning. If \code{TRUE}, missing values are silently removed.} diff --git a/man/geom_quantile.Rd b/man/geom_quantile.Rd index c110f0f2b2..911fad419b 100644 --- a/man/geom_quantile.Rd +++ b/man/geom_quantile.Rd @@ -98,11 +98,11 @@ which parameters it can accept. \item{arrow.fill}{fill colour to use for the arrow head (if closed). \code{NULL} means use \code{colour} aesthetic.} -\item{lineend}{Line end style (round, butt, square).} +\item{lineend}{Line end style, one of \code{"round"}, \code{"butt"} or \code{"square"}.} -\item{linejoin}{Line join style (round, mitre, bevel).} +\item{linejoin}{Line join style, one of \code{"round"}, \code{"mitre"} or \code{"bevel"}.} -\item{linemitre}{Line mitre limit (number greater than 1).} +\item{linemitre}{Line mitre limit, a number greater than 1.} \item{na.rm}{If \code{FALSE}, the default, missing values are removed with a warning. If \code{TRUE}, missing values are silently removed.} diff --git a/man/geom_ribbon.Rd b/man/geom_ribbon.Rd index 3be6ec0036..cd5605195f 100644 --- a/man/geom_ribbon.Rd +++ b/man/geom_ribbon.Rd @@ -124,7 +124,11 @@ orientation from the aesthetic mapping. In the rare event that this fails it can be given explicitly by setting \code{orientation} to either \code{"x"} or \code{"y"}. See the \emph{Orientation} section for more detail.} -\item{linemitre}{Line mitre limit (number greater than 1).} +\item{lineend}{Line end style, one of \code{"round"}, \code{"butt"} or \code{"square"}.} + +\item{linejoin}{Line join style, one of \code{"round"}, \code{"mitre"} or \code{"bevel"}.} + +\item{linemitre}{Line mitre limit, a number greater than 1.} \item{outline.type}{Type of the outline of the area; \code{"both"} draws both the upper and lower lines, \code{"upper"}/\code{"lower"} draws the respective lines only. diff --git a/man/geom_rug.Rd b/man/geom_rug.Rd index 01e0c7ed92..c8424c8399 100644 --- a/man/geom_rug.Rd +++ b/man/geom_rug.Rd @@ -89,7 +89,7 @@ which parameters it can accept. \link[=draw_key]{key glyphs}, to change the display of the layer in the legend. }} -\item{lineend}{Line end style (round, butt, square).} +\item{lineend}{Line end style, one of \code{"round"}, \code{"butt"} or \code{"square"}.} \item{sides}{A string that controls which sides of the plot the rugs appear on. It can be set to a string containing any of \code{"trbl"}, for top, right, diff --git a/man/geom_segment.Rd b/man/geom_segment.Rd index 903161c1ca..67603c1455 100644 --- a/man/geom_segment.Rd +++ b/man/geom_segment.Rd @@ -112,9 +112,9 @@ which parameters it can accept. \item{arrow.fill}{fill colour to use for the arrow head (if closed). \code{NULL} means use \code{colour} aesthetic.} -\item{lineend}{Line end style (round, butt, square).} +\item{lineend}{Line end style, one of \code{"round"}, \code{"butt"} or \code{"square"}.} -\item{linejoin}{Line join style (round, mitre, bevel).} +\item{linejoin}{Line join style, one of \code{"round"}, \code{"mitre"} or \code{"bevel"}.} \item{na.rm}{If \code{FALSE}, the default, missing values are removed with a warning. If \code{TRUE}, missing values are silently removed.} diff --git a/man/geom_spoke.Rd b/man/geom_spoke.Rd index 5cc9bec268..541704be62 100644 --- a/man/geom_spoke.Rd +++ b/man/geom_spoke.Rd @@ -95,9 +95,9 @@ which parameters it can accept. \item{arrow.fill}{fill colour to use for the arrow head (if closed). \code{NULL} means use \code{colour} aesthetic.} -\item{lineend}{Line end style (round, butt, square).} +\item{lineend}{Line end style, one of \code{"round"}, \code{"butt"} or \code{"square"}.} -\item{linejoin}{Line join style (round, mitre, bevel).} +\item{linejoin}{Line join style, one of \code{"round"}, \code{"mitre"} or \code{"bevel"}.} \item{na.rm}{If \code{FALSE}, the default, missing values are removed with a warning. If \code{TRUE}, missing values are silently removed.} diff --git a/man/geom_tile.Rd b/man/geom_tile.Rd index e87aa0ab75..972a98ff31 100644 --- a/man/geom_tile.Rd +++ b/man/geom_tile.Rd @@ -138,9 +138,9 @@ them. This is most useful for helper functions that define both data and aesthetics and shouldn't inherit behaviour from the default plot specification, e.g. \code{\link[=annotation_borders]{annotation_borders()}}.} -\item{lineend}{Line end style (round, butt, square).} +\item{lineend}{Line end style, one of \code{"round"}, \code{"butt"} or \code{"square"}.} -\item{linejoin}{Line join style (round, mitre, bevel).} +\item{linejoin}{Line join style, one of \code{"round"}, \code{"mitre"} or \code{"bevel"}.} } \description{ \code{geom_rect()} and \code{geom_tile()} do the same thing, but are diff --git a/man/shared_layer_parameters.Rd b/man/shared_layer_parameters.Rd index af47c4fe01..e09a26d754 100644 --- a/man/shared_layer_parameters.Rd +++ b/man/shared_layer_parameters.Rd @@ -100,6 +100,12 @@ which parameters it can accept. \link[=draw_key]{key glyphs}, to change the display of the layer in the legend. }} +\item{lineend}{Line end style, one of \code{"round"}, \code{"butt"} or \code{"square"}.} + +\item{linejoin}{Line join style, one of \code{"round"}, \code{"mitre"} or \code{"bevel"}.} + +\item{linemitre}{Line mitre limit, a number greater than 1.} + \item{orientation}{The orientation of the layer. The default (\code{NA}) automatically determines the orientation from the aesthetic mapping. In the rare event that this fails it can be given explicitly by setting \code{orientation} to either \code{"x"} or \code{"y"}. From 40eec0931384dbbfe46bf91ffa308f2d01e68757 Mon Sep 17 00:00:00 2001 From: Teun van den Brand Date: Wed, 5 Nov 2025 16:18:31 +0100 Subject: [PATCH 6/6] canonise `arrow` param --- R/geom-contour.R | 1 - R/geom-density2d.R | 1 - R/geom-function.R | 1 - R/geom-path.R | 3 --- R/geom-quantile.R | 1 - R/geom-segment.R | 3 --- R/geom-spoke.R | 1 - R/geom-tile.R | 1 - R/layer.R | 8 ++++++++ man/geom_contour.Rd | 7 ++++--- man/geom_function.Rd | 7 ++++--- man/geom_path.Rd | 7 ++++--- man/geom_quantile.Rd | 7 ++++--- man/geom_segment.Rd | 7 ++++--- man/geom_spoke.Rd | 7 ++++--- man/shared_layer_parameters.Rd | 6 ++++++ 16 files changed, 38 insertions(+), 30 deletions(-) diff --git a/R/geom-contour.R b/R/geom-contour.R index 04fab1b37a..1ff050fad5 100644 --- a/R/geom-contour.R +++ b/R/geom-contour.R @@ -37,7 +37,6 @@ GeomContourFilled <- ggproto("GeomContourFilled", GeomPolygon) #' @aesthetics GeomContour #' @aesthetics GeomContourFilled #' @inheritParams shared_layer_parameters -#' @inheritParams geom_path #' @param binwidth The width of the contour bins. Overridden by `bins`. #' @param bins Number of contour bins. Overridden by `breaks`. #' @param breaks One of: diff --git a/R/geom-density2d.R b/R/geom-density2d.R index 544e1d39e0..9dc762ec35 100644 --- a/R/geom-density2d.R +++ b/R/geom-density2d.R @@ -16,7 +16,6 @@ #' overriding these connections, see how the [stat][layer_stats] and #' [geom][layer_geoms] arguments work. #' @inheritParams shared_layer_parameters -#' @inheritParams geom_path #' @param contour_var Character string identifying the variable to contour #' by. Can be one of `"density"`, `"ndensity"`, or `"count"`. See the section #' on computed variables for details. diff --git a/R/geom-function.R b/R/geom-function.R index d3446c7e64..b8939bce57 100644 --- a/R/geom-function.R +++ b/R/geom-function.R @@ -31,7 +31,6 @@ GeomFunction <- ggproto("GeomFunction", GeomPath, #' @aesthetics GeomFunction #' @param data Ignored by `stat_function()`, do not use. #' @inheritParams shared_layer_parameters -#' @inheritParams geom_path #' @examples #' #' # geom_function() is useful for overlaying functions diff --git a/R/geom-path.R b/R/geom-path.R index b95b67b936..fe51e97b86 100644 --- a/R/geom-path.R +++ b/R/geom-path.R @@ -182,9 +182,6 @@ GeomStep <- ggproto( #' #' @aesthetics GeomPath #' @inheritParams shared_layer_parameters -#' @param arrow Arrow specification, as created by [grid::arrow()]. -#' @param arrow.fill fill colour to use for the arrow head (if closed). `NULL` -#' means use `colour` aesthetic. #' @seealso #' [geom_polygon()]: Filled paths (polygons); #' [geom_segment()]: Line segments diff --git a/R/geom-quantile.R b/R/geom-quantile.R index 4a79c43989..191cdbf8d3 100644 --- a/R/geom-quantile.R +++ b/R/geom-quantile.R @@ -19,7 +19,6 @@ GeomQuantile <- ggproto( #' @aesthetics GeomQuantile #' @export #' @inheritParams shared_layer_parameters -#' @inheritParams geom_path #' @param method.args List of additional arguments passed on to the modelling #' function defined by `method`. #' @param geom,stat Use to override the default connection between diff --git a/R/geom-segment.R b/R/geom-segment.R index 1186c2cd38..adcf7633ab 100644 --- a/R/geom-segment.R +++ b/R/geom-segment.R @@ -66,9 +66,6 @@ GeomSegment <- ggproto( #' #' @aesthetics GeomSegment #' @inheritParams shared_layer_parameters -#' @param arrow specification for arrow heads, as created by [grid::arrow()]. -#' @param arrow.fill fill colour to use for the arrow head (if closed). `NULL` -#' means use `colour` aesthetic. #' @seealso [geom_path()] and [geom_line()] for multi- #' segment lines and paths. #' @seealso [geom_spoke()] for a segment parameterised by a location diff --git a/R/geom-spoke.R b/R/geom-spoke.R index c7c09a84f2..fd61c7efa7 100644 --- a/R/geom-spoke.R +++ b/R/geom-spoke.R @@ -24,7 +24,6 @@ GeomSpoke <- ggproto( #' #' @aesthetics GeomSpoke #' @inheritParams shared_layer_parameters -#' @inheritParams geom_segment #' @export #' @examples #' df <- expand.grid(x = 1:10, y=1:10) diff --git a/R/geom-tile.R b/R/geom-tile.R index 11b2648054..c42a63c8ae 100644 --- a/R/geom-tile.R +++ b/R/geom-tile.R @@ -58,7 +58,6 @@ GeomTile <- ggproto( #' `geom_tile()` understands only the `x`/`width` and `y`/`height` combinations. #' Note that `geom_raster()` ignores `colour`. #' @inheritParams shared_layer_parameters -#' @inheritParams geom_segment #' @export #' #' @details diff --git a/R/layer.R b/R/layer.R index 1234445941..2b2bd5f785 100644 --- a/R/layer.R +++ b/R/layer.R @@ -110,6 +110,14 @@ #' @param linemitre #' Line mitre limit, a number greater than 1. #' +#' @param arrow +#' Arrow specification. Can be created by [grid::arrow()] or `NULL` to not draw +#' an arrow. +#' +#' @param arrow.fill +#' Fill colour to use for closed arrowheads. `NULL` means use `colour` +#' aesthetic. +#' #' @param orientation #' The orientation of the layer. The default (`NA`) automatically determines the #' orientation from the aesthetic mapping. In the rare event that this fails it diff --git a/man/geom_contour.Rd b/man/geom_contour.Rd index cdf0a5df4a..b79b9f7cb7 100644 --- a/man/geom_contour.Rd +++ b/man/geom_contour.Rd @@ -157,10 +157,11 @@ and returns breaks as output. A function can be created from a formula Overrides \code{binwidth} and \code{bins}. By default, this is a vector of length ten with \code{\link[=pretty]{pretty()}} breaks.} -\item{arrow}{Arrow specification, as created by \code{\link[grid:arrow]{grid::arrow()}}.} +\item{arrow}{Arrow specification. Can be created by \code{\link[grid:arrow]{grid::arrow()}} or \code{NULL} to not draw +an arrow.} -\item{arrow.fill}{fill colour to use for the arrow head (if closed). \code{NULL} -means use \code{colour} aesthetic.} +\item{arrow.fill}{Fill colour to use for closed arrowheads. \code{NULL} means use \code{colour} +aesthetic.} \item{lineend}{Line end style, one of \code{"round"}, \code{"butt"} or \code{"square"}.} diff --git a/man/geom_function.Rd b/man/geom_function.Rd index d5db09c247..e40c9f7ce8 100644 --- a/man/geom_function.Rd +++ b/man/geom_function.Rd @@ -96,10 +96,11 @@ which parameters it can accept. \link[=draw_key]{key glyphs}, to change the display of the layer in the legend. }} -\item{arrow}{Arrow specification, as created by \code{\link[grid:arrow]{grid::arrow()}}.} +\item{arrow}{Arrow specification. Can be created by \code{\link[grid:arrow]{grid::arrow()}} or \code{NULL} to not draw +an arrow.} -\item{arrow.fill}{fill colour to use for the arrow head (if closed). \code{NULL} -means use \code{colour} aesthetic.} +\item{arrow.fill}{Fill colour to use for closed arrowheads. \code{NULL} means use \code{colour} +aesthetic.} \item{lineend}{Line end style, one of \code{"round"}, \code{"butt"} or \code{"square"}.} diff --git a/man/geom_path.Rd b/man/geom_path.Rd index 1a3e5dcff9..4c237f91f4 100644 --- a/man/geom_path.Rd +++ b/man/geom_path.Rd @@ -127,10 +127,11 @@ which parameters it can accept. \link[=draw_key]{key glyphs}, to change the display of the layer in the legend. }} -\item{arrow}{Arrow specification, as created by \code{\link[grid:arrow]{grid::arrow()}}.} +\item{arrow}{Arrow specification. Can be created by \code{\link[grid:arrow]{grid::arrow()}} or \code{NULL} to not draw +an arrow.} -\item{arrow.fill}{fill colour to use for the arrow head (if closed). \code{NULL} -means use \code{colour} aesthetic.} +\item{arrow.fill}{Fill colour to use for closed arrowheads. \code{NULL} means use \code{colour} +aesthetic.} \item{lineend}{Line end style, one of \code{"round"}, \code{"butt"} or \code{"square"}.} diff --git a/man/geom_quantile.Rd b/man/geom_quantile.Rd index 911fad419b..f26a4bcdc2 100644 --- a/man/geom_quantile.Rd +++ b/man/geom_quantile.Rd @@ -93,10 +93,11 @@ which parameters it can accept. \link[=draw_key]{key glyphs}, to change the display of the layer in the legend. }} -\item{arrow}{Arrow specification, as created by \code{\link[grid:arrow]{grid::arrow()}}.} +\item{arrow}{Arrow specification. Can be created by \code{\link[grid:arrow]{grid::arrow()}} or \code{NULL} to not draw +an arrow.} -\item{arrow.fill}{fill colour to use for the arrow head (if closed). \code{NULL} -means use \code{colour} aesthetic.} +\item{arrow.fill}{Fill colour to use for closed arrowheads. \code{NULL} means use \code{colour} +aesthetic.} \item{lineend}{Line end style, one of \code{"round"}, \code{"butt"} or \code{"square"}.} diff --git a/man/geom_segment.Rd b/man/geom_segment.Rd index 67603c1455..3c63aa6ef4 100644 --- a/man/geom_segment.Rd +++ b/man/geom_segment.Rd @@ -107,10 +107,11 @@ which parameters it can accept. \link[=draw_key]{key glyphs}, to change the display of the layer in the legend. }} -\item{arrow}{specification for arrow heads, as created by \code{\link[grid:arrow]{grid::arrow()}}.} +\item{arrow}{Arrow specification. Can be created by \code{\link[grid:arrow]{grid::arrow()}} or \code{NULL} to not draw +an arrow.} -\item{arrow.fill}{fill colour to use for the arrow head (if closed). \code{NULL} -means use \code{colour} aesthetic.} +\item{arrow.fill}{Fill colour to use for closed arrowheads. \code{NULL} means use \code{colour} +aesthetic.} \item{lineend}{Line end style, one of \code{"round"}, \code{"butt"} or \code{"square"}.} diff --git a/man/geom_spoke.Rd b/man/geom_spoke.Rd index 541704be62..721766a6f6 100644 --- a/man/geom_spoke.Rd +++ b/man/geom_spoke.Rd @@ -90,10 +90,11 @@ which parameters it can accept. \link[=draw_key]{key glyphs}, to change the display of the layer in the legend. }} -\item{arrow}{specification for arrow heads, as created by \code{\link[grid:arrow]{grid::arrow()}}.} +\item{arrow}{Arrow specification. Can be created by \code{\link[grid:arrow]{grid::arrow()}} or \code{NULL} to not draw +an arrow.} -\item{arrow.fill}{fill colour to use for the arrow head (if closed). \code{NULL} -means use \code{colour} aesthetic.} +\item{arrow.fill}{Fill colour to use for closed arrowheads. \code{NULL} means use \code{colour} +aesthetic.} \item{lineend}{Line end style, one of \code{"round"}, \code{"butt"} or \code{"square"}.} diff --git a/man/shared_layer_parameters.Rd b/man/shared_layer_parameters.Rd index e09a26d754..001af03c19 100644 --- a/man/shared_layer_parameters.Rd +++ b/man/shared_layer_parameters.Rd @@ -106,6 +106,12 @@ which parameters it can accept. \item{linemitre}{Line mitre limit, a number greater than 1.} +\item{arrow}{Arrow specification. Can be created by \code{\link[grid:arrow]{grid::arrow()}} or \code{NULL} to not draw +an arrow.} + +\item{arrow.fill}{Fill colour to use for closed arrowheads. \code{NULL} means use \code{colour} +aesthetic.} + \item{orientation}{The orientation of the layer. The default (\code{NA}) automatically determines the orientation from the aesthetic mapping. In the rare event that this fails it can be given explicitly by setting \code{orientation} to either \code{"x"} or \code{"y"}.