Skip to content

Commit

Permalink
every other week for date labels (#141)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattgarvin1 authored Nov 12, 2020
1 parent 52a87b5 commit 785acdc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions covid19-notebooks/bayes-by-county/r/plot-trend.r
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ make_plots <- function(data_country, covariates_country_long,
aes(x = time, ymin = cases_min, ymax = cases_max, fill = key)) +
xlab("Time") +
ylab("Cases") +
scale_x_date(date_breaks = "weeks", labels = date_format("%e %b")) +
scale_x_date(date_breaks = "2 weeks", labels = date_format("%e %b")) +
scale_fill_manual(name = "", labels = c("50%", "95%"),
values = c(alpha("deepskyblue4", 0.55),
alpha("deepskyblue4", 0.45))) +
Expand Down Expand Up @@ -409,7 +409,7 @@ make_plots <- function(data_country, covariates_country_long,
aes(ymin = death_min, ymax = death_max, fill = key)) +
xlab("Time") +
ylab("Deaths") +
scale_x_date(date_breaks = "weeks", labels = date_format("%e %b")) +
scale_x_date(date_breaks = "2 weeks", labels = date_format("%e %b")) +
scale_fill_manual(name = "", labels = c("50%", "95%"),
values = c(alpha("deepskyblue4", 0.55),
alpha("deepskyblue4", 0.45))) +
Expand Down Expand Up @@ -461,7 +461,7 @@ make_plots <- function(data_country, covariates_country_long,
scale_shape_manual(name = "Interventions", labels = plot_labels,
values = c(21, 22, 23, 24, 25, 12)) +
scale_colour_discrete(name = "Interventions", labels = plot_labels) +
scale_x_date(date_breaks = "weeks", labels = date_format("%e %b")) +
scale_x_date(date_breaks = "2 weeks", labels = date_format("%e %b")) +
theme_pubr() +
theme(axis.text.x = element_text(angle = 45, hjust = 1),
plot.title = element_text(hjust = 0.5),
Expand Down

0 comments on commit 785acdc

Please sign in to comment.