Skip to content

Commit 5973b2c

Browse files
Merge remote-tracking branch 'upstream/master' into feature/geom-ribbon-line
2 parents 017992b + 23e3241 commit 5973b2c

File tree

9 files changed

+31
-4
lines changed

9 files changed

+31
-4
lines changed

NAMESPACE

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,8 @@ export(scale_alpha_manual)
426426
export(scale_alpha_ordinal)
427427
export(scale_color_brewer)
428428
export(scale_color_continuous)
429+
export(scale_color_date)
430+
export(scale_color_datetime)
429431
export(scale_color_discrete)
430432
export(scale_color_distiller)
431433
export(scale_color_gradient)
@@ -435,6 +437,7 @@ export(scale_color_grey)
435437
export(scale_color_hue)
436438
export(scale_color_identity)
437439
export(scale_color_manual)
440+
export(scale_color_ordinal)
438441
export(scale_color_viridis_c)
439442
export(scale_color_viridis_d)
440443
export(scale_colour_brewer)

NEWS.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# ggplot2 (development version)
22

3+
* `Geom` now gains a `setup_params()` method in line with the other ggproto
4+
classes (@thomasp85, #3509)
5+
36
* `element_text()` now issues a warning when vectorized arguments are provided, as in
47
`colour = c("red", "green", "blue")`. Such use is discouraged and not officially supported
58
(@clauswilke, #3492).

R/data.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@
100100
#' \item{year}{year of manufacture}
101101
#' \item{cyl}{number of cylinders}
102102
#' \item{trans}{type of transmission}
103-
#' \item{drv}{f = front-wheel drive, r = rear wheel drive, 4 = 4wd}
103+
#' \item{drv}{the type of drive train, where f = front-wheel drive, r = rear wheel drive, 4 = 4wd}
104104
#' \item{cty}{city miles per gallon}
105105
#' \item{hwy}{highway miles per gallon}
106106
#' \item{fl}{fuel type}

R/geom-.r

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@ Geom <- ggproto("Geom",
104104
stop("Not implemented")
105105
},
106106

107+
setup_params = function(data, params) params,
108+
107109
setup_data = function(data, params) data,
108110

109111
# Combine data with defaults and set aesthetics from parameters

R/layer.r

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -340,8 +340,8 @@ Layer <- ggproto("Layer", NULL,
340340
c(names(data), names(self$aes_params)),
341341
snake_class(self$geom)
342342
)
343-
344-
self$geom$setup_data(data, c(self$geom_params, self$aes_params))
343+
self$geom_params <- self$geom$setup_params(data, c(self$geom_params, self$aes_params))
344+
self$geom$setup_data(data, self$geom_params)
345345
},
346346

347347
compute_position = function(self, data, layout) {

R/zxx.r

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ scale_colour_discrete <- scale_colour_hue
1010
#' @usage NULL
1111
scale_colour_ordinal <- scale_colour_viridis_d
1212

13+
#' @export
14+
#' @rdname scale_viridis
15+
#' @usage NULL
16+
scale_color_ordinal <- scale_colour_ordinal
17+
1318
#' @export
1419
#' @rdname scale_gradient
1520
#' @usage NULL
@@ -29,6 +34,11 @@ scale_colour_datetime <- function(...,
2934
)
3035
}
3136

37+
#' @export
38+
#' @rdname scale_gradient
39+
#' @usage NULL
40+
scale_color_datetime <- scale_colour_datetime
41+
3242
#' @export
3343
#' @rdname scale_gradient
3444
#' @usage NULL
@@ -48,6 +58,12 @@ scale_colour_date <- function(...,
4858
)
4959
}
5060

61+
62+
#' @export
63+
#' @rdname scale_gradient
64+
#' @usage NULL
65+
scale_color_date <- scale_colour_date
66+
5167
#' @export
5268
#' @rdname scale_hue
5369
#' @usage NULL

man/mpg.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/scale_gradient.Rd

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

man/scale_viridis.Rd

Lines changed: 1 addition & 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)