Created
March 28, 2022 08:36
-
-
Save jvieroe/48bc41c88ee7c0c47748b2d9fa19d117 to your computer and use it in GitHub Desktop.
ggplot date axis
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
df <- tibble(date = c("06-10-2021", "07-10-2021"), | |
y = c(1, 2)) | |
df %<>% | |
mutate(date = lubridate::dmy(date)) | |
df %>% | |
ggplot(., aes(x = date, y = y)) + | |
geom_point() | |
df %>% | |
ggplot(., aes(x = date, y = y)) + | |
geom_point() + | |
scale_x_date(date_labels = "%d %B") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment