Skip to content

Commit 4b609fb

Browse files
authored
geom/stat docs tweaks (#2625)
Fixes #2618
1 parent af5413d commit 4b609fb

File tree

3 files changed

+18
-14
lines changed

3 files changed

+18
-14
lines changed

R/geom-.r

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ NULL
99
#'
1010
#' Each of the `Geom*` objects is a [ggproto()] object, descended
1111
#' from the top-level `Geom`, and each implements various methods and
12-
#' fields. To create a new type of Geom object, you typically will want to
13-
#' implement one or more of the following:
12+
#' fields.
1413
#'
1514
#' Compared to `Stat` and `Position`, `Geom` is a little
1615
#' different because the execution of the setup and compute functions is
@@ -19,7 +18,10 @@ NULL
1918
#' means there is no `setup_params` because it's hard to communicate
2019
#' the changes.
2120
#'
22-
#' - Override either `draw_panel(self, data, panel_params, coord)` or
21+
#' To create a new type of Geom object, you typically will want to
22+
#' override one or more of the following:
23+
#'
24+
#' - Either `draw_panel(self, data, panel_params, coord)` or
2325
#' `draw_group(self, data, panel_params, coord)`. `draw_panel` is
2426
#' called once per panel, `draw_group` is called once per group.
2527
#'
@@ -35,7 +37,7 @@ NULL
3537
#' a coord method.
3638
#'
3739
#' You must always call `coord$transform(data, panel_params)` to
38-
#' get the (position) scaled data for plotting. convert. To work with
40+
#' get the (position) scaled data for plotting. To work with
3941
#' non-linear coordinate systems, you typically need to convert into a
4042
#' primitive geom (e.g. point, path or polygon), and then pass on to the
4143
#' corresponding draw method for munching.
@@ -47,7 +49,7 @@ NULL
4749
#' render the geom.
4850
#' - `default_aes`: A list (generated by [aes()] of
4951
#' default values for aesthetics.
50-
#' - `reparameterise`: Converts width and height to xmin and xmax,
52+
#' - `setup_data`: Converts width and height to xmin and xmax,
5153
#' and ymin and ymax values. It can potentially set other values as well.
5254
#' @rdname ggplot2-ggproto
5355
#' @format NULL

R/stat-.r

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
#' Each of the `Stat*` objects is a [ggproto()] object, descended
88
#' from the top-level `Stat`, and each implements various methods and
99
#' fields. To create a new type of Stat object, you typically will want to
10-
#' implement one or more of the following:
10+
#' override one or more of the following:
1111
#'
12-
#' - Override one of :
12+
#' - One of :
1313
#' `compute_layer(self, data, scales, ...)`,
1414
#' `compute_panel(self, data, scales, ...)`, or
1515
#' `compute_group(self, data, scales, ...)`.

man/ggplot2-ggproto.Rd

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

0 commit comments

Comments
 (0)