I am having trouble getting several time series plots to display as a grid for direct comparison. This is my code for one plot:
#Station D7
D7_Chla <- ggplot(Dataset_D7, aes(Date, Chla)) +
geom_line(na.rm=TRUE) +
geom_point(na.rm=TRUE, color="blue", size=1) +
ggtitle("Station D7") +
xlab("Date") + ylab("Chloraphyll-a (Chl-a) (mg/L)") +
scale_x_date(limits = as.Date(c("2009-10-01","2019-09-31")),breaks = date_breaks("years"),
labels = date_format("%Y")) +
theme(plot.title = element_text(lineheight=.8, face="bold",
size = 20)) +
theme(text = element_text(size=12))
I am trying to display this plot in a grid with 10 other plots named C3A_Chla, P8_Chla, D19_Chla, D28A_Chla, D8_Chla, D6_Chla, C10A_Chla, MD10A_Chla, D26_Chla, and D4_Chla
I tried several different options by searching on google and nothing seems to work. I created data frames for each station, although it may be easier to use my master frame and select the variables I would like to use (I do not use all stations from the master frame)? I either get errors or am able to only view the titles of each plot. Each plot can be assigned a letter rather than having a station title if that is easier to format. Another issue may be the inclusion of x and y formatting for each plot rather than formatting it for all plots in the grid at one.
I have tried ggdraw(), a command through the lubridate library...I think it may have just been aggregate() ...I deleted the code and can't quite recall, and grid()