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

Document vector passing to nudge_y/nudge_x/position_nudge #6335

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

MaxAtoms
Copy link

Recently, when creating plots with ggstatsplot (using the ggbetweenstats function), I wanted to move the centrality labels for each distribution individually. It took me quite some time to figure out that I can pass a vector to nudge_y (or position_nudge for that matter).

Therefore, I propose to document this functionality.

Copy link
Collaborator

@teunbrand teunbrand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR! We generally don't want to encourage passing aesthetics outside aes() as vectors for the reasons documented in most layers like ?geom_point:

Please note that while passing unmapped aesthetics as vectors is technically possible, the order and required length is not guaranteed to be parallel to the input data.

If you want to pass it like aes(nudge_y = c(...)) that'd be fine with me. If you intend to change the example, would you mind running devtools::document() so that the changes propagate to the .Rd files?

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