The df
has three normal variables:a
,b
,c
and one group variable: d
.
df<-data.frame(c(5,1,1,2,3,7,5,4,2,1),c(1:10),c(1,1,1,1,1,2,1,2,1,2),c(rep('o',5),rep('m',5)))
colnames(df)<-c('a','b','c','d')
Considering these two plots:
a-b plot grouped by d:
qplot(a,b,data=df,geom = 'point')+facet_wrap(~d,nrow = 2)
b-c plot grouped by d:
qplot(b,c,data=df,geom = 'point')+facet_wrap(~d,nrow = 2)
Is it possible to combine these two plots into one plot using R?