Untitled

mail@pastecode.io avatar
unknown
r
2 years ago
1.1 kB
2
Indexable
Never
CH4_averages.theme = theme_classic()  + theme(
  axis.text=element_text(size=15),
  plot.margin = unit(c(1,1,1,1), "lines"),
  text=element_text(size=15),
  axis.text.x = element_text(size = 15), 
  axis.text.y = element_text(size = 15)
)

colors <- c(
  "Std dev 2012-2021" = "azure3", 
  "Daily Average 2012-2021" = "black", 
  "Daily Average 2019-2020" = "aquamarine3")

ggplot(data = frame20192020CH4, aes(x=date2)) +
  geom_ribbon(aes(ymin=sd_minus, ymax=sd_plus, color="Std dev 2012-2021"), fill="gray", color="azure3", alpha=0.5) +
  geom_line(aes(y = rowmeanCH4, color="Daily Average 2019-2020"), size = 1.5, alpha = 0.8) +
  geom_line(aes(y = rowmeanCH4_all, color="Daily Average 2012-2021"), size = 1, alpha = 0.8) +
  labs(
    title = "CH4 concentrations, PPM",
    y=expression("CH"[4]),
    x=expression("Month")
  ) + 
  scale_color_manual(name="Legend", values = colors) +
  scale_y_continuous(breaks = seq(1.85, 2.05, by= 0.05), limits = c(1.85, 2.05)) + 
  scale_x_date(date_breaks = '1 month',expand = c(0,0),labels = date_format("%b")) +
  CH4_averages.theme