Closed ElPiloto closed 9 months ago
This is not a bug. "nudge_y = 0.00075"
is equivalent to position = position_nudge(y=0.00075)
So nudging overwrites position=position_dodge(...)
.
The solution is staged aesthetic evaluation.
aes(y=stage("coly", after_scale="y+0.00075"))
where "coly"
is the original column that the y-aesthetic is mapped to. This modifies y
after the any position adjustments have taken place.
At this point the nudge_y
& nudge_x
parameters are there for historical reasons. They predate the more powerful staged evaluation.
Thanks for the response!
The following snippet fails to alter the horizontal position. It seems the nudge_y prevents the position_dodge from working in the horizontal direction.
If I remove the nudge_y, then I see my text at the expected horizontal offsets.
Is this a bug or working as intended. If it's not a bug, could you elaborate on how I might achieve the desired functionality?