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_nudge
doesn't work when called as position = "nudge"
#1428
Comments
Why don't you just call |
I'm interested in teaching students how to think about position adjustments. I'm happy to give them shortcuts, but I want the principle to work as well.
|
Sorry to be a gadfly here. Thinking about this more, I think that That solution would take effort to implement, but then we'd:
Alternatively, you could make |
@garrettgman, Both About the default values for
As the main use-case for nudging is when labelling, a useful nudge value will most likely be plot specific and in many cases along a single axis. If you try to have a default non-zero constant adjustment along any or both axes, then you force users to override both. |
@has2k1 your argument is defensible. I think it depends on how far you want to stray from Leland's grammar which called position adjustments "collision modifiers." Leland's grammar can certainly be improved upon; it didn't have layers for example. This may be one of those improvements. However, |
Ok, that is a bug. I'll fix in the next release. |
Here's the example from
?position_nudge
, which works.But the code breaks when you call
position = "nudge"
, as you might do with other positions.There's no warning message, the text layer just disappears.
This is bad for me because I'd prefer to be able to teach beginners all five position adjustments without having to teach them the
position = position_nudge()
syntax. The second syntax is a bit overwhelming for someone new to R since it contains a function inside an argument. (We begin new R students withggplot2
because visualizations are cool.)The text was updated successfully, but these errors were encountered: