Using ggplot2, I'm trying to make a plot that has two groupings, one of organism, the other by treatment. Both organisms have the same Treatments.
For example, I'd like the lines of the invaded fungi to connect to the invaded fungi (and all the other paired points) but I can't seem to make it work. Here is the code I'm using.
ggplot(bnti.avg, aes(x=Season, y=Mean.BNTI, group=Treatment, color=Treatment,
shape=Organism)) +
geom_errorbar(aes(ymin=Mean.BNTI-SD, ymax=Mean.BNTI+SD), width=.1) +
geom_line() +
geom_point(size = 8)
I have tried moving around the aes to have some part just in geom_line or geom_point but I seem to be getting no where. Suggestions?