I'm trying to match the colours of the points from the jitter plot to the colours of the boxes. I can colour them one colour or the other, but I can't seem to set them to match the colour of the boxes.
Alternatively, I've figured out how to change the colours of the jitter points using geom_jitter but can't seem to figure out how to shift them to the side of the boxplot like the geom_boxjitter would have them. I thought maybe I could add "position = ..." to my geom_jitter() but that didn't seem to work...
Jitter box plot with dots in black
Jitter box plot with correct colour dots, but overlapping with boxes
#hybrid jitter-box with jitter points all same colour
ggplot(all.bio2)+
geom_boxjitter(aes(x=season, y=S.chao1, fill=season),
jitter.colour = ,
outlier.colour = NULL, outlier.shape = 1,
errorbar.draw = T,
errorbar.length = 0.2)+
theme(panel.background = element_rect(fill = 'white', colour = 'black'))
#hybrid jitter-box with different coloured points but overlapping with boxes
ggplot(all.bio2)+
geom_boxjitter(aes(x=season, y=S.chao1, fill=season),
jitter.colour = NA,
outlier.colour = NA, outlier.shape = 1,
errorbar.draw = T,
errorbar.length = 0.2)+
geom_jitter(aes(x=season, y=S.chao1, colour=season), width = 0.15)+
theme(panel.background = element_rect(fill = 'white', colour = 'black'))