0

I am trying to create an error bar on only one point (132, 172) in my graph, because it's the only one that matters for what I'm trying to show. I am not sure how to make it so that that is the only error bar that shows. Here's my regular code with traditional error bar:

ggplot(weather_data, aes(x = snow.melt.date, y = Speyeria.atalantis)) +
 geom_errorbar(aes(ymin=Speyeria.atalantis-12.09, ymax=Speyeria.atalantis + 12.09), width=.2, position=position_dodge(0.05)) + 
geom_point(color = "grey35") +  
geom_point(aes(x=132, y=172), colour="#00AFBB", shape = 17, size = 2.5) + 
geom_point(aes(x=132, y=176), colour="#FFDB6D") + 
stat_smooth(method = "lm", formula = y ~ x, geom = "smooth", color = "steelblue4", se=FALSE) + 
theme_minimal() +labs(x="Snowmelt Date", y="Emergence Date") +
  stat_regline_equation(label.y = 150.0, aes(label = ..eq.label..) ) + 
ggtitle("Speyeria atalantis")

Any thoughts?

I could find no info on this problem so I haven't tried much. I considered grouping my data and then plotting by group? I tried putting arrows on the graph point instead of error bars but it wasn't the same.

John Polo
  • 547
  • 1
  • 8
  • 25
  • Can you make your post [reproducible](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) and provide `dput(weather_data)`? – jrcalabrese Jan 11 '23 at 17:33

0 Answers0