Skip to content

Commit 16026c5

Browse files
authored
Export datetime_scale() (#5174)
* Export `datetime_scale()` * Reoxygenate
1 parent 882584f commit 16026c5

File tree

5 files changed

+152
-2
lines changed

5 files changed

+152
-2
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ Config/testthat/edition: 3
8080
Encoding: UTF-8
8181
LazyData: true
8282
Roxygen: list(markdown = TRUE)
83-
RoxygenNote: 7.2.1
83+
RoxygenNote: 7.2.3
8484
Collate:
8585
'ggproto.r'
8686
'ggplot-global.R'

NAMESPACE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,7 @@ export(coord_trans)
316316
export(cut_interval)
317317
export(cut_number)
318318
export(cut_width)
319+
export(datetime_scale)
319320
export(derive)
320321
export(discrete_scale)
321322
export(draw_key_abline)

NEWS.md

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

3+
* The `datetime_scale()` scale constructor is now exported for use in extension
4+
packages (@teunbrand, #4701).
35
* `geom_text()` drops observations where `angle = NA` instead of throwing an
46
error (@teunbrand, #2757).
57
* Using two ordered factors as facetting variables in

R/scale-date.r

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,16 @@ scale_y_time <- function(name = waiver(),
275275
)
276276
}
277277

278-
## rename to datetime_scale
278+
#' Date/time scale constructor
279+
#'
280+
#' @inheritParams scale_x_datetime
281+
#' @inheritParams continuous_scale
282+
#' @param trans For date/time scales, the name of a date/time transformation or
283+
#' the object itself. Built-in transformations include "hms", "date" and "time".
284+
#' @inheritDotParams continuous_scale -aesthetics -trans -palette -breaks -minor_breaks -labels -guide
285+
#'
286+
#' @export
287+
#' @keywords internal
279288
datetime_scale <- function(aesthetics, trans, palette,
280289
breaks = pretty_breaks(), minor_breaks = waiver(),
281290
labels = waiver(), date_breaks = waiver(),

man/datetime_scale.Rd

Lines changed: 138 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)