eclarke / ggbeeswarm

Column scatter / beeswarm-style plots in ggplot2
GNU General Public License v3.0
539 stars 31 forks source link

Different output when "groupOnX" is used #67

Closed RobertGregg closed 1 year ago

RobertGregg commented 2 years ago

Hello,

Love this package, really fixes some issues I have with geom_jitter(). I just wanted to point out a small issue I'm having with the groupOnX argument. When I remove the argument I get the expected result:

ggplot(iris, aes(Species,Sepal.Length)) +
  geom_quasirandom(method = "tukeyDense") +
  ggtitle("Tukey + density")

image

However, when I include the argument I lose the jittering entirely:

ggplot(iris, aes(Sepal.Length, Species)) +
  geom_quasirandom(method = "tukeyDense", groupOnX=TRUE) +
  ggtitle("Tukey + density")

image

Maybe just two if-statements that need to be switched?

RobertGregg commented 2 years ago

Oops, sorry never-mind. I just needed to flip the true/false groupOnX. Feel free to close the issue.