I have a series of plots of types of nitrogen. Two are detected in much lower levels in water than another. There are dynamics between the red and the blue line that I'd like to be able to see. But the scale is stretched too high because of the green line. See below:
Is there a way to change the intervals of the y axis to show the patterns going on between 0 and 0.5?
A bit like this question: Y-break with scale change in R
Current Code
sampleSites <- list("BVR1", "BVR2", "BVR3", "BVR4","BVR5", "BVR6")
samplePlotList <- list()
for (site in sampleSites){
dat <- subset(nitrogen, ID==site)
samplePlotList[[site]] <-
dat %>%
ggplot(aes_string(x="Month", y="value", group="condition")) +
geom_line(size=0.5, aes(colour=condition)) +
theme_classic() +
theme(legend.position='none') +
theme(text=element_text(size=10, family='Calibri')) +
theme(axis.text=element_text(size=10, family='Calibri')) +
labs(x= NULL) +
ylim(0, 9) +
theme(plot.margin = margin(0.75,0,0.5,0, "cm"))
}
Data Frame Head
structure(list(ID = structure(1:6, levels = c("BVR1", "BVR2",
"BVR3", "BVR4", "BVR5", "BVR6"), class = "factor"), Survey = c(1L,
1L, 1L, 1L, 1L, 1L), Month = structure(c(1L, 1L, 1L, 1L, 1L,
1L), levels = c("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul",
"Aug", "Sep", "Oct", "Nov", "Dec"), class = "factor"), Date = c("24/01/2022",
"24/01/2022", "24/01/2022", "24/01/2022", "24/01/2022", "24/01/2022"
), Total.Nitrogen = c(4.987497648, 4.901992077, 3.837696783,
4.389720566, 3.853376279, 1.696494226), DO = c(9, 9.4, 8.3, 8.5,
8.8, 8.7), condition = c("Ammonia", "Ammonia", "Ammonia", "Ammonia",
"Ammonia", "Ammonia"), value = c(0.063, 0.066888889, 0.065333333,
0.035, 0.052888889, 0.035)), row.names = c(NA, 6L), class = "data.frame")