Skip to content

Instantly share code, notes, and snippets.

@mdlincoln
Created September 30, 2015 14:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mdlincoln/75817abcd63c51c5871c to your computer and use it in GitHub Desktop.
Save mdlincoln/75817abcd63c51c5871c to your computer and use it in GitHub Desktop.
ggplot2 scale that displays the months of the year for data that has only the day of the year as an integer
yday_months_x <- scale_x_discrete(breaks = cumsum(c(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31)), labels = month.name)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment