Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

scale_date: change default breaks to pretty_breaks()

  • Loading branch information...
commit 6132fc51a0f50ef550d7bf5cd48afb7e085e043f 1 parent d6cf3b7
Winston Chang wch authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 R/scale-date.r
6 R/scale-date.r
View
@@ -71,7 +71,7 @@
#' qplot(date, value, data = em, geom = "line", group = variable)
#' qplot(date, value, data = em, geom = "line", group = variable) +
#' 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()) {
scale_date(c("x", "xmin", "xmax", "xend"), expand = expand, breaks = breaks,
@@ -80,7 +80,7 @@ scale_x_date <- function(..., expand = waiver(), breaks = waiver(),
#' @rdname scale_date
#' @export
-scale_y_date <- function(..., expand = waiver(), breaks = waiver(),
+scale_y_date <- function(..., expand = waiver(), breaks = pretty_breaks(),
minor_breaks = waiver()) {
scale_date(c("y", "ymin", "ymax", "yend"), expand = expand, breaks = breaks,
@@ -88,7 +88,7 @@ scale_y_date <- function(..., expand = waiver(), breaks = waiver(),
}
# 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(), ...) {
if (is.character(breaks)) {
Please sign in to comment.
Something went wrong with that request. Please try again.