0

I created a side beeswarm plot with a sample data set using the following code:

x <- rnorm(300)
beeswarm(x, pch = 19, 
         col = c("black"),
         side = 1)

This is the plot I got.

Beeswarm Plot.

I'm trying to add a boxplot with the data to the left side of this beeswarm plot.

So far, I've tried using the gghalves and ggbeeswarm package to add a half boxplot to the beeswarm plot, but this ruins the distribution of the dots from the beeswarm. The dots end up looking cluttered rather than a nice distribution as shown in the picture above. Is there a way to keep the distribution of the beeswarm dots and just add a boxplot to the side of the plot? I'm trying to create a plot that looks like this one.

Nature Plot

divsan
  • 1
  • 1
  • I_O provided an [answer](https://stackoverflow.com/a/76640232/3358272) to your [previous question](https://stackoverflow.com/q/76639875/3358272), doesn't that do what you're asking for again? – r2evans Jul 11 '23 at 16:58
  • @r2evans unfortunately it did not. The distribution was still very cluttered. – divsan Jul 11 '23 at 17:06
  • 5
    it's preferred to provide feedback to the answerer and resolve it in the same question/answer realm; it helps nobody to keep that information to yourself. When you edit that question (and comment to I_O), I think it would help to clarify what "it did not" really means. Warnings/errors? Aesthetic problems? Laptop caught fire? – r2evans Jul 11 '23 at 17:09

0 Answers0