# Basic N to P plot for SES

library(ggplot2)

data <- data.frame(NO3 = runif(10) * 20, SRP = runif(10) * 20, date = rep(c("A", 
    "B")))

# Basic plot of NO3 ~ SRP

ggplot(data, aes(x = SRP, y = NO3)) + geom_point() + geom_abline(slope = 7/1000, 
    intercept = 0) + expand_limits(x = 0, y = 0) + labs(x = "SRP (µg/L)", y = expression(paste("NO"[3]^-{
}, " (mgN/L)")))

plot of chunk unnamed-chunk-1


# Plot NO3 ~ SRP for only one date subset on the fly since it is very simple

ggplot(subset(data, date == "A"), aes(x = SRP, y = NO3)) + geom_point() + geom_abline(slope = 7/1000, 
    intercept = 0) + expand_limits(x = 0, y = 0) + labs(x = "SRP (µg/L)", y = expression(paste("NO"[3]^-{
}, " (mgN/L)")))

plot of chunk unnamed-chunk-1