You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support for using I() to use NPC corodinates seems incomplete #5656
@teunbrand I could not find an open issue on this, but I remember seeing a rather recent commit by you implementing this new feature. In 3.4.4.9000 I see it working in annotate() and in aes() but not with values mapped to constants in calls to geoms (at least geom_label()). By the way, it is great to see this implemented in 'ggplot2'. It makes several geometries in 'ggpp' redundant which is, I think, an indication of usefulness, as now all geometries become usable with NPC coordinates.
Thanks for the report @aphalo! I'm glad it come before the release rather than afterwards. I agree with you about the usefulness of non-data coordinates.
The culprit of this behaviour seems to be here:
Activity
teunbrand commentedon Jan 22, 2024
Thanks for the report @aphalo! I'm glad it come before the release rather than afterwards. I agree with you about the usefulness of non-data coordinates.
The culprit of this behaviour seems to be here:
ggplot2/R/geom-.R
Line 179 in a4be39d
Where the AsIs class seem to be dropped. You can replicate that behaviour like this. Note that the foo column is not an AsIs column anymore.
Created on 2024-01-22 with reprex v2.1.0
One possible way to remediate this, would be to convert to a list, do the assignment, and restore to data.frame again.
Created on 2024-01-22 with reprex v2.1.0
teunbrand commentedon Jan 23, 2024
Considered fixed in the RC by #5657