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
I would like to use relative positioning (0-1 scale) to add a text annotation to a ggplot object that uses geom_sf. I've tried two different methods that were mentioned here, but both seem to fail with different results.
First attempt, using Hadley's suggestion does produce any annotation:
This results in "Error in grid.Call.graphics(C_setviewport, vp, TRUE): non-finite location and/or size for viewport". I get the same results if I specify x and y locations in textGrob with different units (npc, cm, lines).
Any help would be most welcome. Thanks.
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
I would like to use relative positioning (0-1 scale) to add a text annotation to a ggplot object that uses geom_sf. I've tried two different methods that were mentioned here, but both seem to fail with different results.
First attempt, using Hadley's suggestion does produce any annotation:
I never see "Top-left" on the plot no matter what values I've tried for hjust or vjust.
Second attempt, using textGrob (via this comment):
This results in
"Error in grid.Call.graphics(C_setviewport, vp, TRUE): non-finite location and/or size for viewport"
. I get the same results if I specify x and y locations in textGrob with different units (npc, cm, lines).Any help would be most welcome. Thanks.
The text was updated successfully, but these errors were encountered: