From c805edcb98cbd495f4d3375b12690e21a41c268d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E6=B0=B8=E6=A5=A0=7CMorgan=7CL=C3=A9on?= Date: Tue, 17 Oct 2017 21:47:28 +0800 Subject: [PATCH] update for R 3.4.1 at scale_x_date --- 01-Introduction/ufo_sightings.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/01-Introduction/ufo_sightings.R b/01-Introduction/ufo_sightings.R index c240b47..0b8ac22 100644 --- a/01-Introduction/ufo_sightings.R +++ b/01-Introduction/ufo_sightings.R @@ -118,7 +118,7 @@ head(ufo.us) # We can do this by creating a histogram of frequencies for UFO sightings over time quick.hist <- ggplot(ufo.us, aes(x = DateOccurred)) + geom_histogram() + - scale_x_date(breaks = "50 years") + scale_x_date(date_breaks = "50 years",date_labels = "%Y") ggsave(plot = quick.hist, filename = file.path("images", "quick_hist.pdf"), @@ -134,7 +134,7 @@ new.hist <- ggplot(ufo.us, aes(x = DateOccurred)) + geom_histogram(aes(fill='white', color='red')) + scale_fill_manual(values=c('white'='white'), guide="none") + scale_color_manual(values=c('red'='red'), guide="none") + - scale_x_date(breaks = "50 years") + scale_x_date(date_breaks = "50 years",date_labels = "%Y") ggsave(plot = new.hist, filename = file.path("images", "new_hist.pdf"),