plot_scenario_tile.RdPlot a heat map of accepted samples by scenario
plot_scenario_tile(proportion_allowed = NULL)
| proportion_allowed | data.frame of allowed proportions as
produced by |
|---|
A ggplot2 heat-map of accepted percentages by scenario
## Code plot_scenario_tile#> function (proportion_allowed = NULL) #> { #> event_duration <- NULL #> event_size <- NULL #> serial_mean <- NULL #> upper_R0 <- NULL #> allowed_per <- NULL #> proportion_allowed %>% tidyr::complete(event_duration, event_size, #> serial_mean, upper_R0, fill = list(allowed_per = 0)) %>% #> dplyr::mutate_at(.vars = c("event_duration", "event_size"), #> factor) %>% ggplot2::ggplot(ggplot2::aes(x = event_duration, #> y = event_size, fill = allowed_per)) + ggplot2::geom_tile(alpha = 0.95) + #> ggplot2::scale_fill_continuous(label = scales::percent, #> type = "viridis", direction = 1) + ggplot2::facet_grid(serial_mean ~ #> upper_R0) + ggplot2::theme_minimal() + ggplot2::theme(legend.position = "bottom") + #> ggplot2::guides(fill = ggplot2::guide_colorbar(title = "Percentage of samples accepted")) + #> ggplot2::labs(x = "Transmission event duration", y = "Transmission event size") #> } #> <bytecode: 0x55c741546c48> #> <environment: namespace:WuhanSeedingVsTransmission>