Open lhami opened 1 year ago
Some time ago there was some relevant discussion in #3026 and a PR implementing this was posted in #3030.
At the time, it was decided against making nudge_x
and nudge_y
proper aesthetics, because it was too niche for the geom_text()
/position_nudge()
pairing. The alternative proposed solution, but never implemented, was to make position adjustments have required aesthetics that can be interpreted.
Sometimes I want more granular control over the position of specific text labels for
geom_text
andgeom_text_repel
, and I may want that to depend on some other aspect of the data (overlapping points, points that are above a certain threshold, specific problematic points that I know by name from previous versions, etc) usingmutate()
.Since
nudge_x
andnudge_y
can take vectors that are the same length as the data, it seems already acknowledged that people may want to sometimes have a different nudge value for each point, which could easily be a column of nudge values in the data frame or a function thereof, so I'm not sure why it works differently from other aesthetics which can be specified inaes()
with a column name quosure or outside ofaes()
for all points.Could we make
nudge_x
andnudge_y
work like thex
andy
aesthetics themselves?