Skip to content

Commit

Permalink
save simple regression fig
Browse files Browse the repository at this point in the history
  • Loading branch information
fawda123 committed Nov 25, 2024
1 parent 20bce57 commit 7515cfc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion R/simple_regression.R
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ tn_load_3mo_9.3 <- (9.3 - mod$coefficients[1]) / mod$coefficients[2]
# TN at 8.5 chla
tn_load_3mo_8.5 <- (8.5 - mod$coefficients[1]) / mod$coefficients[2]

ggplot(chldat, aes(x = tn_load_3mo, y = chla)) +
p <- ggplot(chldat, aes(x = tn_load_3mo, y = chla)) +
geom_point(size = 0.5) +
geom_smooth(method = 'lm', se = T, formula = y ~ x, color = 'black') +
geom_segment(
Expand Down Expand Up @@ -61,3 +61,6 @@ ggplot(chldat, aes(x = tn_load_3mo, y = chla)) +
caption = 'Source: EPCHC, Janicki Env.'
)

png(here::here('figs/simpl_regression.png'), height = 5, width = 5, units = 'in', res = 300)
print(p)
dev.off()
Binary file added figs/simpl_regression.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 7515cfc

Please sign in to comment.