Permalink
Browse files

scale_date: change default breaks to pretty_breaks()

  • Loading branch information...
1 parent d6cf3b7 commit 6132fc51a0f50ef550d7bf5cd48afb7e085e043f @wch wch committed Jun 25, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 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,15 +80,15 @@ 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,
minor_breaks = minor_breaks, ...)
}
# 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)) {

0 comments on commit 6132fc5

Please sign in to comment.