Skip to content

Commit

Permalink
scale_date: change default breaks to pretty_breaks()
Browse files Browse the repository at this point in the history
  • Loading branch information
wch committed Jun 27, 2012
1 parent d6cf3b7 commit 6132fc5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions R/scale-date.r
Expand Up @@ -71,7 +71,7 @@
#' qplot(date, value, data = em, geom = "line", group = variable) #' qplot(date, value, data = em, geom = "line", group = variable)
#' qplot(date, value, data = em, geom = "line", group = variable) + #' qplot(date, value, data = em, geom = "line", group = variable) +
#' facet_grid(variable ~ ., scale = "free_y") #' facet_grid(variable ~ ., scale = "free_y")
scale_x_date <- function(..., expand = waiver(), breaks = waiver(), scale_x_date <- function(..., expand = waiver(), breaks = pretty_breaks(),
minor_breaks = waiver()) { minor_breaks = waiver()) {


scale_date(c("x", "xmin", "xmax", "xend"), expand = expand, breaks = breaks, scale_date(c("x", "xmin", "xmax", "xend"), expand = expand, breaks = breaks,
Expand All @@ -80,15 +80,15 @@ scale_x_date <- function(..., expand = waiver(), breaks = waiver(),


#' @rdname scale_date #' @rdname scale_date
#' @export #' @export
scale_y_date <- function(..., expand = waiver(), breaks = waiver(), scale_y_date <- function(..., expand = waiver(), breaks = pretty_breaks(),
minor_breaks = waiver()) { minor_breaks = waiver()) {


scale_date(c("y", "ymin", "ymax", "yend"), expand = expand, breaks = breaks, scale_date(c("y", "ymin", "ymax", "yend"), expand = expand, breaks = breaks,
minor_breaks = minor_breaks, ...) minor_breaks = minor_breaks, ...)
} }


# base class for scale_{xy}_date # base class for scale_{xy}_date
scale_date <- function(aesthetics, expand = waiver(), breaks = waiver(), scale_date <- function(aesthetics, expand = waiver(), breaks = pretty_breaks(),
minor_breaks = waiver(), ...) { minor_breaks = waiver(), ...) {


if (is.character(breaks)) { if (is.character(breaks)) {
Expand Down

0 comments on commit 6132fc5

Please sign in to comment.