Skip to content

Commit 0dab044

Browse files
authored
Start using @inheritDotParams in documentation (#2170)
Closes #2164 * Use @inheritDotParams for geom_polygon params in borders() * Inherit dot params from cut.default * Use @inheritDotParams in as.list.ggproto documentation * Use @inheritDotParams in scale_hue and scale_grey * Use @inheritDotParams for scale_*_gradient * Use @inheritDotParams for scale_*_discrete as well as scale_linetype, scale_shape, and scale_manual * Use @inheritDotParams for scale_size_area * Fix typo
1 parent d722ad4 commit 0dab044

23 files changed

+459
-36
lines changed

R/fortify-map.r

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ map_data <- function(map, region = ".", exact = FALSE, ...) {
8686
#' @param colour border colour
8787
#' @param xlim,ylim latitudinal and logitudinal range for extracting map
8888
#' polygons, see [maps::map()] for details.
89-
#' @param ... other arguments passed onto [geom_polygon()]
89+
#' @inheritDotParams geom_polygon
9090
#' @export
9191
#' @examples
9292
#' if (require("maps")) {

R/ggproto.r

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ make_proto_method <- function(self, f) {
193193
#' @param x A ggproto object to convert to a list.
194194
#' @param inherit If `TRUE` (the default), flatten all inherited items into
195195
#' the returned list. If `FALSE`, do not include any inherited items.
196-
#' @param ... Further arguments to pass to `as.list.environment`.
196+
#' @inheritDotParams base::as.list.environment -x
197197
#' @export
198198
#' @keywords internal
199199
as.list.ggproto <- function(x, inherit = TRUE, ...) {

R/scale-discrete-.r

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@
66
#' level, and increasing by one for each level (i.e. the labels are placed
77
#' at integer positions). This is what allows jittering to work.
88
#'
9-
#' @param ... common discrete scale parameters: `name`, `breaks`,
10-
#' `labels`, `na.value`, `limits` and `guide`. See
11-
#' [discrete_scale()] for more details
9+
#' @inheritDotParams discrete_scale -expand -position
1210
#' @param expand a numeric vector of length two giving multiplicative and
1311
#' additive expansion constants. These constants ensure that the data is
1412
#' placed some distance away from the axes.

R/scale-gradient.r

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@
1515
#' @param low,high Colours for low and high ends of the gradient.
1616
#' @param guide Type of legend. Use `"colourbar"` for continuous
1717
#' colour bar, or `"legend"` for discrete colour legend.
18-
#' @param ... Other arguments passed on to [continuous_scale()]
19-
#' to control name, limits, breaks, labels and so forth.
18+
#' @inheritDotParams continuous_scale -na.value -guide
2019
#' @seealso [scales::seq_gradient_pal()] for details on underlying
2120
#' palette
2221
#' @family colour scales

R/scale-grey.r

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#'
66
#' @inheritParams scales::grey_pal
77
#' @inheritParams scale_colour_hue
8+
#' @inheritDotParams discrete_scale
89
#' @family colour scales
910
#' @rdname scale_grey
1011
#' @export

R/scale-hue.r

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
#' colour-blind safe palettes.
66
#'
77
#' @param na.value Colour to use for missing values
8-
#' @param ... Other arguments passed on to [discrete_scale()]
9-
#' to control name, limits, breaks, labels and so forth.
8+
#' @inheritDotParams discrete_scale
109
#' @inheritParams scales::hue_pal
1110
#' @rdname scale_hue
1211
#' @export

R/scale-linetype.r

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#' line types.
66
#'
77
#' @inheritParams scale_x_discrete
8+
#' @inheritDotParams discrete_scale -expand -position -na.value
89
#' @param na.value The linetype to use for `NA` values.
910
#' @rdname scale_linetype
1011
#' @export

R/scale-manual.r

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#' data to aesthetic values.
55
#'
66
#' @inheritParams scale_x_discrete
7+
#' @inheritDotParams discrete_scale -expand -position
78
#' @param values a set of aesthetic values to map data values to. If this
89
#' is a named vector, then the values will be matched based on the names.
910
#' If unnamed, values will be matched in order (usually alphabetical) with

R/scale-shape.r

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#' @param solid Should the shapes be solid, `TRUE`, or hollow,
1010
#' `FALSE`?
1111
#' @inheritParams scale_x_discrete
12+
#' @inheritDotParams discrete_scale -expand -position
1213
#' @rdname scale_shape
1314
#' @export
1415
#' @examples

R/scale-size.r

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,7 @@ scale_size_discrete <- function(..., range = c(2, 6)) {
6767
}, ...)
6868
}
6969

70-
#' @param ... Other arguments passed on to [continuous_scale()]
71-
#' to control name, limits, breaks, labels and so forth.
70+
#' @inheritDotParams continuous_scale -aesthetics -scale_name -palette -rescaler
7271
#' @param max_size Size of largest points.
7372
#' @export
7473
#' @rdname scale_size

0 commit comments

Comments
 (0)