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

Update the cex argument in ggbeeswarm::geom_beeswarm() #406

Merged
merged 8 commits into from
Oct 13, 2024

Conversation

LHBO
Copy link
Collaborator

@LHBO LHBO commented Oct 12, 2024

In the current version, the cex argument in ggbeeswarm::geom_beeswarm does not scale well when N_explain increases as it is set to 0.4. In this PR, we change it to cex = 1 / length(index_x_explain)^(1/4).

Another option is to use corral as illustrated in inst/scripts/Beeswarm_illustration.R. This file compares the old method, the new version with the modified cex argument, another version where we use coral, and the code used in https://arxiv.org/abs/2410.04883. Here we let N_explain be 50, 100, 1000, and 5000, and the new version with the modified cex argument provides nice plots for all settings and most similar to what the old code did for small values of N_explain but now also for larger values.

@LHBO
Copy link
Collaborator Author

LHBO commented Oct 13, 2024

I have not accepted the changes in plot tests.

@LHBO LHBO changed the base branch from master to shapr-1.0.0 October 13, 2024 19:07
@martinju martinju merged commit 1164281 into NorskRegnesentral:shapr-1.0.0 Oct 13, 2024
4 of 5 checks passed
@martinju martinju mentioned this pull request Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants