ggplot : Connecting each point within one group on discrete x-axis
I try to connect jittered points between measurements from two different methods ( measure ) on an x-axis. These measurements are linked to one another by the probands ( a ), that can be separated into two main groups, patients ( pat ) and controls ( ctr ), My df is like that: set.seed(1) a<- rep(paste0("id","_",1:20),each=2) value<- sample(1:10,40,rep=TRUE) measure<- rep(c("a","b"),20) group<- rep(c("pat","ctr"),each=2,10) df<-data.frame(a,value,measure,group) I tried ggplot(df,aes(measure,value,fill=group))+geom_point(position=position_jitterdodge( jitter.width=0.1,jitter.height=.1, dodge