i want to add label text on map 3D based on shape the map.
i use this code
nc = st_read(system.file("shape/nc.shp", package="sf"), quiet = TRUE)
pts <- st_cast(st_centroid(nc),"POINT")
st_write(pts,"Centroid/nc.csv",layer_options="GEOMETRY=AS_XY")
point <- read.csv("Centroid/nc.csv")
gg_nc = ggplot(nc) +
geom_sf(aes(fill = AREA)) +
geom_text(aes(x=point$X,y=point$Y,label=NAME),size=2, color='white')+
ggtitle("Area of counties in North Carolina") +
theme_bw()
plot_gg(gg_nc, multicore = TRUE, width = 6 ,height=2.7, fov = 70)
Please ignore the coloring, thank you..