diff --git a/DESCRIPTION b/DESCRIPTION index 35fa608b95..6b64da806e 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -63,6 +63,7 @@ Suggests: ragg (>= 1.2.6), RColorBrewer, rmarkdown, + roxygen2, rpart, sf (>= 0.7-3), svglite (>= 2.1.2), diff --git a/NAMESPACE b/NAMESPACE index 17623623db..2289af8fbe 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -28,6 +28,7 @@ S3method(element_grob,element_rect) S3method(element_grob,element_text) S3method(format,ggproto) S3method(format,ggproto_method) +S3method(format,rd_section_aesthetics) S3method(fortify,"NULL") S3method(fortify,"function") S3method(fortify,Line) diff --git a/NEWS.md b/NEWS.md index e258a805af..2e9b4e63eb 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,7 @@ # ggplot2 (development version) +* New roxygen tag `@aesthetics` that takes a Geom, Stat or Position class and + generates an 'Aesthetics' section. * `annotation_borders()` replaces the now-deprecated `borders()` (@teunbrand, #6392) * New `make_constructor()` function that builds a standard constructor for diff --git a/R/geom-bar.R b/R/geom-bar.R index 86d5a0fa09..42d4d1db2b 100644 --- a/R/geom-bar.R +++ b/R/geom-bar.R @@ -68,9 +68,9 @@ GeomBar <- ggproto( #' #' @eval rd_orientation() #' -#' @eval rd_aesthetics("geom", "bar") -#' @eval rd_aesthetics("geom", "col") -#' @eval rd_aesthetics("stat", "count") +#' @aesthetics GeomBar +#' @aesthetics GeomCol +#' @aesthetics StatCount #' @seealso #' [geom_histogram()] for continuous data, #' [position_dodge()] and [position_dodge2()] for creating side-by-side diff --git a/R/geom-bin2d.R b/R/geom-bin2d.R index b4d2f0c238..2e937a9d70 100644 --- a/R/geom-bin2d.R +++ b/R/geom-bin2d.R @@ -14,7 +14,7 @@ GeomBin2d <- ggproto("GeomBin2d", GeomTile) #' rectangle's fill. This is a useful alternative to [geom_point()] #' in the presence of overplotting. #' -#' @eval rd_aesthetics("stat", "bin_2d") +#' @aesthetics GeomBin2d #' #' @export #' @inheritParams layer diff --git a/R/geom-boxplot.R b/R/geom-boxplot.R index dc1234c651..a43009545d 100644 --- a/R/geom-boxplot.R +++ b/R/geom-boxplot.R @@ -24,7 +24,7 @@ #' This gives a roughly 95% confidence interval for comparing medians. #' See McGill et al. (1978) for more details. #' -#' @eval rd_aesthetics("geom", "boxplot") +#' @aesthetics GeomBoxplot #' #' @seealso [geom_quantile()] for continuous `x`, #' [geom_violin()] for a richer display of the distribution, and diff --git a/R/geom-contour.R b/R/geom-contour.R index 6540ff007e..0deb9966c7 100644 --- a/R/geom-contour.R +++ b/R/geom-contour.R @@ -28,8 +28,8 @@ GeomContourFilled <- ggproto("GeomContourFilled", GeomPolygon) #' data, you'll need to first interpolate on to a grid before visualising, #' using `interp::interp()`, `akima::bilinear()`, or similar. #' -#' @eval rd_aesthetics("geom", "contour") -#' @eval rd_aesthetics("geom", "contour_filled") +#' @aesthetics GeomContour +#' @aesthetics GeomContourFilled #' @inheritParams layer #' @inheritParams geom_point #' @inheritParams geom_path diff --git a/R/geom-count.R b/R/geom-count.R index 32ae897c9f..1e7cad2b3d 100644 --- a/R/geom-count.R +++ b/R/geom-count.R @@ -7,7 +7,7 @@ NULL #' observations at each location, then maps the count to point area. It #' useful when you have discrete data and overplotting. #' -#' @eval rd_aesthetics("geom", "point") +#' @aesthetics GeomPoint #' @param geom,stat Use to override the default connection between #' `geom_count()` and `stat_sum()`. For more information about overriding #' these connections, see how the [stat][layer_stats] and [geom][layer_geoms] diff --git a/R/geom-density.R b/R/geom-density.R index 486293cafb..2e8cd58231 100644 --- a/R/geom-density.R +++ b/R/geom-density.R @@ -22,8 +22,7 @@ GeomDensity <- ggproto( #' data that comes from an underlying smooth distribution. #' #' @eval rd_orientation() -#' -#' @eval rd_aesthetics("geom", "density") +#' @aesthetics GeomDensity #' @seealso See [geom_histogram()], [geom_freqpoly()] for #' other methods of displaying continuous distribution. #' See [geom_violin()] for a compact density display. diff --git a/R/geom-density2d.R b/R/geom-density2d.R index 0dcff33191..0197e2698e 100644 --- a/R/geom-density2d.R +++ b/R/geom-density2d.R @@ -6,8 +6,8 @@ #' draws contour lines, and `geom_density_2d_filled()` draws filled contour #' bands. #' -#' @eval rd_aesthetics("geom", "density_2d") -#' @eval rd_aesthetics("geom", "density_2d_filled") +#' @aesthetics GeomDensity2d +#' @aesthetics GeomDensity2dFilled #' @seealso [geom_contour()], [geom_contour_filled()] for information about #' how contours are drawn; [geom_bin_2d()] for another way of dealing with #' overplotting. diff --git a/R/geom-dotplot.R b/R/geom-dotplot.R index 8fd501cb8b..89def6a9ac 100644 --- a/R/geom-dotplot.R +++ b/R/geom-dotplot.R @@ -16,7 +16,7 @@ #' hide the y axis, as in one of the examples, or manually scale it #' to match the number of dots. #' -#' @eval rd_aesthetics("geom", "dotplot") +#' @aesthetics GeomDotplot #' @eval rd_computed_vars( #' x = 'center of each bin, if `binaxis` is `"x"`.', #' y = 'center of each bin, if `binaxis` is `"x"`.', diff --git a/R/geom-function.R b/R/geom-function.R index 6a5e358fff..4b9c09fa0e 100644 --- a/R/geom-function.R +++ b/R/geom-function.R @@ -28,7 +28,7 @@ GeomFunction <- ggproto("GeomFunction", GeomPath, #' with a grid of evenly spaced values along the x axis, and the results are #' drawn (by default) with a line. #' -#' @eval rd_aesthetics("geom", "function") +#' @aesthetics GeomFunction #' @param data Ignored by `stat_function()`, do not use. #' @inheritParams layer #' @inheritParams geom_path diff --git a/R/geom-hex.R b/R/geom-hex.R index 9d14ea66bd..0e67b49ad9 100644 --- a/R/geom-hex.R +++ b/R/geom-hex.R @@ -73,8 +73,8 @@ GeomHex <- ggproto("GeomHex", Geom, #' fill. Hexagon bins avoid the visual artefacts sometimes generated by #' the very regular alignment of [geom_bin_2d()]. #' -#' @eval rd_aesthetics("geom", "hex") -#' @eval rd_aesthetics("stat", "binhex") +#' @aesthetics GeomHex +#' @aesthetics StatBinhex #' @seealso [stat_bin_2d()] for rectangular binning #' @param geom,stat Override the default connection between `geom_hex()` and #' `stat_bin_hex()`. For more information about overriding these connections, diff --git a/R/geom-jitter.R b/R/geom-jitter.R index 52f017dccd..1f4b3e99c9 100644 --- a/R/geom-jitter.R +++ b/R/geom-jitter.R @@ -5,7 +5,7 @@ #' variation to the location of each point, and is a useful way of handling #' overplotting caused by discreteness in smaller datasets. #' -#' @eval rd_aesthetics("geom", "point") +#' @aesthetics GeomPoint #' @inheritParams layer #' @inheritParams geom_point #' @inheritParams position_jitter diff --git a/R/geom-linerange.R b/R/geom-linerange.R index c4c7a20492..0d67908ec8 100644 --- a/R/geom-linerange.R +++ b/R/geom-linerange.R @@ -44,7 +44,8 @@ GeomLinerange <- ggproto( #' #' @eval rd_orientation() #' -#' @eval rd_aesthetics("geom", "linerange", "Note that `geom_pointrange()` also understands `size` for the size of the points.") +#' @aesthetics GeomLinerange +#' Note that `geom_pointrange()` also understands `size` for the size of the points. #' @param fatten `r lifecycle::badge("deprecated")` A multiplicative factor #' used to increase the size of the middle bar in `geom_crossbar()` and the #' middle point in `geom_pointrange()`. diff --git a/R/geom-map.R b/R/geom-map.R index c75361b5f1..8d9e415c2f 100644 --- a/R/geom-map.R +++ b/R/geom-map.R @@ -9,7 +9,7 @@ NULL #' it can be used in conjunction with `geom_sf()` layers and/or #' [`coord_sf()`] (see examples). #' -#' @eval rd_aesthetics("geom", "map") +#' @aesthetics GeomMap #' @export #' @param map Data frame that contains the map coordinates. This will #' typically be created using [fortify()] on a spatial object. diff --git a/R/geom-path.R b/R/geom-path.R index 5e20b6fa32..9e74a8cd0b 100644 --- a/R/geom-path.R +++ b/R/geom-path.R @@ -180,7 +180,7 @@ GeomStep <- ggproto( #' #' @eval rd_orientation() #' -#' @eval rd_aesthetics("geom", "path") +#' @aesthetics GeomPath #' @inheritParams layer #' @inheritParams geom_bar #' @param lineend Line end style (round, butt, square). diff --git a/R/geom-point.R b/R/geom-point.R index 3e0bd11d20..f03d1a9917 100644 --- a/R/geom-point.R +++ b/R/geom-point.R @@ -65,7 +65,8 @@ GeomPoint <- ggproto( #' `geom_point(alpha = 0.05)`) or very small (e.g. #' `geom_point(shape = ".")`). #' -#' @eval rd_aesthetics("geom", "point", "The `fill` aesthetic only applies to shapes 21-25.") +#' @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. diff --git a/R/geom-polygon.R b/R/geom-polygon.R index 3d81f59eba..12dab3ce84 100644 --- a/R/geom-polygon.R +++ b/R/geom-polygon.R @@ -103,7 +103,7 @@ GeomPolygon <- ggproto("GeomPolygon", Geom, #' differentiates the outer ring points from those describing holes in the #' polygon. #' -#' @eval rd_aesthetics("geom", "polygon") +#' @aesthetics GeomPolygon #' @seealso #' [geom_path()] for an unfilled polygon, #' [geom_ribbon()] for a polygon anchored on the x-axis diff --git a/R/geom-quantile.R b/R/geom-quantile.R index 4dbdc0540f..99d569538f 100644 --- a/R/geom-quantile.R +++ b/R/geom-quantile.R @@ -16,7 +16,7 @@ GeomQuantile <- ggproto( #' This fits a quantile regression to the data and draws the fitted quantiles #' with lines. This is as a continuous analogue to [geom_boxplot()]. #' -#' @eval rd_aesthetics("geom", "quantile") +#' @aesthetics GeomQuantile #' @export #' @inheritParams layer #' @inheritParams geom_point diff --git a/R/geom-ribbon.R b/R/geom-ribbon.R index 3bf1c9ed74..805f0c6aa9 100644 --- a/R/geom-ribbon.R +++ b/R/geom-ribbon.R @@ -238,7 +238,7 @@ GeomArea <- ggproto("GeomArea", GeomRibbon, #' #' @eval rd_orientation() #' -#' @eval rd_aesthetics("geom", "ribbon") +#' @aesthetics GeomRibbon #' @seealso #' [geom_bar()] for discrete intervals (bars), #' [geom_linerange()] for discrete intervals (lines), diff --git a/R/geom-rug.R b/R/geom-rug.R index e1d458e18b..2f2b37cd2d 100644 --- a/R/geom-rug.R +++ b/R/geom-rug.R @@ -132,7 +132,7 @@ GeomRug <- ggproto("GeomRug", Geom, #' variables is 5% at both ends of the scale, the rug will not overlap with #' any data points under the default settings. #' -#' @eval rd_aesthetics("geom", "rug") +#' @aesthetics GeomRug #' @inheritParams layer #' @inheritParams geom_point #' @param sides A string that controls which sides of the plot the rugs appear on. diff --git a/R/geom-segment.R b/R/geom-segment.R index afe7362bd6..77ca127a44 100644 --- a/R/geom-segment.R +++ b/R/geom-segment.R @@ -64,7 +64,7 @@ GeomSegment <- ggproto( #' Both geoms draw a single segment/curve per case. See `geom_path()` if you #' need to connect points across multiple cases. #' -#' @eval rd_aesthetics("geom", "segment") +#' @aesthetics GeomSegment #' @inheritParams layer #' @inheritParams geom_point #' @param arrow specification for arrow heads, as created by [grid::arrow()]. diff --git a/R/geom-smooth.R b/R/geom-smooth.R index f1893a15dc..a022807b16 100644 --- a/R/geom-smooth.R +++ b/R/geom-smooth.R @@ -76,7 +76,7 @@ GeomSmooth <- ggproto( #' #' @eval rd_orientation() #' -#' @eval rd_aesthetics("geom", "smooth") +#' @aesthetics GeomSmooth #' @inheritParams layer #' @inheritParams geom_bar #' @param geom,stat Use to override the default connection between diff --git a/R/geom-spoke.R b/R/geom-spoke.R index 3ee08f26f4..71ac416482 100644 --- a/R/geom-spoke.R +++ b/R/geom-spoke.R @@ -22,7 +22,7 @@ GeomSpoke <- ggproto( #' useful when you have variables that describe direction and distance. #' The angles start from east and increase counterclockwise. #' -#' @eval rd_aesthetics("geom", "spoke") +#' @aesthetics GeomSpoke #' @inheritParams layer #' @inheritParams geom_segment #' @export diff --git a/R/geom-text.R b/R/geom-text.R index 5017d7ca4a..a680b01ab2 100644 --- a/R/geom-text.R +++ b/R/geom-text.R @@ -75,7 +75,7 @@ GeomText <- ggproto( #' \href{https://cran.r-project.org/package=ggrepel}{ggrepel} #' package. #' -#' @eval rd_aesthetics("geom", "text") +#' @aesthetics GeomText #' @section `geom_label()`: #' Currently `geom_label()` does not support the `check_overlap` argument. Also, #' it is considerably slower than `geom_text()`. The `fill` aesthetic controls diff --git a/R/geom-tile.R b/R/geom-tile.R index d7a289b614..85673eddce 100644 --- a/R/geom-tile.R +++ b/R/geom-tile.R @@ -54,11 +54,9 @@ GeomTile <- ggproto( #' `geom_raster()` is a high performance special case for when all the tiles #' are the same size, and no pattern fills are applied. #' -#' @eval rd_aesthetics( -#' "geom", "rect", -#' "`geom_tile()` understands only the `x`/`width` and `y`/`height` combinations. -#' Note that `geom_raster()` ignores `colour`." -#' ) +#' @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 geom_segment diff --git a/R/geom-violin.R b/R/geom-violin.R index 33082ec609..1640e4c893 100644 --- a/R/geom-violin.R +++ b/R/geom-violin.R @@ -7,7 +7,7 @@ #' #' @eval rd_orientation() #' -#' @eval rd_aesthetics("geom", "violin") +#' @aesthetics GeomViolin #' @inheritParams layer #' @inheritParams geom_bar #' @param trim If `TRUE` (default), trim the tails of the violins diff --git a/R/position-dodge.R b/R/position-dodge.R index e947950de7..393d13d8a0 100644 --- a/R/position-dodge.R +++ b/R/position-dodge.R @@ -19,7 +19,7 @@ #' @param reverse If `TRUE`, will reverse the default stacking order. #' This is useful if you're rotating both the plot and legend. #' @family position adjustments -#' @eval rd_aesthetics("position", "dodge") +#' @aesthetics PositionDodge #' #' @export #' @examples diff --git a/R/position-nudge.R b/R/position-nudge.R index aa9b4d8e52..c70c31f3ee 100644 --- a/R/position-nudge.R +++ b/R/position-nudge.R @@ -8,7 +8,7 @@ #' @family position adjustments #' @param x,y Amount of vertical and horizontal distance to move. #' @export -#' @eval rd_aesthetics("position", "nudge") +#' @aesthetics PositionNudge #' @examples #' df <- data.frame( #' x = c(1,3,2,5), diff --git a/R/stat-connect.R b/R/stat-connect.R index 6e58a00e67..a2a73590bd 100644 --- a/R/stat-connect.R +++ b/R/stat-connect.R @@ -119,7 +119,7 @@ StatConnect <- ggproto( #' 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. #' -#' @eval rd_aesthetics("stat", "connect") +#' @aesthetics StatConnect #' @export #' #' @examples diff --git a/R/stat-contour.R b/R/stat-contour.R index 427be3bce8..d299d68f01 100644 --- a/R/stat-contour.R +++ b/R/stat-contour.R @@ -87,8 +87,8 @@ StatContourFilled <- ggproto( #' @inheritParams stat_identity #' @inheritParams geom_contour #' @export -#' @eval rd_aesthetics("stat", "contour") -#' @eval rd_aesthetics("stat", "contour_filled") +#' @aesthetics StatContour +#' @aesthetics StatContourFilled #' @eval rd_computed_vars( #' .details = "The computed variables differ somewhat for contour lines #' (computed by `stat_contour()`) and contour bands (filled contours, diff --git a/R/stat-ecdf.R b/R/stat-ecdf.R index 4579a57c15..6d1084d719 100644 --- a/R/stat-ecdf.R +++ b/R/stat-ecdf.R @@ -73,7 +73,7 @@ StatEcdf <- ggproto( #' of points to interpolate with. #' @param pad If `TRUE`, pad the ecdf with additional points (-Inf, 0) #' and (Inf, 1) -#' @eval rd_aesthetics("stat", "ecdf") +#' @aesthetics StatEcdf #' @eval rd_computed_vars( #' ecdf = "Cumulative density corresponding to `x`.", #' y = "`r lifecycle::badge('superseded')` For backward compatibility." diff --git a/R/stat-ellipse.R b/R/stat-ellipse.R index 6d6578e7a6..dfd8c698d3 100644 --- a/R/stat-ellipse.R +++ b/R/stat-ellipse.R @@ -45,7 +45,7 @@ StatEllipse <- ggproto( #' @param segments The number of segments to be used in drawing the ellipse. #' @inheritParams layer #' @inheritParams geom_point -#' @eval rd_aesthetics("stat", "ellipse") +#' @aesthetics StatEllipse #' @export #' @examples #' ggplot(faithful, aes(waiting, eruptions)) + diff --git a/R/stat-manual.R b/R/stat-manual.R index 5269c8d6c9..d7ead2f189 100644 --- a/R/stat-manual.R +++ b/R/stat-manual.R @@ -28,7 +28,7 @@ StatManual <- ggproto( #' the data unchanged. #' @param args A list of arguments to pass to the function given in `fun`. #' -#' @eval rd_aesthetics("stat", "manual") +#' @aesthetics StatManual #' @section Aesthetics: #' Input aesthetics are determined by the `fun` argument. Output aesthetics must #' include those required by `geom`. Any aesthetic that is constant within a diff --git a/R/stat-qq.R b/R/stat-qq.R index 91d1f3a0ee..b97796bd78 100644 --- a/R/stat-qq.R +++ b/R/stat-qq.R @@ -34,8 +34,8 @@ StatQq <- ggproto( #' `stat_qq_line()` compute the slope and intercept of the line connecting the #' points at specified quartiles of the theoretical and sample distributions. #' -#' @eval rd_aesthetics("stat", "qq") -#' @eval rd_aesthetics("stat", "qq_line") +#' @aesthetics StatQq +#' @aesthetics StatQqLine #' @param distribution Distribution function to use, if x not specified #' @param dparams Additional parameters passed on to `distribution` #' function. diff --git a/R/stat-summary.R b/R/stat-summary.R index f8b028abcd..789f867da9 100644 --- a/R/stat-summary.R +++ b/R/stat-summary.R @@ -7,7 +7,7 @@ #' #' @eval rd_orientation() #' -#' @eval rd_aesthetics("stat", "summary") +#' @aesthetics StatSummary #' @seealso [geom_errorbar()], [geom_pointrange()], #' [geom_linerange()], [geom_crossbar()] for geoms to #' display summarised data diff --git a/R/stat-unique.R b/R/stat-unique.R index c88558d564..fca6399abd 100644 --- a/R/stat-unique.R +++ b/R/stat-unique.R @@ -9,7 +9,7 @@ StatUnique <- ggproto( #' Remove duplicates #' -#' @eval rd_aesthetics("stat", "unique") +#' @aesthetics StatUnique #' @export #' @inheritParams layer #' @inheritParams geom_point diff --git a/R/utilities-help.R b/R/utilities-help.R index 15a8069d66..70afc17990 100644 --- a/R/utilities-help.R +++ b/R/utilities-help.R @@ -78,7 +78,7 @@ rd_match_docpage <- function(aes) { )[index + 1] no_match <- index == 0 docpage[!no_match] <- paste0( - "\\link[=", docpage[!no_match], + "\\link[=ggplot2::", docpage[!no_match], "]{", flat[!no_match], "}" ) docpage[no_match] <- flat[no_match] @@ -165,3 +165,58 @@ link_book <- function(text = "", section = "", } paste(links, suffix, sep = " ") } + +roxy_tag_parse.roxy_tag_aesthetics <- function(x) { + x <- roxygen2::tag_two_part(x, "an argument name", "a description", required = FALSE) + + class <- get0(x$val$name, parent.frame()) + if (!inherits(class, c("Geom", "Stat", "Position"))) { + cli::cli_abort( + "Cannot create a {.field Aesthetics} section for {.val {x$val$name}}." + ) + } + + + fun_name <- snake_class(class) + aes_item <- rd_aesthetics_item(class) + + x$val <- c("", + paste0( + "\\code{", fun_name, "()} ", + "understands the following aesthetics. Required aesthetics are displayed", + " in bold and defaults are displayed for optional aesthetics:" + ), + "\\tabular{rll}{", aes_item, "}", + if (nzchar(x$val$description)) x$val$description + ) + x +} + +roxy_tag_rd.roxy_tag_aesthetics <- function(x, base_path, env) { + # When we document ggplot2 itself, we don't need to prefix links with ggplot2 + if (basename(base_path) == "ggplot2") { + x$val <- gsub("\\link[=ggplot2::", "\\link[=", x$val, fixed = TRUE) + } + roxygen2::rd_section("aesthetics", x$val) +} + +on_load({ + vctrs::s3_register( + "roxygen2::roxy_tag_parse", "roxy_tag_aesthetics", + roxy_tag_parse.roxy_tag_aesthetics + ) + vctrs::s3_register( + "roxygen2::roxy_tag_rd", "roxy_tag_aesthetics", + roxy_tag_rd.roxy_tag_aesthetics + ) +}) + +#' @export +format.rd_section_aesthetics <- function(x, ...) { + vec_c( + "\\section{Aesthetics}{", + !!!x$value, + "\nLearn more about setting these aesthetics in \\code{vignette(\"ggplot2-specs\")}.", + "}" + ) +} diff --git a/man/geom_bar.Rd b/man/geom_bar.Rd index 301c19d644..ba51d971ab 100644 --- a/man/geom_bar.Rd +++ b/man/geom_bar.Rd @@ -174,47 +174,6 @@ bars and then standardising each bar to have the same height. 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_bar()} understands the following aesthetics. Required aesthetics are displayed in bold and defaults are displayed for optional aesthetics: -\tabular{rll}{ -• \tab \strong{\code{\link[=aes_position]{x}}} \tab \cr\cr -• \tab \strong{\code{\link[=aes_position]{y}}} \tab \cr\cr -• \tab \code{\link[=aes_colour_fill_alpha]{alpha}} \tab → \code{NA} \cr\cr -• \tab \code{\link[=aes_colour_fill_alpha]{colour}} \tab → via \code{theme()} \cr\cr -• \tab \code{\link[=aes_colour_fill_alpha]{fill}} \tab → via \code{theme()} \cr\cr -• \tab \code{\link[=aes_group_order]{group}} \tab → inferred \cr\cr -• \tab \code{\link[=aes_linetype_size_shape]{linetype}} \tab → via \code{theme()} \cr\cr -• \tab \code{\link[=aes_linetype_size_shape]{linewidth}} \tab → via \code{theme()} \cr\cr -• \tab \code{width} \tab → \code{0.9} \cr\cr -} -Learn more about setting these aesthetics in \code{vignette("ggplot2-specs")}. - - -\code{geom_col()} understands the following aesthetics. Required aesthetics are displayed in bold and defaults are displayed for optional aesthetics: -\tabular{rll}{ -• \tab \strong{\code{\link[=aes_position]{x}}} \tab \cr\cr -• \tab \strong{\code{\link[=aes_position]{y}}} \tab \cr\cr -• \tab \code{\link[=aes_colour_fill_alpha]{alpha}} \tab → \code{NA} \cr\cr -• \tab \code{\link[=aes_colour_fill_alpha]{colour}} \tab → via \code{theme()} \cr\cr -• \tab \code{\link[=aes_colour_fill_alpha]{fill}} \tab → via \code{theme()} \cr\cr -• \tab \code{\link[=aes_group_order]{group}} \tab → inferred \cr\cr -• \tab \code{\link[=aes_linetype_size_shape]{linetype}} \tab → via \code{theme()} \cr\cr -• \tab \code{\link[=aes_linetype_size_shape]{linewidth}} \tab → via \code{theme()} \cr\cr -• \tab \code{width} \tab → \code{0.9} \cr\cr -} -Learn more about setting these aesthetics in \code{vignette("ggplot2-specs")}. - - -\code{stat_count()} understands the following aesthetics. Required aesthetics are displayed in bold and defaults are displayed for optional aesthetics: -\tabular{rll}{ -• \tab \strong{\code{\link[=aes_position]{x}} \emph{or} \code{\link[=aes_position]{y}}} \tab \cr\cr -• \tab \code{\link[=aes_group_order]{group}} \tab → inferred \cr\cr -• \tab \code{weight} \tab → \code{1} \cr\cr -} -Learn more about setting these aesthetics in \code{vignette("ggplot2-specs")}. -} - \section{Computed variables}{ These are calculated by the 'stat' part of layers and can be accessed with \link[=aes_eval]{delayed evaluation}. @@ -280,3 +239,40 @@ number of cases at each \code{x} position (without binning into ranges). \code{\link[=stat_bin]{stat_bin()}} requires continuous \code{x} data, whereas \code{stat_count()} can be used for both discrete and continuous \code{x} data. } +\section{Aesthetics}{ + +\code{geom_bar()} understands the following aesthetics. Required aesthetics are displayed in bold and defaults are displayed for optional aesthetics: +\tabular{rll}{ + • \tab \strong{\code{\link[=aes_position]{x}}} \tab \cr\cr + • \tab \strong{\code{\link[=aes_position]{y}}} \tab \cr\cr + • \tab \code{\link[=aes_colour_fill_alpha]{alpha}} \tab → \code{NA} \cr\cr + • \tab \code{\link[=aes_colour_fill_alpha]{colour}} \tab → via \code{theme()} \cr\cr + • \tab \code{\link[=aes_colour_fill_alpha]{fill}} \tab → via \code{theme()} \cr\cr + • \tab \code{\link[=aes_group_order]{group}} \tab → inferred \cr\cr + • \tab \code{\link[=aes_linetype_size_shape]{linetype}} \tab → via \code{theme()} \cr\cr + • \tab \code{\link[=aes_linetype_size_shape]{linewidth}} \tab → via \code{theme()} \cr\cr + • \tab \code{width} \tab → \code{0.9} \cr\cr +} + +\code{geom_col()} understands the following aesthetics. Required aesthetics are displayed in bold and defaults are displayed for optional aesthetics: +\tabular{rll}{ + • \tab \strong{\code{\link[=aes_position]{x}}} \tab \cr\cr + • \tab \strong{\code{\link[=aes_position]{y}}} \tab \cr\cr + • \tab \code{\link[=aes_colour_fill_alpha]{alpha}} \tab → \code{NA} \cr\cr + • \tab \code{\link[=aes_colour_fill_alpha]{colour}} \tab → via \code{theme()} \cr\cr + • \tab \code{\link[=aes_colour_fill_alpha]{fill}} \tab → via \code{theme()} \cr\cr + • \tab \code{\link[=aes_group_order]{group}} \tab → inferred \cr\cr + • \tab \code{\link[=aes_linetype_size_shape]{linetype}} \tab → via \code{theme()} \cr\cr + • \tab \code{\link[=aes_linetype_size_shape]{linewidth}} \tab → via \code{theme()} \cr\cr + • \tab \code{width} \tab → \code{0.9} \cr\cr +} + +\code{stat_count()} understands the following aesthetics. Required aesthetics are displayed in bold and defaults are displayed for optional aesthetics: +\tabular{rll}{ + • \tab \strong{\code{\link[=aes_position]{x}} \emph{or} \code{\link[=aes_position]{y}}} \tab \cr\cr + • \tab \code{\link[=aes_group_order]{group}} \tab → inferred \cr\cr + • \tab \code{weight} \tab → \code{1} \cr\cr +} + +Learn more about setting these aesthetics in \code{vignette("ggplot2-specs")}. +} diff --git a/man/geom_bin_2d.Rd b/man/geom_bin_2d.Rd index 1ead355aa9..c9a8d3f969 100644 --- a/man/geom_bin_2d.Rd +++ b/man/geom_bin_2d.Rd @@ -164,19 +164,6 @@ each rectangle, and then (by default) maps the number of cases to the rectangle's fill. This is a useful alternative to \code{\link[=geom_point]{geom_point()}} in the presence of overplotting. } -\section{Aesthetics}{ - -\code{stat_bin_2d()} understands the following aesthetics. Required aesthetics are displayed in bold and defaults are displayed for optional aesthetics: -\tabular{rll}{ -• \tab \strong{\code{\link[=aes_position]{x}}} \tab \cr\cr -• \tab \strong{\code{\link[=aes_position]{y}}} \tab \cr\cr -• \tab \code{\link[=aes_colour_fill_alpha]{fill}} \tab → \code{after_stat(count)} \cr\cr -• \tab \code{\link[=aes_group_order]{group}} \tab → inferred \cr\cr -• \tab \code{weight} \tab → \code{1} \cr\cr -} -Learn more about setting these aesthetics in \code{vignette("ggplot2-specs")}. -} - \section{Computed variables}{ These are calculated by the 'stat' part of layers and can be accessed with \link[=aes_eval]{delayed evaluation}. @@ -213,3 +200,21 @@ d + geom_bin_2d(binwidth = c(0.1, 0.1)) \seealso{ \code{\link[=stat_bin_hex]{stat_bin_hex()}} for hexagonal binning } +\section{Aesthetics}{ + +\code{geom_bin2d()} understands the following aesthetics. Required aesthetics are displayed in bold and defaults are displayed for optional aesthetics: +\tabular{rll}{ + • \tab \strong{\code{\link[=aes_position]{x}}} \tab \cr\cr + • \tab \strong{\code{\link[=aes_position]{y}}} \tab \cr\cr + • \tab \code{\link[=aes_colour_fill_alpha]{alpha}} \tab → \code{NA} \cr\cr + • \tab \code{\link[=aes_colour_fill_alpha]{colour}} \tab → via \code{theme()} \cr\cr + • \tab \code{\link[=aes_colour_fill_alpha]{fill}} \tab → via \code{theme()} \cr\cr + • \tab \code{\link[=aes_group_order]{group}} \tab → inferred \cr\cr + • \tab \code{height} \tab → \code{1} \cr\cr + • \tab \code{\link[=aes_linetype_size_shape]{linetype}} \tab → via \code{theme()} \cr\cr + • \tab \code{\link[=aes_linetype_size_shape]{linewidth}} \tab → via \code{theme()} \cr\cr + • \tab \code{width} \tab → \code{1} \cr\cr +} + +Learn more about setting these aesthetics in \code{vignette("ggplot2-specs")}. +} diff --git a/man/geom_boxplot.Rd b/man/geom_boxplot.Rd index e19bf5a2d1..2435b9333e 100644 --- a/man/geom_boxplot.Rd +++ b/man/geom_boxplot.Rd @@ -221,30 +221,6 @@ This gives a roughly 95\% confidence interval for comparing medians. See McGill et al. (1978) for more details. } -\section{Aesthetics}{ - -\code{geom_boxplot()} understands the following aesthetics. Required aesthetics are displayed in bold and defaults are displayed for optional aesthetics: -\tabular{rll}{ -• \tab \strong{\code{\link[=aes_position]{x}} \emph{or} \code{\link[=aes_position]{y}}} \tab \cr\cr -• \tab \strong{\code{lower} \emph{or} \code{xlower}} \tab \cr\cr -• \tab \strong{\code{upper} \emph{or} \code{xupper}} \tab \cr\cr -• \tab \strong{\code{middle} \emph{or} \code{xmiddle}} \tab \cr\cr -• \tab \strong{\code{\link[=aes_position]{ymin}} \emph{or} \code{\link[=aes_position]{xmin}}} \tab \cr\cr -• \tab \strong{\code{\link[=aes_position]{ymax}} \emph{or} \code{\link[=aes_position]{xmax}}} \tab \cr\cr -• \tab \code{\link[=aes_colour_fill_alpha]{alpha}} \tab → \code{NA} \cr\cr -• \tab \code{\link[=aes_colour_fill_alpha]{colour}} \tab → via \code{theme()} \cr\cr -• \tab \code{\link[=aes_colour_fill_alpha]{fill}} \tab → via \code{theme()} \cr\cr -• \tab \code{\link[=aes_group_order]{group}} \tab → inferred \cr\cr -• \tab \code{\link[=aes_linetype_size_shape]{linetype}} \tab → via \code{theme()} \cr\cr -• \tab \code{\link[=aes_linetype_size_shape]{linewidth}} \tab → via \code{theme()} \cr\cr -• \tab \code{\link[=aes_linetype_size_shape]{shape}} \tab → via \code{theme()} \cr\cr -• \tab \code{\link[=aes_linetype_size_shape]{size}} \tab → via \code{theme()} \cr\cr -• \tab \code{weight} \tab → \code{1} \cr\cr -• \tab \code{width} \tab → \code{0.9} \cr\cr -} -Learn more about setting these aesthetics in \code{vignette("ggplot2-specs")}. -} - \section{Computed variables}{ These are calculated by the 'stat' part of layers and can be accessed with \link[=aes_eval]{delayed evaluation}. \code{stat_boxplot()} provides the following variables, some of which depend on the orientation: @@ -317,3 +293,27 @@ box plots. The American Statistician 32, 12-16. \code{\link[=geom_violin]{geom_violin()}} for a richer display of the distribution, and \code{\link[=geom_jitter]{geom_jitter()}} for a useful technique for small data. } +\section{Aesthetics}{ + +\code{geom_boxplot()} understands the following aesthetics. Required aesthetics are displayed in bold and defaults are displayed for optional aesthetics: +\tabular{rll}{ + • \tab \strong{\code{\link[=aes_position]{x}} \emph{or} \code{\link[=aes_position]{y}}} \tab \cr\cr + • \tab \strong{\code{lower} \emph{or} \code{xlower}} \tab \cr\cr + • \tab \strong{\code{upper} \emph{or} \code{xupper}} \tab \cr\cr + • \tab \strong{\code{middle} \emph{or} \code{xmiddle}} \tab \cr\cr + • \tab \strong{\code{\link[=aes_position]{ymin}} \emph{or} \code{\link[=aes_position]{xmin}}} \tab \cr\cr + • \tab \strong{\code{\link[=aes_position]{ymax}} \emph{or} \code{\link[=aes_position]{xmax}}} \tab \cr\cr + • \tab \code{\link[=aes_colour_fill_alpha]{alpha}} \tab → \code{NA} \cr\cr + • \tab \code{\link[=aes_colour_fill_alpha]{colour}} \tab → via \code{theme()} \cr\cr + • \tab \code{\link[=aes_colour_fill_alpha]{fill}} \tab → via \code{theme()} \cr\cr + • \tab \code{\link[=aes_group_order]{group}} \tab → inferred \cr\cr + • \tab \code{\link[=aes_linetype_size_shape]{linetype}} \tab → via \code{theme()} \cr\cr + • \tab \code{\link[=aes_linetype_size_shape]{linewidth}} \tab → via \code{theme()} \cr\cr + • \tab \code{\link[=aes_linetype_size_shape]{shape}} \tab → via \code{theme()} \cr\cr + • \tab \code{\link[=aes_linetype_size_shape]{size}} \tab → via \code{theme()} \cr\cr + • \tab \code{weight} \tab → \code{1} \cr\cr + • \tab \code{width} \tab → \code{0.9} \cr\cr +} + +Learn more about setting these aesthetics in \code{vignette("ggplot2-specs")}. +} diff --git a/man/geom_contour.Rd b/man/geom_contour.Rd index 5232a09a78..fb4ead29ff 100644 --- a/man/geom_contour.Rd +++ b/man/geom_contour.Rd @@ -218,60 +218,6 @@ grid points where all four corners are non-missing. If you have irregular data, you'll need to first interpolate on to a grid before visualising, using \code{interp::interp()}, \code{akima::bilinear()}, or similar. } -\section{Aesthetics}{ - -\code{geom_contour()} understands the following aesthetics. Required aesthetics are displayed in bold and defaults are displayed for optional aesthetics: -\tabular{rll}{ -• \tab \strong{\code{\link[=aes_position]{x}}} \tab \cr\cr -• \tab \strong{\code{\link[=aes_position]{y}}} \tab \cr\cr -• \tab \code{\link[=aes_colour_fill_alpha]{alpha}} \tab → \code{NA} \cr\cr -• \tab \code{\link[=aes_colour_fill_alpha]{colour}} \tab → via \code{theme()} \cr\cr -• \tab \code{\link[=aes_group_order]{group}} \tab → inferred \cr\cr -• \tab \code{\link[=aes_linetype_size_shape]{linetype}} \tab → via \code{theme()} \cr\cr -• \tab \code{\link[=aes_linetype_size_shape]{linewidth}} \tab → via \code{theme()} \cr\cr -• \tab \code{weight} \tab → \code{1} \cr\cr -} -Learn more about setting these aesthetics in \code{vignette("ggplot2-specs")}. - - -\code{geom_contour_filled()} understands the following aesthetics. Required aesthetics are displayed in bold and defaults are displayed for optional aesthetics: -\tabular{rll}{ -• \tab \strong{\code{\link[=aes_position]{x}}} \tab \cr\cr -• \tab \strong{\code{\link[=aes_position]{y}}} \tab \cr\cr -• \tab \code{\link[=aes_colour_fill_alpha]{alpha}} \tab → \code{NA} \cr\cr -• \tab \code{\link[=aes_colour_fill_alpha]{colour}} \tab → via \code{theme()} \cr\cr -• \tab \code{\link[=aes_colour_fill_alpha]{fill}} \tab → via \code{theme()} \cr\cr -• \tab \code{\link[=aes_group_order]{group}} \tab → inferred \cr\cr -• \tab \code{\link[=aes_linetype_size_shape]{linetype}} \tab → via \code{theme()} \cr\cr -• \tab \code{\link[=aes_linetype_size_shape]{linewidth}} \tab → via \code{theme()} \cr\cr -• \tab \code{subgroup} \tab → \code{NULL} \cr\cr -} -Learn more about setting these aesthetics in \code{vignette("ggplot2-specs")}. - - -\code{stat_contour()} understands the following aesthetics. Required aesthetics are displayed in bold and defaults are displayed for optional aesthetics: -\tabular{rll}{ -• \tab \strong{\code{\link[=aes_position]{x}}} \tab \cr\cr -• \tab \strong{\code{\link[=aes_position]{y}}} \tab \cr\cr -• \tab \strong{\code{z}} \tab \cr\cr -• \tab \code{\link[=aes_group_order]{group}} \tab → inferred \cr\cr -• \tab \code{order} \tab → \code{after_stat(level)} \cr\cr -} -Learn more about setting these aesthetics in \code{vignette("ggplot2-specs")}. - - -\code{stat_contour_filled()} understands the following aesthetics. Required aesthetics are displayed in bold and defaults are displayed for optional aesthetics: -\tabular{rll}{ -• \tab \strong{\code{\link[=aes_position]{x}}} \tab \cr\cr -• \tab \strong{\code{\link[=aes_position]{y}}} \tab \cr\cr -• \tab \strong{\code{z}} \tab \cr\cr -• \tab \code{\link[=aes_colour_fill_alpha]{fill}} \tab → \code{after_stat(level)} \cr\cr -• \tab \code{\link[=aes_group_order]{group}} \tab → inferred \cr\cr -• \tab \code{order} \tab → \code{after_stat(level)} \cr\cr -} -Learn more about setting these aesthetics in \code{vignette("ggplot2-specs")}. -} - \section{Computed variables}{ These are calculated by the 'stat' part of layers and can be accessed with \link[=aes_eval]{delayed evaluation}. The computed variables differ somewhat for contour lines (computed by \code{stat_contour()}) and contour bands (filled contours, computed by \code{stat_contour_filled()}). The variables \code{nlevel} and \code{piece} are available for both, whereas \code{level_low}, \code{level_high}, and \code{level_mid} are only available for bands. The variable \code{level} is a numeric or a factor depending on whether lines or bands are calculated. @@ -322,3 +268,51 @@ v + geom_raster(aes(fill = density)) + \seealso{ \code{\link[=geom_density_2d]{geom_density_2d()}}: 2d density contours } +\section{Aesthetics}{ + +\code{geom_contour()} understands the following aesthetics. Required aesthetics are displayed in bold and defaults are displayed for optional aesthetics: +\tabular{rll}{ + • \tab \strong{\code{\link[=aes_position]{x}}} \tab \cr\cr + • \tab \strong{\code{\link[=aes_position]{y}}} \tab \cr\cr + • \tab \code{\link[=aes_colour_fill_alpha]{alpha}} \tab → \code{NA} \cr\cr + • \tab \code{\link[=aes_colour_fill_alpha]{colour}} \tab → via \code{theme()} \cr\cr + • \tab \code{\link[=aes_group_order]{group}} \tab → inferred \cr\cr + • \tab \code{\link[=aes_linetype_size_shape]{linetype}} \tab → via \code{theme()} \cr\cr + • \tab \code{\link[=aes_linetype_size_shape]{linewidth}} \tab → via \code{theme()} \cr\cr + • \tab \code{weight} \tab → \code{1} \cr\cr +} + +\code{geom_contour_filled()} understands the following aesthetics. Required aesthetics are displayed in bold and defaults are displayed for optional aesthetics: +\tabular{rll}{ + • \tab \strong{\code{\link[=aes_position]{x}}} \tab \cr\cr + • \tab \strong{\code{\link[=aes_position]{y}}} \tab \cr\cr + • \tab \code{\link[=aes_colour_fill_alpha]{alpha}} \tab → \code{NA} \cr\cr + • \tab \code{\link[=aes_colour_fill_alpha]{colour}} \tab → via \code{theme()} \cr\cr + • \tab \code{\link[=aes_colour_fill_alpha]{fill}} \tab → via \code{theme()} \cr\cr + • \tab \code{\link[=aes_group_order]{group}} \tab → inferred \cr\cr + • \tab \code{\link[=aes_linetype_size_shape]{linetype}} \tab → via \code{theme()} \cr\cr + • \tab \code{\link[=aes_linetype_size_shape]{linewidth}} \tab → via \code{theme()} \cr\cr + • \tab \code{subgroup} \tab → \code{NULL} \cr\cr +} + +\code{stat_contour()} understands the following aesthetics. Required aesthetics are displayed in bold and defaults are displayed for optional aesthetics: +\tabular{rll}{ + • \tab \strong{\code{\link[=aes_position]{x}}} \tab \cr\cr + • \tab \strong{\code{\link[=aes_position]{y}}} \tab \cr\cr + • \tab \strong{\code{z}} \tab \cr\cr + • \tab \code{\link[=aes_group_order]{group}} \tab → inferred \cr\cr + • \tab \code{order} \tab → \code{after_stat(level)} \cr\cr +} + +\code{stat_contour_filled()} understands the following aesthetics. Required aesthetics are displayed in bold and defaults are displayed for optional aesthetics: +\tabular{rll}{ + • \tab \strong{\code{\link[=aes_position]{x}}} \tab \cr\cr + • \tab \strong{\code{\link[=aes_position]{y}}} \tab \cr\cr + • \tab \strong{\code{z}} \tab \cr\cr + • \tab \code{\link[=aes_colour_fill_alpha]{fill}} \tab → \code{after_stat(level)} \cr\cr + • \tab \code{\link[=aes_group_order]{group}} \tab → inferred \cr\cr + • \tab \code{order} \tab → \code{after_stat(level)} \cr\cr +} + +Learn more about setting these aesthetics in \code{vignette("ggplot2-specs")}. +} diff --git a/man/geom_count.Rd b/man/geom_count.Rd index a5848b8720..69cdb71200 100644 --- a/man/geom_count.Rd +++ b/man/geom_count.Rd @@ -115,23 +115,6 @@ This is a variant \code{\link[=geom_point]{geom_point()}} that counts the number observations at each location, then maps the count to point area. It useful when you have discrete data and overplotting. } -\section{Aesthetics}{ - -\code{geom_point()} understands the following aesthetics. Required aesthetics are displayed in bold and defaults are displayed for optional aesthetics: -\tabular{rll}{ -• \tab \strong{\code{\link[=aes_position]{x}}} \tab \cr\cr -• \tab \strong{\code{\link[=aes_position]{y}}} \tab \cr\cr -• \tab \code{\link[=aes_colour_fill_alpha]{alpha}} \tab → \code{NA} \cr\cr -• \tab \code{\link[=aes_colour_fill_alpha]{colour}} \tab → via \code{theme()} \cr\cr -• \tab \code{\link[=aes_colour_fill_alpha]{fill}} \tab → via \code{theme()} \cr\cr -• \tab \code{\link[=aes_group_order]{group}} \tab → inferred \cr\cr -• \tab \code{\link[=aes_linetype_size_shape]{shape}} \tab → via \code{theme()} \cr\cr -• \tab \code{\link[=aes_linetype_size_shape]{size}} \tab → via \code{theme()} \cr\cr -• \tab \code{stroke} \tab → via \code{theme()} \cr\cr -} -Learn more about setting these aesthetics in \code{vignette("ggplot2-specs")}. -} - \section{Computed variables}{ These are calculated by the 'stat' part of layers and can be accessed with \link[=aes_eval]{delayed evaluation}. @@ -175,3 +158,20 @@ d + geom_count(aes(size = after_stat(prop), group = clarity)) + \seealso{ For continuous \code{x} and \code{y}, use \code{\link[=geom_bin_2d]{geom_bin_2d()}}. } +\section{Aesthetics}{ + +\code{geom_point()} understands the following aesthetics. Required aesthetics are displayed in bold and defaults are displayed for optional aesthetics: +\tabular{rll}{ + • \tab \strong{\code{\link[=aes_position]{x}}} \tab \cr\cr + • \tab \strong{\code{\link[=aes_position]{y}}} \tab \cr\cr + • \tab \code{\link[=aes_colour_fill_alpha]{alpha}} \tab → \code{NA} \cr\cr + • \tab \code{\link[=aes_colour_fill_alpha]{colour}} \tab → via \code{theme()} \cr\cr + • \tab \code{\link[=aes_colour_fill_alpha]{fill}} \tab → via \code{theme()} \cr\cr + • \tab \code{\link[=aes_group_order]{group}} \tab → inferred \cr\cr + • \tab \code{\link[=aes_linetype_size_shape]{shape}} \tab → via \code{theme()} \cr\cr + • \tab \code{\link[=aes_linetype_size_shape]{size}} \tab → via \code{theme()} \cr\cr + • \tab \code{stroke} \tab → via \code{theme()} \cr\cr +} + +Learn more about setting these aesthetics in \code{vignette("ggplot2-specs")}. +} diff --git a/man/geom_density.Rd b/man/geom_density.Rd index f142f3e759..de83447eb0 100644 --- a/man/geom_density.Rd +++ b/man/geom_density.Rd @@ -175,23 +175,6 @@ data that comes from an underlying smooth distribution. 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_density()} understands the following aesthetics. Required aesthetics are displayed in bold and defaults are displayed for optional aesthetics: -\tabular{rll}{ -• \tab \strong{\code{\link[=aes_position]{x}}} \tab \cr\cr -• \tab \strong{\code{\link[=aes_position]{y}}} \tab \cr\cr -• \tab \code{\link[=aes_colour_fill_alpha]{alpha}} \tab → \code{NA} \cr\cr -• \tab \code{\link[=aes_colour_fill_alpha]{colour}} \tab → via \code{theme()} \cr\cr -• \tab \code{\link[=aes_colour_fill_alpha]{fill}} \tab → via \code{theme()} \cr\cr -• \tab \code{\link[=aes_group_order]{group}} \tab → inferred \cr\cr -• \tab \code{\link[=aes_linetype_size_shape]{linetype}} \tab → via \code{theme()} \cr\cr -• \tab \code{\link[=aes_linetype_size_shape]{linewidth}} \tab → via \code{theme()} \cr\cr -• \tab \code{weight} \tab → \code{1} \cr\cr -} -Learn more about setting these aesthetics in \code{vignette("ggplot2-specs")}. -} - \section{Computed variables}{ These are calculated by the 'stat' part of layers and can be accessed with \link[=aes_eval]{delayed evaluation}. @@ -252,3 +235,20 @@ See \code{\link[=geom_histogram]{geom_histogram()}}, \code{\link[=geom_freqpoly] other methods of displaying continuous distribution. See \code{\link[=geom_violin]{geom_violin()}} for a compact density display. } +\section{Aesthetics}{ + +\code{geom_density()} understands the following aesthetics. Required aesthetics are displayed in bold and defaults are displayed for optional aesthetics: +\tabular{rll}{ + • \tab \strong{\code{\link[=aes_position]{x}}} \tab \cr\cr + • \tab \strong{\code{\link[=aes_position]{y}}} \tab \cr\cr + • \tab \code{\link[=aes_colour_fill_alpha]{alpha}} \tab → \code{NA} \cr\cr + • \tab \code{\link[=aes_colour_fill_alpha]{colour}} \tab → via \code{theme()} \cr\cr + • \tab \code{\link[=aes_colour_fill_alpha]{fill}} \tab → via \code{theme()} \cr\cr + • \tab \code{\link[=aes_group_order]{group}} \tab → inferred \cr\cr + • \tab \code{\link[=aes_linetype_size_shape]{linetype}} \tab → via \code{theme()} \cr\cr + • \tab \code{\link[=aes_linetype_size_shape]{linewidth}} \tab → via \code{theme()} \cr\cr + • \tab \code{weight} \tab → \code{1} \cr\cr +} + +Learn more about setting these aesthetics in \code{vignette("ggplot2-specs")}. +} diff --git a/man/geom_density_2d.Rd b/man/geom_density_2d.Rd index 12098b2e85..27462b8675 100644 --- a/man/geom_density_2d.Rd +++ b/man/geom_density_2d.Rd @@ -172,36 +172,6 @@ overplotting. This is a 2D version of \code{\link[=geom_density]{geom_density()} draws contour lines, and \code{geom_density_2d_filled()} draws filled contour bands. } -\section{Aesthetics}{ - -\code{geom_density_2d()} understands the following aesthetics. Required aesthetics are displayed in bold and defaults are displayed for optional aesthetics: -\tabular{rll}{ -• \tab \strong{\code{\link[=aes_position]{x}}} \tab \cr\cr -• \tab \strong{\code{\link[=aes_position]{y}}} \tab \cr\cr -• \tab \code{\link[=aes_colour_fill_alpha]{alpha}} \tab → \code{NA} \cr\cr -• \tab \code{\link[=aes_colour_fill_alpha]{colour}} \tab → via \code{theme()} \cr\cr -• \tab \code{\link[=aes_group_order]{group}} \tab → inferred \cr\cr -• \tab \code{\link[=aes_linetype_size_shape]{linetype}} \tab → via \code{theme()} \cr\cr -• \tab \code{\link[=aes_linetype_size_shape]{linewidth}} \tab → via \code{theme()} \cr\cr -} -Learn more about setting these aesthetics in \code{vignette("ggplot2-specs")}. - - -\code{geom_density_2d_filled()} understands the following aesthetics. Required aesthetics are displayed in bold and defaults are displayed for optional aesthetics: -\tabular{rll}{ -• \tab \strong{\code{\link[=aes_position]{x}}} \tab \cr\cr -• \tab \strong{\code{\link[=aes_position]{y}}} \tab \cr\cr -• \tab \code{\link[=aes_colour_fill_alpha]{alpha}} \tab → \code{NA} \cr\cr -• \tab \code{\link[=aes_colour_fill_alpha]{colour}} \tab → via \code{theme()} \cr\cr -• \tab \code{\link[=aes_colour_fill_alpha]{fill}} \tab → via \code{theme()} \cr\cr -• \tab \code{\link[=aes_group_order]{group}} \tab → inferred \cr\cr -• \tab \code{\link[=aes_linetype_size_shape]{linetype}} \tab → via \code{theme()} \cr\cr -• \tab \code{\link[=aes_linetype_size_shape]{linewidth}} \tab → via \code{theme()} \cr\cr -• \tab \code{subgroup} \tab → \code{NULL} \cr\cr -} -Learn more about setting these aesthetics in \code{vignette("ggplot2-specs")}. -} - \section{Computed variables}{ These are calculated by the 'stat' part of layers and can be accessed with \link[=aes_eval]{delayed evaluation}. \code{stat_density_2d()} and \code{stat_density_2d_filled()} compute different variables depending on whether contouring is turned on or off. With contouring off (\code{contour = FALSE}), both stats behave the same, and the following variables are provided: @@ -281,3 +251,31 @@ d + stat_density_2d(geom = "point", aes(size = after_stat(density)), n = 20, con how contours are drawn; \code{\link[=geom_bin_2d]{geom_bin_2d()}} for another way of dealing with overplotting. } +\section{Aesthetics}{ + +\code{geom_density2d()} understands the following aesthetics. Required aesthetics are displayed in bold and defaults are displayed for optional aesthetics: +\tabular{rll}{ + • \tab \strong{\code{\link[=aes_position]{x}}} \tab \cr\cr + • \tab \strong{\code{\link[=aes_position]{y}}} \tab \cr\cr + • \tab \code{\link[=aes_colour_fill_alpha]{alpha}} \tab → \code{NA} \cr\cr + • \tab \code{\link[=aes_colour_fill_alpha]{colour}} \tab → via \code{theme()} \cr\cr + • \tab \code{\link[=aes_group_order]{group}} \tab → inferred \cr\cr + • \tab \code{\link[=aes_linetype_size_shape]{linetype}} \tab → via \code{theme()} \cr\cr + • \tab \code{\link[=aes_linetype_size_shape]{linewidth}} \tab → via \code{theme()} \cr\cr +} + +\code{geom_density2d_filled()} understands the following aesthetics. Required aesthetics are displayed in bold and defaults are displayed for optional aesthetics: +\tabular{rll}{ + • \tab \strong{\code{\link[=aes_position]{x}}} \tab \cr\cr + • \tab \strong{\code{\link[=aes_position]{y}}} \tab \cr\cr + • \tab \code{\link[=aes_colour_fill_alpha]{alpha}} \tab → \code{NA} \cr\cr + • \tab \code{\link[=aes_colour_fill_alpha]{colour}} \tab → via \code{theme()} \cr\cr + • \tab \code{\link[=aes_colour_fill_alpha]{fill}} \tab → via \code{theme()} \cr\cr + • \tab \code{\link[=aes_group_order]{group}} \tab → inferred \cr\cr + • \tab \code{\link[=aes_linetype_size_shape]{linetype}} \tab → via \code{theme()} \cr\cr + • \tab \code{\link[=aes_linetype_size_shape]{linewidth}} \tab → via \code{theme()} \cr\cr + • \tab \code{subgroup} \tab → \code{NULL} \cr\cr +} + +Learn more about setting these aesthetics in \code{vignette("ggplot2-specs")}. +} diff --git a/man/geom_dotplot.Rd b/man/geom_dotplot.Rd index 1cfc1ce0fe..5f7ef5e40e 100644 --- a/man/geom_dotplot.Rd +++ b/man/geom_dotplot.Rd @@ -158,24 +158,6 @@ y axis are not meaningful, due to technical limitations of ggplot2. You can hide the y axis, as in one of the examples, or manually scale it to match the number of dots. } -\section{Aesthetics}{ - -\code{geom_dotplot()} understands the following aesthetics. Required aesthetics are displayed in bold and defaults are displayed for optional aesthetics: -\tabular{rll}{ -• \tab \strong{\code{\link[=aes_position]{x}}} \tab \cr\cr -• \tab \strong{\code{\link[=aes_position]{y}}} \tab \cr\cr -• \tab \code{\link[=aes_colour_fill_alpha]{alpha}} \tab → \code{NA} \cr\cr -• \tab \code{\link[=aes_colour_fill_alpha]{colour}} \tab → via \code{theme()} \cr\cr -• \tab \code{\link[=aes_colour_fill_alpha]{fill}} \tab → via \code{theme()} \cr\cr -• \tab \code{\link[=aes_group_order]{group}} \tab → inferred \cr\cr -• \tab \code{\link[=aes_linetype_size_shape]{linetype}} \tab → via \code{theme()} \cr\cr -• \tab \code{stroke} \tab → via \code{theme()} \cr\cr -• \tab \code{weight} \tab → \code{1} \cr\cr -• \tab \code{width} \tab → \code{0.9} \cr\cr -} -Learn more about setting these aesthetics in \code{vignette("ggplot2-specs")}. -} - \section{Computed variables}{ These are calculated by the 'stat' part of layers and can be accessed with \link[=aes_eval]{delayed evaluation}. @@ -257,3 +239,21 @@ ggplot(mtcars, aes(x = 1, y = mpg, fill = factor(cyl))) + Wilkinson, L. (1999) Dot plots. The American Statistician, 53(3), 276-281. } +\section{Aesthetics}{ + +\code{geom_dotplot()} understands the following aesthetics. Required aesthetics are displayed in bold and defaults are displayed for optional aesthetics: +\tabular{rll}{ + • \tab \strong{\code{\link[=aes_position]{x}}} \tab \cr\cr + • \tab \strong{\code{\link[=aes_position]{y}}} \tab \cr\cr + • \tab \code{\link[=aes_colour_fill_alpha]{alpha}} \tab → \code{NA} \cr\cr + • \tab \code{\link[=aes_colour_fill_alpha]{colour}} \tab → via \code{theme()} \cr\cr + • \tab \code{\link[=aes_colour_fill_alpha]{fill}} \tab → via \code{theme()} \cr\cr + • \tab \code{\link[=aes_group_order]{group}} \tab → inferred \cr\cr + • \tab \code{\link[=aes_linetype_size_shape]{linetype}} \tab → via \code{theme()} \cr\cr + • \tab \code{stroke} \tab → via \code{theme()} \cr\cr + • \tab \code{weight} \tab → \code{1} \cr\cr + • \tab \code{width} \tab → \code{0.9} \cr\cr +} + +Learn more about setting these aesthetics in \code{vignette("ggplot2-specs")}. +} diff --git a/man/geom_function.Rd b/man/geom_function.Rd index 67af309a41..f9bf5cb0b2 100644 --- a/man/geom_function.Rd +++ b/man/geom_function.Rd @@ -155,21 +155,6 @@ superimpose a function on top of an existing plot. The function is called with a grid of evenly spaced values along the x axis, and the results are drawn (by default) with a line. } -\section{Aesthetics}{ - -\code{geom_function()} understands the following aesthetics. Required aesthetics are displayed in bold and defaults are displayed for optional aesthetics: -\tabular{rll}{ -• \tab \strong{\code{\link[=aes_position]{x}}} \tab \cr\cr -• \tab \strong{\code{\link[=aes_position]{y}}} \tab \cr\cr -• \tab \code{\link[=aes_colour_fill_alpha]{alpha}} \tab → \code{NA} \cr\cr -• \tab \code{\link[=aes_colour_fill_alpha]{colour}} \tab → via \code{theme()} \cr\cr -• \tab \code{\link[=aes_group_order]{group}} \tab → inferred \cr\cr -• \tab \code{\link[=aes_linetype_size_shape]{linetype}} \tab → via \code{theme()} \cr\cr -• \tab \code{\link[=aes_linetype_size_shape]{linewidth}} \tab → via \code{theme()} \cr\cr -} -Learn more about setting these aesthetics in \code{vignette("ggplot2-specs")}. -} - \section{Computed variables}{ These are calculated by the 'stat' part of layers and can be accessed with \link[=aes_eval]{delayed evaluation}. @@ -235,3 +220,18 @@ geom_function(fun = dnorm, colour = "red", xlim=c(-7, 7)) \seealso{ \code{\link[rlang:as_function]{rlang::as_function()}} } +\section{Aesthetics}{ + +\code{geom_function()} understands the following aesthetics. Required aesthetics are displayed in bold and defaults are displayed for optional aesthetics: +\tabular{rll}{ + • \tab \strong{\code{\link[=aes_position]{x}}} \tab \cr\cr + • \tab \strong{\code{\link[=aes_position]{y}}} \tab \cr\cr + • \tab \code{\link[=aes_colour_fill_alpha]{alpha}} \tab → \code{NA} \cr\cr + • \tab \code{\link[=aes_colour_fill_alpha]{colour}} \tab → via \code{theme()} \cr\cr + • \tab \code{\link[=aes_group_order]{group}} \tab → inferred \cr\cr + • \tab \code{\link[=aes_linetype_size_shape]{linetype}} \tab → via \code{theme()} \cr\cr + • \tab \code{\link[=aes_linetype_size_shape]{linewidth}} \tab → via \code{theme()} \cr\cr +} + +Learn more about setting these aesthetics in \code{vignette("ggplot2-specs")}. +} diff --git a/man/geom_hex.Rd b/man/geom_hex.Rd index 9d3f48d334..cf2a264bfe 100644 --- a/man/geom_hex.Rd +++ b/man/geom_hex.Rd @@ -141,33 +141,6 @@ each hexagon, and then (by default) maps the number of cases to the hexagon fill. Hexagon bins avoid the visual artefacts sometimes generated by the very regular alignment of \code{\link[=geom_bin_2d]{geom_bin_2d()}}. } -\section{Aesthetics}{ - -\code{geom_hex()} understands the following aesthetics. Required aesthetics are displayed in bold and defaults are displayed for optional aesthetics: -\tabular{rll}{ -• \tab \strong{\code{\link[=aes_position]{x}}} \tab \cr\cr -• \tab \strong{\code{\link[=aes_position]{y}}} \tab \cr\cr -• \tab \code{\link[=aes_colour_fill_alpha]{alpha}} \tab → \code{NA} \cr\cr -• \tab \code{\link[=aes_colour_fill_alpha]{colour}} \tab → via \code{theme()} \cr\cr -• \tab \code{\link[=aes_colour_fill_alpha]{fill}} \tab → via \code{theme()} \cr\cr -• \tab \code{\link[=aes_group_order]{group}} \tab → inferred \cr\cr -• \tab \code{\link[=aes_linetype_size_shape]{linetype}} \tab → via \code{theme()} \cr\cr -• \tab \code{\link[=aes_linetype_size_shape]{linewidth}} \tab → via \code{theme()} \cr\cr -} -Learn more about setting these aesthetics in \code{vignette("ggplot2-specs")}. - - -\code{stat_binhex()} understands the following aesthetics. Required aesthetics are displayed in bold and defaults are displayed for optional aesthetics: -\tabular{rll}{ -• \tab \strong{\code{\link[=aes_position]{x}}} \tab \cr\cr -• \tab \strong{\code{\link[=aes_position]{y}}} \tab \cr\cr -• \tab \code{\link[=aes_colour_fill_alpha]{fill}} \tab → \code{after_stat(count)} \cr\cr -• \tab \code{\link[=aes_group_order]{group}} \tab → inferred \cr\cr -• \tab \code{weight} \tab → \code{1} \cr\cr -} -Learn more about setting these aesthetics in \code{vignette("ggplot2-specs")}. -} - \section{Computed variables}{ These are calculated by the 'stat' part of layers and can be accessed with \link[=aes_eval]{delayed evaluation}. @@ -207,3 +180,28 @@ d + geom_hex(binwidth = c(.1, 500)) \seealso{ \code{\link[=stat_bin_2d]{stat_bin_2d()}} for rectangular binning } +\section{Aesthetics}{ + +\code{geom_hex()} understands the following aesthetics. Required aesthetics are displayed in bold and defaults are displayed for optional aesthetics: +\tabular{rll}{ + • \tab \strong{\code{\link[=aes_position]{x}}} \tab \cr\cr + • \tab \strong{\code{\link[=aes_position]{y}}} \tab \cr\cr + • \tab \code{\link[=aes_colour_fill_alpha]{alpha}} \tab → \code{NA} \cr\cr + • \tab \code{\link[=aes_colour_fill_alpha]{colour}} \tab → via \code{theme()} \cr\cr + • \tab \code{\link[=aes_colour_fill_alpha]{fill}} \tab → via \code{theme()} \cr\cr + • \tab \code{\link[=aes_group_order]{group}} \tab → inferred \cr\cr + • \tab \code{\link[=aes_linetype_size_shape]{linetype}} \tab → via \code{theme()} \cr\cr + • \tab \code{\link[=aes_linetype_size_shape]{linewidth}} \tab → via \code{theme()} \cr\cr +} + +\code{stat_binhex()} understands the following aesthetics. Required aesthetics are displayed in bold and defaults are displayed for optional aesthetics: +\tabular{rll}{ + • \tab \strong{\code{\link[=aes_position]{x}}} \tab \cr\cr + • \tab \strong{\code{\link[=aes_position]{y}}} \tab \cr\cr + • \tab \code{\link[=aes_colour_fill_alpha]{fill}} \tab → \code{after_stat(count)} \cr\cr + • \tab \code{\link[=aes_group_order]{group}} \tab → inferred \cr\cr + • \tab \code{weight} \tab → \code{1} \cr\cr +} + +Learn more about setting these aesthetics in \code{vignette("ggplot2-specs")}. +} diff --git a/man/geom_jitter.Rd b/man/geom_jitter.Rd index 7e9b0c9fb8..1b59059a06 100644 --- a/man/geom_jitter.Rd +++ b/man/geom_jitter.Rd @@ -123,23 +123,6 @@ The jitter geom is a convenient shortcut for variation to the location of each point, and is a useful way of handling overplotting caused by discreteness in smaller datasets. } -\section{Aesthetics}{ - -\code{geom_point()} understands the following aesthetics. Required aesthetics are displayed in bold and defaults are displayed for optional aesthetics: -\tabular{rll}{ -• \tab \strong{\code{\link[=aes_position]{x}}} \tab \cr\cr -• \tab \strong{\code{\link[=aes_position]{y}}} \tab \cr\cr -• \tab \code{\link[=aes_colour_fill_alpha]{alpha}} \tab → \code{NA} \cr\cr -• \tab \code{\link[=aes_colour_fill_alpha]{colour}} \tab → via \code{theme()} \cr\cr -• \tab \code{\link[=aes_colour_fill_alpha]{fill}} \tab → via \code{theme()} \cr\cr -• \tab \code{\link[=aes_group_order]{group}} \tab → inferred \cr\cr -• \tab \code{\link[=aes_linetype_size_shape]{shape}} \tab → via \code{theme()} \cr\cr -• \tab \code{\link[=aes_linetype_size_shape]{size}} \tab → via \code{theme()} \cr\cr -• \tab \code{stroke} \tab → via \code{theme()} \cr\cr -} -Learn more about setting these aesthetics in \code{vignette("ggplot2-specs")}. -} - \examples{ p <- ggplot(mpg, aes(cyl, hwy)) p + geom_point() @@ -165,3 +148,20 @@ ggplot(mpg, aes(cty, hwy)) + \code{\link[=geom_boxplot]{geom_boxplot()}} for another way of looking at the conditional distribution of a variable } +\section{Aesthetics}{ + +\code{geom_point()} understands the following aesthetics. Required aesthetics are displayed in bold and defaults are displayed for optional aesthetics: +\tabular{rll}{ + • \tab \strong{\code{\link[=aes_position]{x}}} \tab \cr\cr + • \tab \strong{\code{\link[=aes_position]{y}}} \tab \cr\cr + • \tab \code{\link[=aes_colour_fill_alpha]{alpha}} \tab → \code{NA} \cr\cr + • \tab \code{\link[=aes_colour_fill_alpha]{colour}} \tab → via \code{theme()} \cr\cr + • \tab \code{\link[=aes_colour_fill_alpha]{fill}} \tab → via \code{theme()} \cr\cr + • \tab \code{\link[=aes_group_order]{group}} \tab → inferred \cr\cr + • \tab \code{\link[=aes_linetype_size_shape]{shape}} \tab → via \code{theme()} \cr\cr + • \tab \code{\link[=aes_linetype_size_shape]{size}} \tab → via \code{theme()} \cr\cr + • \tab \code{stroke} \tab → via \code{theme()} \cr\cr +} + +Learn more about setting these aesthetics in \code{vignette("ggplot2-specs")}. +} diff --git a/man/geom_linerange.Rd b/man/geom_linerange.Rd index 80eb8d7e3c..311748dd98 100644 --- a/man/geom_linerange.Rd +++ b/man/geom_linerange.Rd @@ -193,24 +193,6 @@ Various ways of representing a vertical interval defined by \code{x}, 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_linerange()} understands the following aesthetics. Required aesthetics are displayed in bold and defaults are displayed for optional aesthetics: -\tabular{rll}{ -• \tab \strong{\code{\link[=aes_position]{x}} \emph{or} \code{\link[=aes_position]{y}}} \tab \cr\cr -• \tab \strong{\code{\link[=aes_position]{ymin}} \emph{or} \code{\link[=aes_position]{xmin}}} \tab \cr\cr -• \tab \strong{\code{\link[=aes_position]{ymax}} \emph{or} \code{\link[=aes_position]{xmax}}} \tab \cr\cr -• \tab \code{\link[=aes_colour_fill_alpha]{alpha}} \tab → \code{NA} \cr\cr -• \tab \code{\link[=aes_colour_fill_alpha]{colour}} \tab → via \code{theme()} \cr\cr -• \tab \code{\link[=aes_group_order]{group}} \tab → inferred \cr\cr -• \tab \code{\link[=aes_linetype_size_shape]{linetype}} \tab → via \code{theme()} \cr\cr -• \tab \code{\link[=aes_linetype_size_shape]{linewidth}} \tab → via \code{theme()} \cr\cr -} -Note that \code{geom_pointrange()} also understands \code{size} for the size of the points. - -Learn more about setting these aesthetics in \code{vignette("ggplot2-specs")}. -} - \examples{ # Create a simple example dataset df <- data.frame( @@ -263,3 +245,20 @@ geom_errorbar( \code{\link[=stat_summary]{stat_summary()}} for examples of these guys in use, \code{\link[=geom_smooth]{geom_smooth()}} for continuous analogue } +\section{Aesthetics}{ + +\code{geom_linerange()} understands the following aesthetics. Required aesthetics are displayed in bold and defaults are displayed for optional aesthetics: +\tabular{rll}{ + • \tab \strong{\code{\link[=aes_position]{x}} \emph{or} \code{\link[=aes_position]{y}}} \tab \cr\cr + • \tab \strong{\code{\link[=aes_position]{ymin}} \emph{or} \code{\link[=aes_position]{xmin}}} \tab \cr\cr + • \tab \strong{\code{\link[=aes_position]{ymax}} \emph{or} \code{\link[=aes_position]{xmax}}} \tab \cr\cr + • \tab \code{\link[=aes_colour_fill_alpha]{alpha}} \tab → \code{NA} \cr\cr + • \tab \code{\link[=aes_colour_fill_alpha]{colour}} \tab → via \code{theme()} \cr\cr + • \tab \code{\link[=aes_group_order]{group}} \tab → inferred \cr\cr + • \tab \code{\link[=aes_linetype_size_shape]{linetype}} \tab → via \code{theme()} \cr\cr + • \tab \code{\link[=aes_linetype_size_shape]{linewidth}} \tab → via \code{theme()} \cr\cr +} +Note that \code{geom_pointrange()} also understands \code{size} for the size of the points. + +Learn more about setting these aesthetics in \code{vignette("ggplot2-specs")}. +} diff --git a/man/geom_map.Rd b/man/geom_map.Rd index b4a3723c49..22f9598833 100644 --- a/man/geom_map.Rd +++ b/man/geom_map.Rd @@ -105,22 +105,6 @@ framework and does not work with sf geometry columns as input. However, it can be used in conjunction with \code{geom_sf()} layers and/or \code{\link[=coord_sf]{coord_sf()}} (see examples). } -\section{Aesthetics}{ - -\code{geom_map()} understands the following aesthetics. Required aesthetics are displayed in bold and defaults are displayed for optional aesthetics: -\tabular{rll}{ -• \tab \strong{\code{map_id}} \tab \cr\cr -• \tab \code{\link[=aes_colour_fill_alpha]{alpha}} \tab → \code{NA} \cr\cr -• \tab \code{\link[=aes_colour_fill_alpha]{colour}} \tab → via \code{theme()} \cr\cr -• \tab \code{\link[=aes_colour_fill_alpha]{fill}} \tab → via \code{theme()} \cr\cr -• \tab \code{\link[=aes_group_order]{group}} \tab → inferred \cr\cr -• \tab \code{\link[=aes_linetype_size_shape]{linetype}} \tab → via \code{theme()} \cr\cr -• \tab \code{\link[=aes_linetype_size_shape]{linewidth}} \tab → via \code{theme()} \cr\cr -• \tab \code{subgroup} \tab → \code{NULL} \cr\cr -} -Learn more about setting these aesthetics in \code{vignette("ggplot2-specs")}. -} - \examples{ # First, a made-up example containing a few polygons, to explain # how `geom_map()` works. It requires two data frames: @@ -194,3 +178,19 @@ if (require(maps)) { facet_wrap(~variable) } } +\section{Aesthetics}{ + +\code{geom_map()} understands the following aesthetics. Required aesthetics are displayed in bold and defaults are displayed for optional aesthetics: +\tabular{rll}{ + • \tab \strong{\code{map_id}} \tab \cr\cr + • \tab \code{\link[=aes_colour_fill_alpha]{alpha}} \tab → \code{NA} \cr\cr + • \tab \code{\link[=aes_colour_fill_alpha]{colour}} \tab → via \code{theme()} \cr\cr + • \tab \code{\link[=aes_colour_fill_alpha]{fill}} \tab → via \code{theme()} \cr\cr + • \tab \code{\link[=aes_group_order]{group}} \tab → inferred \cr\cr + • \tab \code{\link[=aes_linetype_size_shape]{linetype}} \tab → via \code{theme()} \cr\cr + • \tab \code{\link[=aes_linetype_size_shape]{linewidth}} \tab → via \code{theme()} \cr\cr + • \tab \code{subgroup} \tab → \code{NULL} \cr\cr +} + +Learn more about setting these aesthetics in \code{vignette("ggplot2-specs")}. +} diff --git a/man/geom_path.Rd b/man/geom_path.Rd index 6faa6ff3b4..02e3398433 100644 --- a/man/geom_path.Rd +++ b/man/geom_path.Rd @@ -184,21 +184,6 @@ corresponds to a single case which provides the start and end coordinates. 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_path()} understands the following aesthetics. Required aesthetics are displayed in bold and defaults are displayed for optional aesthetics: -\tabular{rll}{ -• \tab \strong{\code{\link[=aes_position]{x}}} \tab \cr\cr -• \tab \strong{\code{\link[=aes_position]{y}}} \tab \cr\cr -• \tab \code{\link[=aes_colour_fill_alpha]{alpha}} \tab → \code{NA} \cr\cr -• \tab \code{\link[=aes_colour_fill_alpha]{colour}} \tab → via \code{theme()} \cr\cr -• \tab \code{\link[=aes_group_order]{group}} \tab → inferred \cr\cr -• \tab \code{\link[=aes_linetype_size_shape]{linetype}} \tab → via \code{theme()} \cr\cr -• \tab \code{\link[=aes_linetype_size_shape]{linewidth}} \tab → via \code{theme()} \cr\cr -} -Learn more about setting these aesthetics in \code{vignette("ggplot2-specs")}. -} - \section{Missing value handling}{ \code{geom_path()}, \code{geom_line()}, and \code{geom_step()} handle \code{NA} as follows: @@ -281,3 +266,18 @@ should_stop(p + geom_line(aes(colour = x), linetype=2)) \code{\link[=geom_polygon]{geom_polygon()}}: Filled paths (polygons); \code{\link[=geom_segment]{geom_segment()}}: Line segments } +\section{Aesthetics}{ + +\code{geom_path()} understands the following aesthetics. Required aesthetics are displayed in bold and defaults are displayed for optional aesthetics: +\tabular{rll}{ + • \tab \strong{\code{\link[=aes_position]{x}}} \tab \cr\cr + • \tab \strong{\code{\link[=aes_position]{y}}} \tab \cr\cr + • \tab \code{\link[=aes_colour_fill_alpha]{alpha}} \tab → \code{NA} \cr\cr + • \tab \code{\link[=aes_colour_fill_alpha]{colour}} \tab → via \code{theme()} \cr\cr + • \tab \code{\link[=aes_group_order]{group}} \tab → inferred \cr\cr + • \tab \code{\link[=aes_linetype_size_shape]{linetype}} \tab → via \code{theme()} \cr\cr + • \tab \code{\link[=aes_linetype_size_shape]{linewidth}} \tab → via \code{theme()} \cr\cr +} + +Learn more about setting these aesthetics in \code{vignette("ggplot2-specs")}. +} diff --git a/man/geom_point.Rd b/man/geom_point.Rd index cb7dfb6f0b..4d2ca0f06e 100644 --- a/man/geom_point.Rd +++ b/man/geom_point.Rd @@ -136,25 +136,6 @@ Another technique is to make the points transparent (e.g. \code{geom_point(shape = ".")}). } -\section{Aesthetics}{ - -\code{geom_point()} understands the following aesthetics. Required aesthetics are displayed in bold and defaults are displayed for optional aesthetics: -\tabular{rll}{ -• \tab \strong{\code{\link[=aes_position]{x}}} \tab \cr\cr -• \tab \strong{\code{\link[=aes_position]{y}}} \tab \cr\cr -• \tab \code{\link[=aes_colour_fill_alpha]{alpha}} \tab → \code{NA} \cr\cr -• \tab \code{\link[=aes_colour_fill_alpha]{colour}} \tab → via \code{theme()} \cr\cr -• \tab \code{\link[=aes_colour_fill_alpha]{fill}} \tab → via \code{theme()} \cr\cr -• \tab \code{\link[=aes_group_order]{group}} \tab → inferred \cr\cr -• \tab \code{\link[=aes_linetype_size_shape]{shape}} \tab → via \code{theme()} \cr\cr -• \tab \code{\link[=aes_linetype_size_shape]{size}} \tab → via \code{theme()} \cr\cr -• \tab \code{stroke} \tab → via \code{theme()} \cr\cr -} -The \code{fill} aesthetic only applies to shapes 21-25. - -Learn more about setting these aesthetics in \code{vignette("ggplot2-specs")}. -} - \examples{ p <- ggplot(mtcars, aes(wt, mpg)) p + geom_point() @@ -211,3 +192,21 @@ ggplot(mtcars2, aes(wt, mpg)) + geom_point(na.rm = TRUE) } } +\section{Aesthetics}{ + +\code{geom_point()} understands the following aesthetics. Required aesthetics are displayed in bold and defaults are displayed for optional aesthetics: +\tabular{rll}{ + • \tab \strong{\code{\link[=aes_position]{x}}} \tab \cr\cr + • \tab \strong{\code{\link[=aes_position]{y}}} \tab \cr\cr + • \tab \code{\link[=aes_colour_fill_alpha]{alpha}} \tab → \code{NA} \cr\cr + • \tab \code{\link[=aes_colour_fill_alpha]{colour}} \tab → via \code{theme()} \cr\cr + • \tab \code{\link[=aes_colour_fill_alpha]{fill}} \tab → via \code{theme()} \cr\cr + • \tab \code{\link[=aes_group_order]{group}} \tab → inferred \cr\cr + • \tab \code{\link[=aes_linetype_size_shape]{shape}} \tab → via \code{theme()} \cr\cr + • \tab \code{\link[=aes_linetype_size_shape]{size}} \tab → via \code{theme()} \cr\cr + • \tab \code{stroke} \tab → via \code{theme()} \cr\cr +} +The \code{fill} aesthetic only applies to shapes 21-25. + +Learn more about setting these aesthetics in \code{vignette("ggplot2-specs")}. +} diff --git a/man/geom_polygon.Rd b/man/geom_polygon.Rd index 9d57c4e0b9..ea875f6923 100644 --- a/man/geom_polygon.Rd +++ b/man/geom_polygon.Rd @@ -130,23 +130,6 @@ to draw polygons with holes by providing a subgroup aesthetic that differentiates the outer ring points from those describing holes in the polygon. } -\section{Aesthetics}{ - -\code{geom_polygon()} understands the following aesthetics. Required aesthetics are displayed in bold and defaults are displayed for optional aesthetics: -\tabular{rll}{ -• \tab \strong{\code{\link[=aes_position]{x}}} \tab \cr\cr -• \tab \strong{\code{\link[=aes_position]{y}}} \tab \cr\cr -• \tab \code{\link[=aes_colour_fill_alpha]{alpha}} \tab → \code{NA} \cr\cr -• \tab \code{\link[=aes_colour_fill_alpha]{colour}} \tab → via \code{theme()} \cr\cr -• \tab \code{\link[=aes_colour_fill_alpha]{fill}} \tab → via \code{theme()} \cr\cr -• \tab \code{\link[=aes_group_order]{group}} \tab → inferred \cr\cr -• \tab \code{\link[=aes_linetype_size_shape]{linetype}} \tab → via \code{theme()} \cr\cr -• \tab \code{\link[=aes_linetype_size_shape]{linewidth}} \tab → via \code{theme()} \cr\cr -• \tab \code{subgroup} \tab → \code{NULL} \cr\cr -} -Learn more about setting these aesthetics in \code{vignette("ggplot2-specs")}. -} - \examples{ # When using geom_polygon, you will typically need two data frames: # one contains the coordinates of each polygon (positions), and the @@ -211,3 +194,20 @@ if (packageVersion("grid") >= "3.6") { \code{\link[=geom_path]{geom_path()}} for an unfilled polygon, \code{\link[=geom_ribbon]{geom_ribbon()}} for a polygon anchored on the x-axis } +\section{Aesthetics}{ + +\code{geom_polygon()} understands the following aesthetics. Required aesthetics are displayed in bold and defaults are displayed for optional aesthetics: +\tabular{rll}{ + • \tab \strong{\code{\link[=aes_position]{x}}} \tab \cr\cr + • \tab \strong{\code{\link[=aes_position]{y}}} \tab \cr\cr + • \tab \code{\link[=aes_colour_fill_alpha]{alpha}} \tab → \code{NA} \cr\cr + • \tab \code{\link[=aes_colour_fill_alpha]{colour}} \tab → via \code{theme()} \cr\cr + • \tab \code{\link[=aes_colour_fill_alpha]{fill}} \tab → via \code{theme()} \cr\cr + • \tab \code{\link[=aes_group_order]{group}} \tab → inferred \cr\cr + • \tab \code{\link[=aes_linetype_size_shape]{linetype}} \tab → via \code{theme()} \cr\cr + • \tab \code{\link[=aes_linetype_size_shape]{linewidth}} \tab → via \code{theme()} \cr\cr + • \tab \code{subgroup} \tab → \code{NULL} \cr\cr +} + +Learn more about setting these aesthetics in \code{vignette("ggplot2-specs")}. +} diff --git a/man/geom_qq.Rd b/man/geom_qq.Rd index aad48d91b0..1c5657fa38 100644 --- a/man/geom_qq.Rd +++ b/man/geom_qq.Rd @@ -170,28 +170,6 @@ the default plot specification, e.g. \code{\link[=annotation_borders]{annotation \code{stat_qq_line()} compute the slope and intercept of the line connecting the points at specified quartiles of the theoretical and sample distributions. } -\section{Aesthetics}{ - -\code{stat_qq()} understands the following aesthetics. Required aesthetics are displayed in bold and defaults are displayed for optional aesthetics: -\tabular{rll}{ -• \tab \strong{\code{sample}} \tab \cr\cr -• \tab \code{\link[=aes_group_order]{group}} \tab → inferred \cr\cr -• \tab \code{\link[=aes_position]{x}} \tab → \code{after_stat(theoretical)} \cr\cr -• \tab \code{\link[=aes_position]{y}} \tab → \code{after_stat(sample)} \cr\cr -} -Learn more about setting these aesthetics in \code{vignette("ggplot2-specs")}. - - -\code{stat_qq_line()} understands the following aesthetics. Required aesthetics are displayed in bold and defaults are displayed for optional aesthetics: -\tabular{rll}{ -• \tab \strong{\code{sample}} \tab \cr\cr -• \tab \code{\link[=aes_group_order]{group}} \tab → inferred \cr\cr -• \tab \code{\link[=aes_position]{x}} \tab → \code{after_stat(x)} \cr\cr -• \tab \code{\link[=aes_position]{y}} \tab → \code{after_stat(y)} \cr\cr -} -Learn more about setting these aesthetics in \code{vignette("ggplot2-specs")}. -} - \section{Computed variables}{ These are calculated by the 'stat' part of layers and can be accessed with \link[=aes_eval]{delayed evaluation}. \cr Variables computed by \code{stat_qq()}: @@ -235,3 +213,23 @@ ggplot(mtcars, aes(sample = mpg, colour = factor(cyl))) + stat_qq_line() } } +\section{Aesthetics}{ + +\code{stat_qq()} understands the following aesthetics. Required aesthetics are displayed in bold and defaults are displayed for optional aesthetics: +\tabular{rll}{ + • \tab \strong{\code{sample}} \tab \cr\cr + • \tab \code{\link[=aes_group_order]{group}} \tab → inferred \cr\cr + • \tab \code{\link[=aes_position]{x}} \tab → \code{after_stat(theoretical)} \cr\cr + • \tab \code{\link[=aes_position]{y}} \tab → \code{after_stat(sample)} \cr\cr +} + +\code{stat_qq_line()} understands the following aesthetics. Required aesthetics are displayed in bold and defaults are displayed for optional aesthetics: +\tabular{rll}{ + • \tab \strong{\code{sample}} \tab \cr\cr + • \tab \code{\link[=aes_group_order]{group}} \tab → inferred \cr\cr + • \tab \code{\link[=aes_position]{x}} \tab → \code{after_stat(x)} \cr\cr + • \tab \code{\link[=aes_position]{y}} \tab → \code{after_stat(y)} \cr\cr +} + +Learn more about setting these aesthetics in \code{vignette("ggplot2-specs")}. +} diff --git a/man/geom_quantile.Rd b/man/geom_quantile.Rd index 5dd46d2409..6ca43e11e6 100644 --- a/man/geom_quantile.Rd +++ b/man/geom_quantile.Rd @@ -144,22 +144,6 @@ function defined by \code{method}.} This fits a quantile regression to the data and draws the fitted quantiles with lines. This is as a continuous analogue to \code{\link[=geom_boxplot]{geom_boxplot()}}. } -\section{Aesthetics}{ - -\code{geom_quantile()} understands the following aesthetics. Required aesthetics are displayed in bold and defaults are displayed for optional aesthetics: -\tabular{rll}{ -• \tab \strong{\code{\link[=aes_position]{x}}} \tab \cr\cr -• \tab \strong{\code{\link[=aes_position]{y}}} \tab \cr\cr -• \tab \code{\link[=aes_colour_fill_alpha]{alpha}} \tab → \code{NA} \cr\cr -• \tab \code{\link[=aes_colour_fill_alpha]{colour}} \tab → via \code{theme()} \cr\cr -• \tab \code{\link[=aes_group_order]{group}} \tab → inferred \cr\cr -• \tab \code{\link[=aes_linetype_size_shape]{linetype}} \tab → via \code{theme()} \cr\cr -• \tab \code{\link[=aes_linetype_size_shape]{linewidth}} \tab → via \code{theme()} \cr\cr -• \tab \code{weight} \tab → \code{1} \cr\cr -} -Learn more about setting these aesthetics in \code{vignette("ggplot2-specs")}. -} - \section{Computed variables}{ These are calculated by the 'stat' part of layers and can be accessed with \link[=aes_eval]{delayed evaluation}. @@ -186,3 +170,19 @@ m + geom_quantile(method = "rqss", lambda = 0.1) # Set aesthetics to fixed value m + geom_quantile(colour = "red", linewidth = 2, alpha = 0.5) } +\section{Aesthetics}{ + +\code{geom_quantile()} understands the following aesthetics. Required aesthetics are displayed in bold and defaults are displayed for optional aesthetics: +\tabular{rll}{ + • \tab \strong{\code{\link[=aes_position]{x}}} \tab \cr\cr + • \tab \strong{\code{\link[=aes_position]{y}}} \tab \cr\cr + • \tab \code{\link[=aes_colour_fill_alpha]{alpha}} \tab → \code{NA} \cr\cr + • \tab \code{\link[=aes_colour_fill_alpha]{colour}} \tab → via \code{theme()} \cr\cr + • \tab \code{\link[=aes_group_order]{group}} \tab → inferred \cr\cr + • \tab \code{\link[=aes_linetype_size_shape]{linetype}} \tab → via \code{theme()} \cr\cr + • \tab \code{\link[=aes_linetype_size_shape]{linewidth}} \tab → via \code{theme()} \cr\cr + • \tab \code{weight} \tab → \code{1} \cr\cr +} + +Learn more about setting these aesthetics in \code{vignette("ggplot2-specs")}. +} diff --git a/man/geom_ribbon.Rd b/man/geom_ribbon.Rd index ebc6c796b1..612fd8c742 100644 --- a/man/geom_ribbon.Rd +++ b/man/geom_ribbon.Rd @@ -190,23 +190,6 @@ be used instead. 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_ribbon()} understands the following aesthetics. Required aesthetics are displayed in bold and defaults are displayed for optional aesthetics: -\tabular{rll}{ -• \tab \strong{\code{\link[=aes_position]{x}} \emph{or} \code{\link[=aes_position]{y}}} \tab \cr\cr -• \tab \strong{\code{\link[=aes_position]{ymin}} \emph{or} \code{\link[=aes_position]{xmin}}} \tab \cr\cr -• \tab \strong{\code{\link[=aes_position]{ymax}} \emph{or} \code{\link[=aes_position]{xmax}}} \tab \cr\cr -• \tab \code{\link[=aes_colour_fill_alpha]{alpha}} \tab → \code{NA} \cr\cr -• \tab \code{\link[=aes_colour_fill_alpha]{colour}} \tab → via \code{theme()} \cr\cr -• \tab \code{\link[=aes_colour_fill_alpha]{fill}} \tab → via \code{theme()} \cr\cr -• \tab \code{\link[=aes_group_order]{group}} \tab → inferred \cr\cr -• \tab \code{\link[=aes_linetype_size_shape]{linetype}} \tab → via \code{theme()} \cr\cr -• \tab \code{\link[=aes_linetype_size_shape]{linewidth}} \tab → via \code{theme()} \cr\cr -} -Learn more about setting these aesthetics in \code{vignette("ggplot2-specs")}. -} - \examples{ # Generate data huron <- data.frame(year = 1875:1972, level = as.vector(LakeHuron)) @@ -250,3 +233,20 @@ ggplot(df, aes(x, y, fill = g)) + \code{\link[=geom_linerange]{geom_linerange()}} for discrete intervals (lines), \code{\link[=geom_polygon]{geom_polygon()}} for general polygons } +\section{Aesthetics}{ + +\code{geom_ribbon()} understands the following aesthetics. Required aesthetics are displayed in bold and defaults are displayed for optional aesthetics: +\tabular{rll}{ + • \tab \strong{\code{\link[=aes_position]{x}} \emph{or} \code{\link[=aes_position]{y}}} \tab \cr\cr + • \tab \strong{\code{\link[=aes_position]{ymin}} \emph{or} \code{\link[=aes_position]{xmin}}} \tab \cr\cr + • \tab \strong{\code{\link[=aes_position]{ymax}} \emph{or} \code{\link[=aes_position]{xmax}}} \tab \cr\cr + • \tab \code{\link[=aes_colour_fill_alpha]{alpha}} \tab → \code{NA} \cr\cr + • \tab \code{\link[=aes_colour_fill_alpha]{colour}} \tab → via \code{theme()} \cr\cr + • \tab \code{\link[=aes_colour_fill_alpha]{fill}} \tab → via \code{theme()} \cr\cr + • \tab \code{\link[=aes_group_order]{group}} \tab → inferred \cr\cr + • \tab \code{\link[=aes_linetype_size_shape]{linetype}} \tab → via \code{theme()} \cr\cr + • \tab \code{\link[=aes_linetype_size_shape]{linewidth}} \tab → via \code{theme()} \cr\cr +} + +Learn more about setting these aesthetics in \code{vignette("ggplot2-specs")}. +} diff --git a/man/geom_rug.Rd b/man/geom_rug.Rd index d9bca56c63..c93a6961c8 100644 --- a/man/geom_rug.Rd +++ b/man/geom_rug.Rd @@ -131,21 +131,6 @@ of the total plot size. Since the default scale expansion of for continuous variables is 5\% at both ends of the scale, the rug will not overlap with any data points under the default settings. } -\section{Aesthetics}{ - -\code{geom_rug()} understands the following aesthetics. Required aesthetics are displayed in bold and defaults are displayed for optional aesthetics: -\tabular{rll}{ -• \tab \code{\link[=aes_colour_fill_alpha]{alpha}} \tab → \code{NA} \cr\cr -• \tab \code{\link[=aes_colour_fill_alpha]{colour}} \tab → via \code{theme()} \cr\cr -• \tab \code{\link[=aes_group_order]{group}} \tab → inferred \cr\cr -• \tab \code{\link[=aes_linetype_size_shape]{linetype}} \tab → via \code{theme()} \cr\cr -• \tab \code{\link[=aes_linetype_size_shape]{linewidth}} \tab → via \code{theme()} \cr\cr -• \tab \code{\link[=aes_position]{x}} \tab \cr\cr -• \tab \code{\link[=aes_position]{y}} \tab \cr\cr -} -Learn more about setting these aesthetics in \code{vignette("ggplot2-specs")}. -} - \examples{ p <- ggplot(mtcars, aes(wt, mpg)) + geom_point() @@ -181,3 +166,18 @@ p + geom_rug(length = unit(0.05, "npc")) + scale_y_continuous(expand = c(0.1, 0.1)) } +\section{Aesthetics}{ + +\code{geom_rug()} understands the following aesthetics. Required aesthetics are displayed in bold and defaults are displayed for optional aesthetics: +\tabular{rll}{ + • \tab \code{\link[=aes_colour_fill_alpha]{alpha}} \tab → \code{NA} \cr\cr + • \tab \code{\link[=aes_colour_fill_alpha]{colour}} \tab → via \code{theme()} \cr\cr + • \tab \code{\link[=aes_group_order]{group}} \tab → inferred \cr\cr + • \tab \code{\link[=aes_linetype_size_shape]{linetype}} \tab → via \code{theme()} \cr\cr + • \tab \code{\link[=aes_linetype_size_shape]{linewidth}} \tab → via \code{theme()} \cr\cr + • \tab \code{\link[=aes_position]{x}} \tab \cr\cr + • \tab \code{\link[=aes_position]{y}} \tab \cr\cr +} + +Learn more about setting these aesthetics in \code{vignette("ggplot2-specs")}. +} diff --git a/man/geom_segment.Rd b/man/geom_segment.Rd index da25a6bc96..3ea613864a 100644 --- a/man/geom_segment.Rd +++ b/man/geom_segment.Rd @@ -160,22 +160,6 @@ control the curve. Both geoms draw a single segment/curve per case. See \code{geom_path()} if you need to connect points across multiple cases. } -\section{Aesthetics}{ - -\code{geom_segment()} understands the following aesthetics. Required aesthetics are displayed in bold and defaults are displayed for optional aesthetics: -\tabular{rll}{ -• \tab \strong{\code{\link[=aes_position]{x}}} \tab \cr\cr -• \tab \strong{\code{\link[=aes_position]{y}}} \tab \cr\cr -• \tab \strong{\code{\link[=aes_position]{xend}} \emph{or} \code{\link[=aes_position]{yend}}} \tab \cr\cr -• \tab \code{\link[=aes_colour_fill_alpha]{alpha}} \tab → \code{NA} \cr\cr -• \tab \code{\link[=aes_colour_fill_alpha]{colour}} \tab → via \code{theme()} \cr\cr -• \tab \code{\link[=aes_group_order]{group}} \tab → inferred \cr\cr -• \tab \code{\link[=aes_linetype_size_shape]{linetype}} \tab → via \code{theme()} \cr\cr -• \tab \code{\link[=aes_linetype_size_shape]{linewidth}} \tab → via \code{theme()} \cr\cr -} -Learn more about setting these aesthetics in \code{vignette("ggplot2-specs")}. -} - \examples{ b <- ggplot(mtcars, aes(wt, mpg)) + geom_point() @@ -231,3 +215,19 @@ segment lines and paths. \code{\link[=geom_spoke]{geom_spoke()}} for a segment parameterised by a location (x, y), and an angle and radius. } +\section{Aesthetics}{ + +\code{geom_segment()} understands the following aesthetics. Required aesthetics are displayed in bold and defaults are displayed for optional aesthetics: +\tabular{rll}{ + • \tab \strong{\code{\link[=aes_position]{x}}} \tab \cr\cr + • \tab \strong{\code{\link[=aes_position]{y}}} \tab \cr\cr + • \tab \strong{\code{\link[=aes_position]{xend}} \emph{or} \code{\link[=aes_position]{yend}}} \tab \cr\cr + • \tab \code{\link[=aes_colour_fill_alpha]{alpha}} \tab → \code{NA} \cr\cr + • \tab \code{\link[=aes_colour_fill_alpha]{colour}} \tab → via \code{theme()} \cr\cr + • \tab \code{\link[=aes_group_order]{group}} \tab → inferred \cr\cr + • \tab \code{\link[=aes_linetype_size_shape]{linetype}} \tab → via \code{theme()} \cr\cr + • \tab \code{\link[=aes_linetype_size_shape]{linewidth}} \tab → via \code{theme()} \cr\cr +} + +Learn more about setting these aesthetics in \code{vignette("ggplot2-specs")}. +} diff --git a/man/geom_smooth.Rd b/man/geom_smooth.Rd index 6b4e0c7b92..3411f233da 100644 --- a/man/geom_smooth.Rd +++ b/man/geom_smooth.Rd @@ -194,25 +194,6 @@ scale and then back-transformed to the response scale. 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_smooth()} understands the following aesthetics. Required aesthetics are displayed in bold and defaults are displayed for optional aesthetics: -\tabular{rll}{ -• \tab \strong{\code{\link[=aes_position]{x}}} \tab \cr\cr -• \tab \strong{\code{\link[=aes_position]{y}}} \tab \cr\cr -• \tab \code{\link[=aes_colour_fill_alpha]{alpha}} \tab → \code{0.4} \cr\cr -• \tab \code{\link[=aes_colour_fill_alpha]{colour}} \tab → via \code{theme()} \cr\cr -• \tab \code{\link[=aes_colour_fill_alpha]{fill}} \tab → via \code{theme()} \cr\cr -• \tab \code{\link[=aes_group_order]{group}} \tab → inferred \cr\cr -• \tab \code{\link[=aes_linetype_size_shape]{linetype}} \tab → via \code{theme()} \cr\cr -• \tab \code{\link[=aes_linetype_size_shape]{linewidth}} \tab → via \code{theme()} \cr\cr -• \tab \code{weight} \tab → \code{1} \cr\cr -• \tab \code{\link[=aes_position]{ymax}} \tab \cr\cr -• \tab \code{\link[=aes_position]{ymin}} \tab \cr\cr -} -Learn more about setting these aesthetics in \code{vignette("ggplot2-specs")}. -} - \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: @@ -289,3 +270,22 @@ See individual modelling functions for more details: \code{\link[=glm]{glm()}} for generalised linear smooths, and \code{\link[=loess]{loess()}} for local smooths. } +\section{Aesthetics}{ + +\code{geom_smooth()} understands the following aesthetics. Required aesthetics are displayed in bold and defaults are displayed for optional aesthetics: +\tabular{rll}{ + • \tab \strong{\code{\link[=aes_position]{x}}} \tab \cr\cr + • \tab \strong{\code{\link[=aes_position]{y}}} \tab \cr\cr + • \tab \code{\link[=aes_colour_fill_alpha]{alpha}} \tab → \code{0.4} \cr\cr + • \tab \code{\link[=aes_colour_fill_alpha]{colour}} \tab → via \code{theme()} \cr\cr + • \tab \code{\link[=aes_colour_fill_alpha]{fill}} \tab → via \code{theme()} \cr\cr + • \tab \code{\link[=aes_group_order]{group}} \tab → inferred \cr\cr + • \tab \code{\link[=aes_linetype_size_shape]{linetype}} \tab → via \code{theme()} \cr\cr + • \tab \code{\link[=aes_linetype_size_shape]{linewidth}} \tab → via \code{theme()} \cr\cr + • \tab \code{weight} \tab → \code{1} \cr\cr + • \tab \code{\link[=aes_position]{ymax}} \tab \cr\cr + • \tab \code{\link[=aes_position]{ymin}} \tab \cr\cr +} + +Learn more about setting these aesthetics in \code{vignette("ggplot2-specs")}. +} diff --git a/man/geom_spoke.Rd b/man/geom_spoke.Rd index 9e62a56d66..90fb3508f0 100644 --- a/man/geom_spoke.Rd +++ b/man/geom_spoke.Rd @@ -125,23 +125,6 @@ This is a polar parameterisation of \code{\link[=geom_segment]{geom_segment()}}. useful when you have variables that describe direction and distance. The angles start from east and increase counterclockwise. } -\section{Aesthetics}{ - -\code{geom_spoke()} understands the following aesthetics. Required aesthetics are displayed in bold and defaults are displayed for optional aesthetics: -\tabular{rll}{ -• \tab \strong{\code{\link[=aes_position]{x}}} \tab \cr\cr -• \tab \strong{\code{\link[=aes_position]{y}}} \tab \cr\cr -• \tab \strong{\code{angle}} \tab \cr\cr -• \tab \strong{\code{radius}} \tab \cr\cr -• \tab \code{\link[=aes_colour_fill_alpha]{alpha}} \tab → \code{NA} \cr\cr -• \tab \code{\link[=aes_colour_fill_alpha]{colour}} \tab → via \code{theme()} \cr\cr -• \tab \code{\link[=aes_group_order]{group}} \tab → inferred \cr\cr -• \tab \code{\link[=aes_linetype_size_shape]{linetype}} \tab → via \code{theme()} \cr\cr -• \tab \code{\link[=aes_linetype_size_shape]{linewidth}} \tab → via \code{theme()} \cr\cr -} -Learn more about setting these aesthetics in \code{vignette("ggplot2-specs")}. -} - \examples{ df <- expand.grid(x = 1:10, y=1:10) @@ -157,3 +140,20 @@ ggplot(df, aes(x, y)) + geom_point() + geom_spoke(aes(angle = angle, radius = speed)) } +\section{Aesthetics}{ + +\code{geom_spoke()} understands the following aesthetics. Required aesthetics are displayed in bold and defaults are displayed for optional aesthetics: +\tabular{rll}{ + • \tab \strong{\code{\link[=aes_position]{x}}} \tab \cr\cr + • \tab \strong{\code{\link[=aes_position]{y}}} \tab \cr\cr + • \tab \strong{\code{angle}} \tab \cr\cr + • \tab \strong{\code{radius}} \tab \cr\cr + • \tab \code{\link[=aes_colour_fill_alpha]{alpha}} \tab → \code{NA} \cr\cr + • \tab \code{\link[=aes_colour_fill_alpha]{colour}} \tab → via \code{theme()} \cr\cr + • \tab \code{\link[=aes_group_order]{group}} \tab → inferred \cr\cr + • \tab \code{\link[=aes_linetype_size_shape]{linetype}} \tab → via \code{theme()} \cr\cr + • \tab \code{\link[=aes_linetype_size_shape]{linewidth}} \tab → via \code{theme()} \cr\cr +} + +Learn more about setting these aesthetics in \code{vignette("ggplot2-specs")}. +} diff --git a/man/geom_text.Rd b/man/geom_text.Rd index 7b07eaad34..b1083b6081 100644 --- a/man/geom_text.Rd +++ b/man/geom_text.Rd @@ -183,27 +183,6 @@ To automatically position non-overlapping text labels see the \href{https://cran.r-project.org/package=ggrepel}{ggrepel} package. } -\section{Aesthetics}{ - -\code{geom_text()} understands the following aesthetics. Required aesthetics are displayed in bold and defaults are displayed for optional aesthetics: -\tabular{rll}{ -• \tab \strong{\code{\link[=aes_position]{x}}} \tab \cr\cr -• \tab \strong{\code{\link[=aes_position]{y}}} \tab \cr\cr -• \tab \strong{\code{label}} \tab \cr\cr -• \tab \code{\link[=aes_colour_fill_alpha]{alpha}} \tab → \code{NA} \cr\cr -• \tab \code{angle} \tab → \code{0} \cr\cr -• \tab \code{\link[=aes_colour_fill_alpha]{colour}} \tab → via \code{theme()} \cr\cr -• \tab \code{family} \tab → via \code{theme()} \cr\cr -• \tab \code{fontface} \tab → \code{1} \cr\cr -• \tab \code{\link[=aes_group_order]{group}} \tab → inferred \cr\cr -• \tab \code{hjust} \tab → \code{0.5} \cr\cr -• \tab \code{lineheight} \tab → \code{1.2} \cr\cr -• \tab \code{\link[=aes_linetype_size_shape]{size}} \tab → via \code{theme()} \cr\cr -• \tab \code{vjust} \tab → \code{0.5} \cr\cr -} -Learn more about setting these aesthetics in \code{vignette("ggplot2-specs")}. -} - \section{\code{geom_label()}}{ Currently \code{geom_label()} does not support the \code{check_overlap} argument. Also, @@ -325,3 +304,24 @@ ggplot(df, aes(x, y)) + \seealso{ The \href{https://ggplot2-book.org/annotations#sec-text-labels}{text labels section} of the online ggplot2 book. } +\section{Aesthetics}{ + +\code{geom_text()} understands the following aesthetics. Required aesthetics are displayed in bold and defaults are displayed for optional aesthetics: +\tabular{rll}{ + • \tab \strong{\code{\link[=aes_position]{x}}} \tab \cr\cr + • \tab \strong{\code{\link[=aes_position]{y}}} \tab \cr\cr + • \tab \strong{\code{label}} \tab \cr\cr + • \tab \code{\link[=aes_colour_fill_alpha]{alpha}} \tab → \code{NA} \cr\cr + • \tab \code{angle} \tab → \code{0} \cr\cr + • \tab \code{\link[=aes_colour_fill_alpha]{colour}} \tab → via \code{theme()} \cr\cr + • \tab \code{family} \tab → via \code{theme()} \cr\cr + • \tab \code{fontface} \tab → \code{1} \cr\cr + • \tab \code{\link[=aes_group_order]{group}} \tab → inferred \cr\cr + • \tab \code{hjust} \tab → \code{0.5} \cr\cr + • \tab \code{lineheight} \tab → \code{1.2} \cr\cr + • \tab \code{\link[=aes_linetype_size_shape]{size}} \tab → via \code{theme()} \cr\cr + • \tab \code{vjust} \tab → \code{0.5} \cr\cr +} + +Learn more about setting these aesthetics in \code{vignette("ggplot2-specs")}. +} diff --git a/man/geom_tile.Rd b/man/geom_tile.Rd index 10b8e3fe89..575dbb0743 100644 --- a/man/geom_tile.Rd +++ b/man/geom_tile.Rd @@ -161,25 +161,6 @@ Please note that the \code{width} and \code{height} aesthetics are not true posi aesthetics and therefore are not subject to scale transformation. It is only after transformation that these aesthetics are applied. } -\section{Aesthetics}{ - -\code{geom_rect()} understands the following aesthetics. Required aesthetics are displayed in bold and defaults are displayed for optional aesthetics: -\tabular{rll}{ -• \tab \strong{\code{\link[=aes_position]{x}} \emph{or} \code{width} \emph{or} \code{\link[=aes_position]{xmin}} \emph{or} \code{\link[=aes_position]{xmax}}} \tab \cr\cr -• \tab \strong{\code{\link[=aes_position]{y}} \emph{or} \code{height} \emph{or} \code{\link[=aes_position]{ymin}} \emph{or} \code{\link[=aes_position]{ymax}}} \tab \cr\cr -• \tab \code{\link[=aes_colour_fill_alpha]{alpha}} \tab → \code{NA} \cr\cr -• \tab \code{\link[=aes_colour_fill_alpha]{colour}} \tab → via \code{theme()} \cr\cr -• \tab \code{\link[=aes_colour_fill_alpha]{fill}} \tab → via \code{theme()} \cr\cr -• \tab \code{\link[=aes_group_order]{group}} \tab → inferred \cr\cr -• \tab \code{\link[=aes_linetype_size_shape]{linetype}} \tab → via \code{theme()} \cr\cr -• \tab \code{\link[=aes_linetype_size_shape]{linewidth}} \tab → via \code{theme()} \cr\cr -} -\code{geom_tile()} understands only the \code{x}/\code{width} and \code{y}/\code{height} combinations. -Note that \code{geom_raster()} ignores \code{colour}. - -Learn more about setting these aesthetics in \code{vignette("ggplot2-specs")}. -} - \examples{ # The most common use for rectangles is to draw a surface. You always want # to use geom_raster here because it's so much faster, and produces @@ -237,3 +218,21 @@ cars + ) } } +\section{Aesthetics}{ + +\code{geom_rect()} understands the following aesthetics. Required aesthetics are displayed in bold and defaults are displayed for optional aesthetics: +\tabular{rll}{ + • \tab \strong{\code{\link[=aes_position]{x}} \emph{or} \code{width} \emph{or} \code{\link[=aes_position]{xmin}} \emph{or} \code{\link[=aes_position]{xmax}}} \tab \cr\cr + • \tab \strong{\code{\link[=aes_position]{y}} \emph{or} \code{height} \emph{or} \code{\link[=aes_position]{ymin}} \emph{or} \code{\link[=aes_position]{ymax}}} \tab \cr\cr + • \tab \code{\link[=aes_colour_fill_alpha]{alpha}} \tab → \code{NA} \cr\cr + • \tab \code{\link[=aes_colour_fill_alpha]{colour}} \tab → via \code{theme()} \cr\cr + • \tab \code{\link[=aes_colour_fill_alpha]{fill}} \tab → via \code{theme()} \cr\cr + • \tab \code{\link[=aes_group_order]{group}} \tab → inferred \cr\cr + • \tab \code{\link[=aes_linetype_size_shape]{linetype}} \tab → via \code{theme()} \cr\cr + • \tab \code{\link[=aes_linetype_size_shape]{linewidth}} \tab → via \code{theme()} \cr\cr +} +\code{geom_tile()} understands only the \code{x}/\code{width} and \code{y}/\code{height} combinations. +Note that \code{geom_raster()} ignores \code{colour}. + +Learn more about setting these aesthetics in \code{vignette("ggplot2-specs")}. +} diff --git a/man/geom_violin.Rd b/man/geom_violin.Rd index aad2037427..0d91bd4722 100644 --- a/man/geom_violin.Rd +++ b/man/geom_violin.Rd @@ -183,24 +183,6 @@ boxplot. 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_violin()} understands the following aesthetics. Required aesthetics are displayed in bold and defaults are displayed for optional aesthetics: -\tabular{rll}{ -• \tab \strong{\code{\link[=aes_position]{x}}} \tab \cr\cr -• \tab \strong{\code{\link[=aes_position]{y}}} \tab \cr\cr -• \tab \code{\link[=aes_colour_fill_alpha]{alpha}} \tab → \code{NA} \cr\cr -• \tab \code{\link[=aes_colour_fill_alpha]{colour}} \tab → via \code{theme()} \cr\cr -• \tab \code{\link[=aes_colour_fill_alpha]{fill}} \tab → via \code{theme()} \cr\cr -• \tab \code{\link[=aes_group_order]{group}} \tab → inferred \cr\cr -• \tab \code{\link[=aes_linetype_size_shape]{linetype}} \tab → via \code{theme()} \cr\cr -• \tab \code{\link[=aes_linetype_size_shape]{linewidth}} \tab → via \code{theme()} \cr\cr -• \tab \code{weight} \tab → \code{1} \cr\cr -• \tab \code{width} \tab → \code{0.9} \cr\cr -} -Learn more about setting these aesthetics in \code{vignette("ggplot2-specs")}. -} - \section{Computed variables}{ These are calculated by the 'stat' part of layers and can be accessed with \link[=aes_eval]{delayed evaluation}. @@ -286,3 +268,21 @@ Plot-Density Trace Synergism. The American Statistician 52, 181-184. \code{\link[=geom_violin]{geom_violin()}} for examples, and \code{\link[=stat_density]{stat_density()}} for examples with data along the x axis. } +\section{Aesthetics}{ + +\code{geom_violin()} understands the following aesthetics. Required aesthetics are displayed in bold and defaults are displayed for optional aesthetics: +\tabular{rll}{ + • \tab \strong{\code{\link[=aes_position]{x}}} \tab \cr\cr + • \tab \strong{\code{\link[=aes_position]{y}}} \tab \cr\cr + • \tab \code{\link[=aes_colour_fill_alpha]{alpha}} \tab → \code{NA} \cr\cr + • \tab \code{\link[=aes_colour_fill_alpha]{colour}} \tab → via \code{theme()} \cr\cr + • \tab \code{\link[=aes_colour_fill_alpha]{fill}} \tab → via \code{theme()} \cr\cr + • \tab \code{\link[=aes_group_order]{group}} \tab → inferred \cr\cr + • \tab \code{\link[=aes_linetype_size_shape]{linetype}} \tab → via \code{theme()} \cr\cr + • \tab \code{\link[=aes_linetype_size_shape]{linewidth}} \tab → via \code{theme()} \cr\cr + • \tab \code{weight} \tab → \code{1} \cr\cr + • \tab \code{width} \tab → \code{0.9} \cr\cr +} + +Learn more about setting these aesthetics in \code{vignette("ggplot2-specs")}. +} diff --git a/man/position_dodge.Rd b/man/position_dodge.Rd index 0f957b4182..850d233e83 100644 --- a/man/position_dodge.Rd +++ b/man/position_dodge.Rd @@ -46,15 +46,6 @@ be specified in the global or \verb{geom_*} layer. Unlike \code{position_dodge() particularly useful for arranging box plots, which can have variable widths. } -\section{Aesthetics}{ - -\code{position_dodge()} understands the following aesthetics. Required aesthetics are displayed in bold and defaults are displayed for optional aesthetics: -\tabular{rll}{ -• \tab \code{order} \tab → \code{NULL} \cr\cr -} -Learn more about setting these aesthetics in \code{vignette("ggplot2-specs")}. -} - \examples{ ggplot(mtcars, aes(factor(cyl), fill = factor(vs))) + geom_bar(position = "dodge2") @@ -129,3 +120,12 @@ Other position adjustments: \code{\link{position_stack}()} } \concept{position adjustments} +\section{Aesthetics}{ + +\code{position_dodge()} understands the following aesthetics. Required aesthetics are displayed in bold and defaults are displayed for optional aesthetics: +\tabular{rll}{ + • \tab \code{order} \tab → \code{NULL} \cr\cr +} + +Learn more about setting these aesthetics in \code{vignette("ggplot2-specs")}. +} diff --git a/man/position_nudge.Rd b/man/position_nudge.Rd index 07fcd63447..85dea89c58 100644 --- a/man/position_nudge.Rd +++ b/man/position_nudge.Rd @@ -15,16 +15,6 @@ items on discrete scales by a small amount. Nudging is built in to \code{\link[=geom_text]{geom_text()}} because it's so useful for moving labels a small distance from what they're labelling. } -\section{Aesthetics}{ - -\code{position_nudge()} understands the following aesthetics. Required aesthetics are displayed in bold and defaults are displayed for optional aesthetics: -\tabular{rll}{ -• \tab \code{nudge_x} \tab → \code{0} \cr\cr -• \tab \code{nudge_y} \tab → \code{0} \cr\cr -} -Learn more about setting these aesthetics in \code{vignette("ggplot2-specs")}. -} - \examples{ df <- data.frame( x = c(1,3,2,5), @@ -58,3 +48,13 @@ Other position adjustments: \code{\link{position_stack}()} } \concept{position adjustments} +\section{Aesthetics}{ + +\code{position_nudge()} understands the following aesthetics. Required aesthetics are displayed in bold and defaults are displayed for optional aesthetics: +\tabular{rll}{ + • \tab \code{nudge_x} \tab → \code{0} \cr\cr + • \tab \code{nudge_y} \tab → \code{0} \cr\cr +} + +Learn more about setting these aesthetics in \code{vignette("ggplot2-specs")}. +} diff --git a/man/stat_connect.Rd b/man/stat_connect.Rd index a8b1668e6f..1e033fe2c7 100644 --- a/man/stat_connect.Rd +++ b/man/stat_connect.Rd @@ -126,17 +126,6 @@ the default plot specification, e.g. \code{\link[=annotation_borders]{annotation \description{ Connect successive points with lines of different shapes. } -\section{Aesthetics}{ - -\code{stat_connect()} understands the following aesthetics. Required aesthetics are displayed in bold and defaults are displayed for optional aesthetics: -\tabular{rll}{ -• \tab \strong{\code{\link[=aes_position]{x}} \emph{or} \code{\link[=aes_position]{xmin}} \emph{or} \code{\link[=aes_position]{xmax}}} \tab \cr\cr -• \tab \strong{\code{\link[=aes_position]{y}} \emph{or} \code{\link[=aes_position]{ymin}} \emph{or} \code{\link[=aes_position]{ymax}}} \tab \cr\cr -• \tab \code{\link[=aes_group_order]{group}} \tab → inferred \cr\cr -} -Learn more about setting these aesthetics in \code{vignette("ggplot2-specs")}. -} - \examples{ ggplot(head(economics, 20), aes(date, unemploy)) + stat_connect(connection = "hv") @@ -151,3 +140,14 @@ ggplot(head(economics, 10), aes(date, unemploy)) + stat_connect(aes(colour = "zigzag"), connection = zigzag) + stat_connect(aes(colour = "smooth"), connection = smooth) } +\section{Aesthetics}{ + +\code{stat_connect()} understands the following aesthetics. Required aesthetics are displayed in bold and defaults are displayed for optional aesthetics: +\tabular{rll}{ + • \tab \strong{\code{\link[=aes_position]{x}} \emph{or} \code{\link[=aes_position]{xmin}} \emph{or} \code{\link[=aes_position]{xmax}}} \tab \cr\cr + • \tab \strong{\code{\link[=aes_position]{y}} \emph{or} \code{\link[=aes_position]{ymin}} \emph{or} \code{\link[=aes_position]{ymax}}} \tab \cr\cr + • \tab \code{\link[=aes_group_order]{group}} \tab → inferred \cr\cr +} + +Learn more about setting these aesthetics in \code{vignette("ggplot2-specs")}. +} diff --git a/man/stat_ecdf.Rd b/man/stat_ecdf.Rd index 94a91b5b79..560947ab42 100644 --- a/man/stat_ecdf.Rd +++ b/man/stat_ecdf.Rd @@ -132,17 +132,6 @@ If the \code{weight} aesthetic is provided, a weighted ECDF will be computed. In this case, the ECDF is incremented by \code{weight / sum(weight)} instead of \code{1 / length(x)} for each observation. } -\section{Aesthetics}{ - -\code{stat_ecdf()} understands the following aesthetics. Required aesthetics are displayed in bold and defaults are displayed for optional aesthetics: -\tabular{rll}{ -• \tab \strong{\code{\link[=aes_position]{x}} \emph{or} \code{\link[=aes_position]{y}}} \tab \cr\cr -• \tab \code{\link[=aes_group_order]{group}} \tab → inferred \cr\cr -• \tab \code{weight} \tab → \code{NULL} \cr\cr -} -Learn more about setting these aesthetics in \code{vignette("ggplot2-specs")}. -} - \section{Computed variables}{ These are calculated by the 'stat' part of layers and can be accessed with \link[=aes_eval]{delayed evaluation}. @@ -188,3 +177,14 @@ ggplot(plain, aes(x)) + data = weighted, colour = "green" ) } +\section{Aesthetics}{ + +\code{stat_ecdf()} understands the following aesthetics. Required aesthetics are displayed in bold and defaults are displayed for optional aesthetics: +\tabular{rll}{ + • \tab \strong{\code{\link[=aes_position]{x}} \emph{or} \code{\link[=aes_position]{y}}} \tab \cr\cr + • \tab \code{\link[=aes_group_order]{group}} \tab → inferred \cr\cr + • \tab \code{weight} \tab → \code{NULL} \cr\cr +} + +Learn more about setting these aesthetics in \code{vignette("ggplot2-specs")}. +} diff --git a/man/stat_ellipse.Rd b/man/stat_ellipse.Rd index 4588fd3a6a..c541f98599 100644 --- a/man/stat_ellipse.Rd +++ b/man/stat_ellipse.Rd @@ -125,18 +125,6 @@ the default plot specification, e.g. \code{\link[=annotation_borders]{annotation The method for calculating the ellipses has been modified from \code{car::dataEllipse} (Fox and Weisberg 2011, Friendly and Monette 2013) } -\section{Aesthetics}{ - -\code{stat_ellipse()} understands the following aesthetics. Required aesthetics are displayed in bold and defaults are displayed for optional aesthetics: -\tabular{rll}{ -• \tab \strong{\code{\link[=aes_position]{x}}} \tab \cr\cr -• \tab \strong{\code{\link[=aes_position]{y}}} \tab \cr\cr -• \tab \code{\link[=aes_group_order]{group}} \tab → inferred \cr\cr -• \tab \code{weight} \tab \cr\cr -} -Learn more about setting these aesthetics in \code{vignette("ggplot2-specs")}. -} - \examples{ ggplot(faithful, aes(waiting, eruptions)) + geom_point() + @@ -168,3 +156,15 @@ Applied Regression, Second Edition. Thousand Oaks CA: Sage. URL: Michael Friendly. Georges Monette. John Fox. "Elliptical Insights: Understanding Statistical Methods through Elliptical Geometry." Statist. Sci. 28 (1) 1 - 39, February 2013. URL: \url{https://projecteuclid.org/journals/statistical-science/volume-28/issue-1/Elliptical-Insights-Understanding-Statistical-Methods-through-Elliptical-Geometry/10.1214/12-STS402.full} } +\section{Aesthetics}{ + +\code{stat_ellipse()} understands the following aesthetics. Required aesthetics are displayed in bold and defaults are displayed for optional aesthetics: +\tabular{rll}{ + • \tab \strong{\code{\link[=aes_position]{x}}} \tab \cr\cr + • \tab \strong{\code{\link[=aes_position]{y}}} \tab \cr\cr + • \tab \code{\link[=aes_group_order]{group}} \tab → inferred \cr\cr + • \tab \code{weight} \tab \cr\cr +} + +Learn more about setting these aesthetics in \code{vignette("ggplot2-specs")}. +} diff --git a/man/stat_manual.Rd b/man/stat_manual.Rd index 374c57bafc..fccb64ecbc 100644 --- a/man/stat_manual.Rd +++ b/man/stat_manual.Rd @@ -120,13 +120,6 @@ every group. } \section{Aesthetics}{ -\code{stat_manual()} understands the following aesthetics. Required aesthetics are displayed in bold and defaults are displayed for optional aesthetics: -\tabular{rll}{ -• \tab \code{\link[=aes_group_order]{group}} \tab → inferred \cr\cr -} -Learn more about setting these aesthetics in \code{vignette("ggplot2-specs")}. - - Input aesthetics are determined by the \code{fun} argument. Output aesthetics must include those required by \code{geom}. Any aesthetic that is constant within a group will be preserved even if dropped by \code{fun}. @@ -197,3 +190,12 @@ if (requireNamespace("dplyr", quietly = TRUE)) { ) } } +\section{Aesthetics}{ + +\code{stat_manual()} understands the following aesthetics. Required aesthetics are displayed in bold and defaults are displayed for optional aesthetics: +\tabular{rll}{ + • \tab \code{\link[=aes_group_order]{group}} \tab → inferred \cr\cr +} + +Learn more about setting these aesthetics in \code{vignette("ggplot2-specs")}. +} diff --git a/man/stat_summary.Rd b/man/stat_summary.Rd index 72cd5cd982..4b4c2bb469 100644 --- a/man/stat_summary.Rd +++ b/man/stat_summary.Rd @@ -184,17 +184,6 @@ aggregate. 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{stat_summary()} understands the following aesthetics. Required aesthetics are displayed in bold and defaults are displayed for optional aesthetics: -\tabular{rll}{ -• \tab \strong{\code{\link[=aes_position]{x}}} \tab \cr\cr -• \tab \strong{\code{\link[=aes_position]{y}}} \tab \cr\cr -• \tab \code{\link[=aes_group_order]{group}} \tab → inferred \cr\cr -} -Learn more about setting these aesthetics in \code{vignette("ggplot2-specs")}. -} - \section{Summary functions}{ You can either supply summary functions individually (\code{fun}, @@ -308,3 +297,14 @@ m2 + coord_transform(y="log10") \code{\link[=geom_linerange]{geom_linerange()}}, \code{\link[=geom_crossbar]{geom_crossbar()}} for geoms to display summarised data } +\section{Aesthetics}{ + +\code{stat_summary()} understands the following aesthetics. Required aesthetics are displayed in bold and defaults are displayed for optional aesthetics: +\tabular{rll}{ + • \tab \strong{\code{\link[=aes_position]{x}}} \tab \cr\cr + • \tab \strong{\code{\link[=aes_position]{y}}} \tab \cr\cr + • \tab \code{\link[=aes_group_order]{group}} \tab → inferred \cr\cr +} + +Learn more about setting these aesthetics in \code{vignette("ggplot2-specs")}. +} diff --git a/man/stat_unique.Rd b/man/stat_unique.Rd index f42da84f6b..7ff9d9ccc6 100644 --- a/man/stat_unique.Rd +++ b/man/stat_unique.Rd @@ -109,18 +109,18 @@ the default plot specification, e.g. \code{\link[=annotation_borders]{annotation \description{ Remove duplicates } +\examples{ +ggplot(mtcars, aes(vs, am)) + + geom_point(alpha = 0.1) +ggplot(mtcars, aes(vs, am)) + + geom_point(alpha = 0.1, stat = "unique") +} \section{Aesthetics}{ \code{stat_unique()} understands the following aesthetics. Required aesthetics are displayed in bold and defaults are displayed for optional aesthetics: \tabular{rll}{ -• \tab \code{\link[=aes_group_order]{group}} \tab → inferred \cr\cr -} -Learn more about setting these aesthetics in \code{vignette("ggplot2-specs")}. + • \tab \code{\link[=aes_group_order]{group}} \tab → inferred \cr\cr } -\examples{ -ggplot(mtcars, aes(vs, am)) + - geom_point(alpha = 0.1) -ggplot(mtcars, aes(vs, am)) + - geom_point(alpha = 0.1, stat = "unique") +Learn more about setting these aesthetics in \code{vignette("ggplot2-specs")}. }