cities <- data.frame(
x = c(-63.58595, 116.41214, 0),
y = c(44.64862, 40.19063, 89.9),
city = c("Halifax", "Beijing", "North Pole")
)
p <- ggplot(cities, aes(x, y, label = city)) +
geom_spatial_point(crs = 4326) +
# view of the north pole
coord_sf(crs = 3995)
p +
# longitude lines
annotation_spatial_vline(
intercept = seq(-180, 180, by = 10),
crs = 4326
) +
# latitude lines
annotation_spatial_hline(
intercept = seq(0, 90, by = 10),
crs = 4326
)
Run the code above in your browser using DataLab