Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

stat_sf(geom = "text") #2111

Open
cpsievert opened this Issue Apr 25, 2017 · 0 comments

Comments

Projects

TODO in hadley

2 participants
Contributor

cpsievert commented Apr 25, 2017

I'd expect something like this to work

library(ggplot2)
library(sf)
library(albersusa)
usa_sf <- st_as_sf(usa_composite("laea"))
centroids <- st_centroid(usa_sf)

ggplot() + 
  geom_sf(data = usa_sf) + 
  stat_sf(data = centroids, aes(geometry = geometry, label = name), geom = "text")

hadley added to TODO in hadley Jun 1, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment