using these data, i want to simultaneously plot the effects of two categorical factors over a multinomial variable. This is as far as ai could go:
require(ggplot2)
df=read.csv("example.csv")
ggplot(df,aes(x=treatment , y=option, group=morph)) +
geom_bar(stat = "identity")+
scale_colour_brewer(palette="Set1")+
ylab("Escape strategy")+
xlab("Treatment")
I am after a graph in which for each treatment there are two bars, one for each morph, and within each bar, the frequency of each option is shown as color ocuppying a proportional length of the solid bar.
Thanks in advance.