Skip to content

Commit

Permalink
Fixed plot_pointrange to remove unnecessary warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
jameshay218 committed May 13, 2024
1 parent 4197b2e commit c1c09ba
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions R/plot_infection_histories.R
Original file line number Diff line number Diff line change
Expand Up @@ -327,8 +327,6 @@ plot_attack_rates_pointrange <- function(infection_histories, antibody_data=NULL
colnames(quantiles)[which(colnames(quantiles) == "tested")] <- "Biomarker tested"

p <- ggplot(quantiles[quantiles$population_group %in% group_subset, ]) +
scale_y_continuous(expand = c(0, 0)) +
scale_x_continuous(breaks = year_breaks, labels = year_labels) +
coord_cartesian(ylim=c(0,1)) +
theme_classic() +
ylab("Estimated attack rate") +
Expand Down Expand Up @@ -389,8 +387,7 @@ plot_attack_rates_pointrange <- function(infection_histories, antibody_data=NULL
}
if (!plot_residuals) {
p <- p +
scale_y_continuous(expand = c(0, 0)) +
coord_cartesian(ylim=c(0,1))
scale_y_continuous(expand = c(0, 0))
}

if (by_group) {
Expand Down

0 comments on commit c1c09ba

Please sign in to comment.