I have a set of data, where y=chemical concentration (chemcon), and 2 independent factors: chemical form (chemf) and day of exposure to chemical (day).
I'm trying to create a bar plot that shows how y varies first in relation to chemf and within each of these, how it evolves in time (day). I would also like to see the standard deviation on y based on my current data (EGG).
This is what I've come up with so far:
Figure1<-ggplot(EGG,aes(x=chemf,y=chemcon))
Figure1+
geom_bar(stat="identity", position=position_dodge())+
scale_fill_brewer(palette="Paired")+
theme_minimal()
labs(x="chemcon", y="chemf")+
theme(panel.background = element_blank(),
axis.line = element_line(colour = "black"),
panel.grid=element_blank())
It's absolutely missing the other factor (day) i want in, but i have no clue how to include it. I've looked through other similar questions in this website but for some reason the code does not work out.
Basically I want something like this to come out: https://i.stack.imgur.com/L41IO.png
Can anyone please help?