From 3a8b662034a54f3eb34808b14dec5635a878d1eb Mon Sep 17 00:00:00 2001 From: Cosmin SAVEANU <cosmin.saveanu@pasteur.fr> Date: Tue, 26 Sep 2023 12:10:08 +0200 Subject: [PATCH] added beeswarmplot option --- Tridimensional barplots in R/README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Tridimensional barplots in R/README.md b/Tridimensional barplots in R/README.md index 45b27a2..501bc55 100644 --- a/Tridimensional barplots in R/README.md +++ b/Tridimensional barplots in R/README.md @@ -82,3 +82,11 @@ ggsave("mybarplot.pdf", width=8, height=5, units="cm") The result will need further adjustments, in Inkscape, for example for the final figure:  + +UPDATE (sept 2023) - a more pleasant distribution of points could be obtained using the "beeswarm" plots, in which the dots are distributed depending on their density. One need just to replace the `geom_point(... position_jitterdodge)` with something similar to this: +```R +geom_quasirandom(data=melted, aes(x=vector, y=value, color=factor(strain)), + dodge.width = 0.8, + shape=21, fill="white")+ +``` +`ggbeeswarm` can be installed from CRAN (https://github.com/eclarke/ggbeeswarm) \ No newline at end of file -- GitLab