I am not a coding person at all so I apologize if this looks very wrong, but I'm trying to use R to make a graph. I have all my plots from my data set fine, and I'm trying to make error bars -- but, my data set doesn't exactly match up with what I want so I'm trying to add them manually. I was going to add a data point for each mean, and then use that specific point to put an error bar, but because my x axis values are the same it's adding the point in each column. I put pictures below to better understand what I'm saying.
ggplot(well_data4, aes(x = E2F4, y = Colonies, color = Clone, fill = E2F4)) +
geom_point(aes(color = Clone), size = 2) +
geom_point(aes(x=("-/-"), y=2837.3333, color = "black")) +
labs(title = "HT29 Colony Survival",
x = "Concentration of SN-38 (nM)",
y = "Number of colonies") + scale_color_manual(values = c('11' = "darkturquoise", "7" = "darkturquoise", "2" = "darkturquoise","Control"= "darkorchid")) +
scale_fill_discrete(labels = c("-/- = E2F4 Knockout", "+/+ = E2F4 Wild Type")) +
guides(color = guide_legend(override.aes = list(size=3)), fill = guide_legend(override.aes =list(size=2))) +
facet_wrap(~Well, nrow = 1, strip.position = "bottom") +
theme_minimal() +
theme(strip.placement = "outside", panel.spacing = unit(0, "cm"),
strip.text = element_text(size = 10, margin = margin(b=15)),
legend.title = element_text(size = 10),
plot.title = element_text(margin = margin(b=10)))
enter image description here enter image description here
Can anyone help me figure out what to do? Thanks so much
I tried to add this line : geom_point(aes(x=("-/-"), y=2837.3333, color = "black")
and i tried to specify I only wanted it on the "0" x axis column but it was always invalid