Skip to content

Commit ca95dc4

Browse files
committed
polish
1 parent 08b0f2a commit ca95dc4

File tree

6 files changed

+21
-59
lines changed

6 files changed

+21
-59
lines changed

R/geom-.R

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,7 @@ NULL
3939
#'
4040
#' @export
4141
#' @format NULL
42-
#' @usage
43-
#' # Creating a new subclass
44-
#' GeomNew <- ggproto("GeomNew", Geom, ...)
45-
#'
46-
#' # Usage in the `layer()` function
47-
#' layer(geom = GeomNew, ...)
42+
#' @usage NULL
4843
#' @seealso The `r link_book("new geoms section", "extensions#sec-new-geoms")`
4944
#' @seealso Run `vignette("extending-ggplot2")`, in particular the "Creating a
5045
#' new geom" section.
@@ -188,11 +183,10 @@ Geom <- ggproto(
188183
#' \item{`data`}{A data frame of the layer's data, coming from the
189184
#' `setup_data()` method. Can be `NULL`, in which case resolved defaults
190185
#' should be returned.}
191-
#' \item{`params`}{A list of layer parameters, coming from the
192-
#' `setup_params()` method}
193-
#' \item{`modifiers`}{A [mapping][`aes()`] with delayed evaluations.}
194-
#' \item{`default_aes`}{A [mapping][`aes()`] with default aesthetics.}
195-
#' \item{`theme`}{A [completed theme][`complete_theme()`]}
186+
#' \item{`params`}{A list of fixed aesthetic parameters}
187+
#' \item{`modifiers`}{A [mapping][aes()] with delayed evaluations.}
188+
#' \item{`default_aes`}{A [mapping][aes()] with default aesthetics.}
189+
#' \item{`theme`}{A [completed theme][complete_theme()]}
196190
#' }
197191
#'
198192
#' **Value**
@@ -385,7 +379,7 @@ Geom <- ggproto(
385379
#' `coord$transform(data, panel_params)`. When working with non-linear
386380
#' coordinate systems, data should be converted to fit a primitive geom
387381
#' (e.g. point, path or polygon) and passed on to the corresponding draw
388-
#' method for [munching][`coord_munch()`].}
382+
#' method for [munching][coord_munch()].}
389383
#' \item{`...`}{Reserved for extensions. By default, this is passed on to
390384
#' the `draw_group()` method.}
391385
#' }

R/position-.R

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,7 @@
3131
#'
3232
#' @export
3333
#' @format NULL
34-
#' @usage
35-
#' # Creating new subclass
36-
#' PositionNew <- ggproto("PositionNew", Position, ...)
37-
#'
38-
#' # Usage in the `layer()` function
39-
#' layer(position = PositionNew)
34+
#' @usage NULL
4035
#' @seealso The `r link_book("new positions section", "extensions#new-positions")`
4136
#' @examples
4237
#' # Extending the class

R/stat-.R

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,13 @@
2727
#' prefix, like `StatNew`.
2828
#'
2929
#' A constructor function is usually paired wih a Stat class. The constructor
30-
#' wraps a call t o `layer()`, where e.g. `layer(stat = StatNew)`. The
30+
#' wraps a call to `layer()`, where e.g. `layer(stat = StatNew)`. The
3131
#' constructor function name is formatted by taking the Stat class name and
3232
#' formatting it with snake_case, so that `StatNew` becomes `stat_new()`.
3333
#'
3434
#' @export
3535
#' @format NULL
36-
#' @usage
37-
#' # Creating a new subclass
38-
#' StatNew <- ggproto("StatNew", Stat, ...)
39-
#'
40-
#' # Usage in the `layer()` function
41-
#' layer(stat = StatNew)
36+
#' @usage NULL
4237
#' @seealso The `r link_book("new stats section", "extensions#sec-new-stats")`.
4338
#' @seealso Run `vignette("extending-ggplot2")`, in particular the "Creating a
4439
#' new stat" section.
@@ -243,9 +238,9 @@ Stat <- ggproto(
243238
#' **Arguments**
244239
#' \describe{
245240
#' \item{`data`}{A data frame with the layer's data.}
246-
#' \item{`scales`}{A list containing pre-trained `x` and `y` scales.
247-
#' Note that these are global scales trained on all data, not panel-specific
248-
#' scales.}
241+
#' \item{`scales`}{A list of pre-trained `x` and `y` scales. Note that the
242+
#' position scales are not finalised at this point and reflect the initial
243+
#' data range before computing stats.}
249244
#' \item{`...`}{Reserved for extensions. By default, this passes parameters
250245
#' to the `compute_group()` method.}
251246
#' }

man/Geom.Rd

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

man/Position.Rd

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

man/Stat.Rd

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

0 commit comments

Comments
 (0)