Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

position_beeswarm gone? #45

Open
vacon04 opened this issue Sep 8, 2019 · 3 comments

Comments

@vacon04
Copy link

commented Sep 8, 2019

Is position_beeswarm gone in the latest experimental version (as Sept 8/2019)?
If so, is there a new function that we should use to replace position_beeswarm?

Thanks!

@sherrillmix

This comment has been minimized.

Copy link
Collaborator

commented Sep 9, 2019

Was position_beeswarm working in the non-github version on CRAN? Last I check ggplot had removed it out from under us. For example, with v0.6 off CRAN:

ggplot2::qplot(class, hwy, data = ggplot2::mpg, position=position_beeswarm())
Warning message:
`position` is deprecated

position

If I understand things correctly, "deprecated" is a mild understatement since it simply ignore the position argument.

The alternative would be to use the geom_beeswarm:

ggplot2::qplot(class, hwy, data = ggplot2::mpg)+geom_beeswarm()

bee

@vacon04

This comment has been minimized.

Copy link
Author

commented Sep 9, 2019

Yes, position_beeswarm was working correctly, although not to generate the actual beeswarm, but the position for labels in a different geom layer.

ggplot(mtcars, aes(factor(cyl), mpg)) + geom_beeswarm(shape = 21, size = 7, cex = 5) + geom_text(aes(label = hp), size = 3, position = position_beeswarm(cex = 5))

Rplot

This is using ggbeeswarm 0.6.0 and ggplot2 3.2.1

@sherrillmix

This comment has been minimized.

Copy link
Collaborator

commented Sep 9, 2019

Thanks. It's good to have a MWE since I don't really use that functionality.

I'll have to think about that since getting beeswarm to work properly with ggplot requires hooking into makeContent which I don't think will play nicely with position. So we're at an edge case of ggplot that is simple in base graphics and seems to be a bit of pain here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.