Skip to content

Conversation

@Morgan-Leon
Copy link

The problem lies in the ggplot function scale_x_date. In the original code this is coded as:

quick.hist <- ggplot(ufo.us, aes(x = DateOccurred)) +
  geom_histogram() + 
  scale_x_date(breaks = "50 years")

The breaks in scale_x_date has been adjusted to date_breaks. If you adjust the code to the following it works.

quick.hist <- ggplot(ufo.us, aes(x = DateOccurred)) +
  geom_histogram() + 
  scale_x_date(date_breaks = "50 years", date_labels = "%Y")

@johnmyleswhite
Copy link
Owner

Thanks for the fix! I'm going to set aside some time to update all of the code soon and will include your fix, but after that I'm going to announce that we don't intend to update this code in the future. (We should have done that originally, but we didn't originally realize what a mistake we were making treating the code as a living artifact.)

@boykasad
Copy link

boykasad commented May 7, 2021

Hello

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants