Skip to content

Commit be3ae5a

Browse files
authored
Add section about width/height (#5814)
1 parent ecf5f40 commit be3ae5a

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

R/aes-position.R

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,18 @@
1818
#' `xmiddle`, `middle`, `xupper`, `upper`, `x0` and `y0`. Many of these are used
1919
#' and automatically computed in [`geom_boxplot()`].
2020
#'
21+
#' ## Relation to `width` and `height`
22+
#'
23+
#' The position aesthetics mentioned above like `x` and `y` are all location
24+
#' based. The `width` and `height` aesthetics are closely related length
25+
#' based aesthetics, but are not position aesthetics. Consequently, `x` and `y`
26+
#' aesthetics respond to scale transformations, whereas the length based
27+
#' `width` and `height` aesthetics are not transformed by scales. For example,
28+
#' if we have the pair `x = 10, width = 2`, that gets translated to the
29+
#' locations `xmin = 9, xmax = 11` when using the default identity scales.
30+
#' However, the same pair becomes `xmin = 1, xmax = 100` when using log10 scales,
31+
#' as `width = 2` in log10-space spans a 100-fold change.
32+
#'
2133
#' @name aes_position
2234
#' @aliases x y xmin xmax ymin ymax xend yend
2335
#'

man/aes_position.Rd

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)