I'm looking to add point data so that is sits adjacent to a box in a boxplot. When I run the below example, the point data does not separate for each fill factor. Is there a way to add point data that corresponds to the box when plotting 2 factors in a boxplot? Can this also be added so it is to the left of the box rather than on top of it?
Group<-c("A","A","A","A","A","A","A","A","B","B","B","B","B","B","B","B")
Value<-c(2,1,6,4,2,5,3,6,8,1,10,2,2,3,4,6)
Round<-c("Round 1","Round 1","Round 1","Round 1","Round 2","Round 2","Round 2","Round 2",
"Round 1","Round 1","Round 1","Round 1","Round 2","Round 2","Round 2","Round 2")
data<-as.data.frame(cbind(Group,Value,Round))
data$Round<-as.factor(data$Round)
data$Group<-as.factor(data$Group)
data$Value<-as.numeric(data$Value)
str(data)
ggplot(data,aes(Group,Value,fill=Round))+
geom_point(aes(colour=Round))+
geom_boxplot(width=0.5,position = position_dodge(width=0.7))+
labs(fill= "Round",x="Group",y="Value")