Here, is the code.
but i cannot add the error. maybe something wrong. Please, help me to fix the problem
library(readr)
data <- read_csv("data.csv")
View(data)
data$Month <- factor(data$Month, levels = data$Month)
library(ggplot2)
ggplot(data, aes(x = Month, y = POC, group = 1)) + geom_line() + geom_point()
- geom_errorbar(ymax = data$sd_max, ymin = data$sd_min, width = 0.25)
- coord_cartesian(ylim = c(0.95 * min(data$sd_min), 1.05 * max(data$sd_max)),
expand = FALSE, clip = "off") + theme_bw()
output
Incase of adding errorbar:
Error: Cannot use+.gg()
with a single argument. Did you accidentally put + on a new line?
My data set is...
Month | season | POC | sd_min | sd_max |
---|---|---|---|---|
June | Southwest Monsoon | 103.780225 | 88.12418851 | 119.4362615 |
July | Southwest Monsoon | 161.7999176 | 139.8901679 | 183.7096674 |
Aug | Southwest Monsoon | 147.8307 | 126.0604078 | 169.6009923 |
Sep | Southwest Monsoon | 151.1334294 | 137.6584583 | 164.6084005 |
Oct | Post Monsoon | 155.3259882 | 145.1971328 | 165.4548436 |
Nov | Post Monsoon | 169.3289235 | 151.2990747 | 187.3587723 |
Dec | Northeast Monsoon | 181.0842882 | 170.5199668 | 191.6486096 |
Jan | Northeast Monsoon | 184.2212588 | 169.8248833 | 198.6176343 |
Feb | Northeast Monsoon | 180.4129706 | 171.8540214 | 188.9719198 |
March | Pre Monsoon | 161.1084529 | 144.4730513 | 177.7438545 |
April | Pre Monsoon | 133.1878471 | 116.1223398 | 150.2533544 |
May | Pre Monsoon | 115.3821118 | 94.72632631 | 136.0378973 |