I have this ggplot :plot1
I've obtained this plot using this code :
g<- ggplot(base__, aes(x=Race_name, y=ec_prem, color=nouv_grp))+scale_color_brewer(palette = "Paired")+
geom_jitter(position=position_jitter(0.2))+xlab("Course")+ylab("Ecart / 1er (secondes)")+ylim(-1,120)+labs(colour = "Groupe PC1")+theme_minimal()+theme(axis.text.x = element_text(size = 7, angle = 90))
g
I want to divide it into 2 plots to make vizualisation more understandable. So I used facet_grid()
:
g=ggplot(base__, aes(x=Race_name, y=ec_prem, color=nouv_grp))+scale_color_brewer(palette = "Paired")+
geom_jitter(position=position_jitter(0.2))+xlab("Course")+ylab("Ecart / 1er (secondes)")+ylim(-1,120)+labs(colour = "Groupe PC1")+theme_minimal()+theme(axis.text.x = element_text(size = 7, angle = 90))
g+facet_grid(haha~.)
and I get this plot :
But I want to get 2 differents x axis and I want my jitter plot to be less concentrated (less tight).
I hope that someone can give me a solution.
Thanks in advance :)