# pseed <-
#function
## This can be made as simple function for both
#a later cleanup,,,
#lol I wish
#feb2020
ggplot(sim.dat, aes(y = beech.seed, x = date)) +
geom_rect(aes(xmin=ymd("2000-12-31"),xmax = ymd('1999-12-31'), ymin = -Inf, ymax = Inf), fill = "grey90")+
geom_line(aes(y = beech.seed, x = date), size = 1.1, col = "grey50", lty = 3) +
geom_point(aes(y = beech.seed, x = date, fill = control), alpha = 1, stroke = 1.5, shape = 22, size = 4.5, col = "black", fill = "black") +
geom_point(aes(y = beech.seed, x = date), alpha = 0.5, stroke = 1.5, shape = 25, size = 2,col = "black", fill = "white") +
xlab("") +
ylab(expression(paste("Seed ", "(" ,italic(S[jt]),")"))) +
scale_y_continuous(expand = c(0.05, 0.05)) +
scale_x_date(breaks = sim.dat.no$date, date_labels = labels1, expand = c(0.05, 0.05))+
annotate("text", x=as.Date('2000-05-15'), y = 2000,
label = "Masting year", size = 4, colour = "black", family = "Times") +
annotate("text", x=as.Date('1999-07-30'), y = 2000,
label = "Non-mast year", size = 4, colour = "black", family = "Times") +
annotate("text", x=as.Date('2001-03-30'), y = 2000,
label = "Non-mast", size = 4, colour = "black", family = "Times") +
theme(panel.grid.major = element_blank(),panel.grid.minor = element_blank(),panel.border = element_blank(),axis.text.y=element_text(colour = "black",size = 14, family = "Times"),axis.title.x = element_blank(),axis.text.x = element_blank(),axis.ticks.x = element_line(size = 1),axis.line.x = element_line(size = 1),axis.ticks.y = element_line(size = 1),axis.line.y = element_line(size = 1))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.