I am attempting to plot a bubble plot using the geom_point function in ggplot2. The y values represent a comparison of differentially expressed genes between two tissue types, but there are two comparisons for each two tissue types, each going the opposite way e.g. for a comparison between aortic endothelium and haemogenic endothelium I have two comparisons: AEvsHE and HEvsAE.I would like these two comparisons to be next to eachother on the plot but that is not how ggplot2 has ordered them.
Is there a way to 'override' the algorithm that R uses and order the y values manually?
Here is my code so far:
ggplot(cl,aes(y=DEG,x=comparison, size=enrichment))+
geom_point(alpha=0.5)+scale_size(range=c(1,5), name="enrichment")+
theme_bw()