Skip to content

fix nudging with multiple values. closes #2977 #3024

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

Merged
merged 1 commit into from
Dec 6, 2018

Conversation

clauswilke
Copy link
Member

Fix spurious warning in position_nudge(), as described in #2977.

library(ggplot2)

df <- data.frame(
  x = c(1,3,2,5),
  y = c("a","c","d","c")
)

ggplot(df, aes(x, y)) +
  geom_point() +
  geom_text(aes(label = y), nudge_y = c(-0.1, 0.1, -0.1, -0.1))

Created on 2018-12-05 by the reprex package (v0.2.1)

Copy link
Member

@yutannihilation yutannihilation left a comment

Choose a reason for hiding this comment

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

This looks good to me!

(I've got to think if we should check the length of the nudge params, but let's discuss it later)

@clauswilke
Copy link
Member Author

Ok. I'll merge this now, since it's such a small change and really was an oversight when I wrote the code originally.

@clauswilke clauswilke merged commit 4a607ca into tidyverse:master Dec 6, 2018
@clauswilke clauswilke deleted the issue-2977-position-nudge branch December 6, 2018 01:41
@lock
Copy link

lock bot commented Jun 4, 2019

This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/

@lock lock bot locked and limited conversation to collaborators Jun 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants