Skip to content
Browse files

scale_datetime: change default breaks to pretty_breaks()

  • Loading branch information...
1 parent 790ef7e commit d6cf3b76fdcc23c346524e584d62411f96481294 @wch wch committed Jun 24, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 R/scale-datetime.r
View
6 R/scale-datetime.r
@@ -50,7 +50,7 @@
#' labels = date_format("%d/%m"))
#' last_plot() + scale_x_datetime(breaks = date_breaks("1 day"),
#' minor_breaks = date_breaks("2 hour"))
-scale_x_datetime <- function(..., expand = waiver(), breaks = waiver(),
+scale_x_datetime <- function(..., expand = waiver(), breaks = pretty_breaks(),
minor_breaks = waiver()) {
scale_datetime(c("x", "xmin", "xmax", "xend"), expand = expand,
@@ -64,7 +64,7 @@ scale_map.datetime <- function(scale, x, limits = scale_limits(scale)) {
#' @rdname scale_datetime
#' @export
-scale_y_datetime <- function(..., expand = waiver(), breaks = waiver(),
+scale_y_datetime <- function(..., expand = waiver(), breaks = pretty_breaks(),
minor_breaks = waiver()) {
scale_datetime(c("y", "ymin", "ymax", "yend"), expand = expand,
@@ -73,7 +73,7 @@ scale_y_datetime <- function(..., expand = waiver(), breaks = waiver(),
# base class for scale_{xy}_datetime
-scale_datetime <- function(aesthetics, expand = waiver(), breaks = waiver(),
+scale_datetime <- function(aesthetics, expand = waiver(), breaks = pretty_breaks(),
minor_breaks = waiver(), ...) {
if (is.character(breaks)) {

0 comments on commit d6cf3b7

Please sign in to comment.
Something went wrong with that request. Please try again.