# Example figures for incubations for PA
# Load libraries
library(ggplot2)
# Create data
data <- data.frame(stream = c(rep(x = "A", times = 4), rep(x = "B", times = 4)),
trt = rep(x = c("light", "dark"), times = 8), inoc = c(rep(x = "Y", times = 2),
rep(x = "N", times = 2)), time = c(rep(x = 0, times = 8), rep(x = 1,
times = 8)), CO2 = c(rep(x = 100, times = 8), rep(x = 200, times = 8)) *
runif(16) * 10)
# Figure faceted by inonculations (y)
ggplot(data, aes(x = time, y = CO2, shape = stream, colour = trt)) + geom_point() +
facet_grid(inoc ~ .) + geom_line()
# Figure faceted by inonculations (y) and stream (x)
ggplot(data, aes(x = time, y = CO2, colour = trt)) + geom_point() + facet_grid(inoc ~
stream) + geom_line()