I am using geom_beeswarm to test the distribution of data in my dataset. In my toy example here, this is my code to do that.
library(survival)
library(ggplot2)
library(ggbeeswarm)
data("pbc")
head(pbc)
ggplot(pbc, aes(x=trt, y= age, color = trt)) +
geom_beeswarm(cex =2, size =3, priority="density") +
theme(panel.background = element_blank(), legend.position = "none") +
facet_wrap(~trt, nrow = 3, ncol = 1)
This is what I get,
However I am interested in only one half of the plot, not symmetry like shown below. Expected plot
I know I can accomplish this using the side=1 or side=-1 option in the original beeswarm library. Not sure how to do the same using the geom_beeswarm option. Any suggestion is much appreciated. Thanks.