outbreak-info / R-outbreak-info

R package to access the genomics and epidemiology data and Research Library metadata compiled and standardized on outbreak.info.
https://outbreak-info.github.io/R-outbreak-info/
MIT License
20 stars 10 forks source link

Simplify ggplot code in Lineage Report Rmd #37

Closed flaneuse closed 3 years ago

flaneuse commented 3 years ago
ditch_the_axes <- theme(
  axis.text = element_blank(),
  axis.line = element_blank(),
  axis.ticks = element_blank(),
  panel.border = element_blank(),
  panel.grid = element_blank(),
  axis.title = element_blank()
)

p <- ggplot() + geom_polygon(data = us_df, aes(x, y, group=group, fill=proportion), color="gray25", size=0.3) + scale_fill_gradient(low = "lemonchiffon", high = "lightseagreen", name = "Cumulative prevalence \nof B.1.1.7", labels = scales::percent) + ditch_the_axes + coord_fixed(1.05)
show(p)

Suggest replacing ditch_the_axes with the in-built ggplot::theme_void() function