sf

customize legend in ggplot2 with sf objects

僤鯓⒐⒋嵵緔 提交于 2020-08-19 07:41:09
问题 I am plotting (mapping) sf objects with ggplot2 . My understanding is that since version 2.2.1 ggplot2 contains the geom geom_sf , for simple feature objects. I can produce the exact map that I want by doing the following: library(sf) library(ggplot2) # some points to start with a <- st_as_sf(data.frame(lon = c(1,4,6), lat = c(0,0,-3)), coords = c('lon', 'lat')) b <- st_as_sf(data.frame(lon = c(2.5,4), lat = c(-4.5,-5)), coords = c('lon', 'lat')) # circles around those points buf.a <- st

customize legend in ggplot2 with sf objects

我只是一个虾纸丫 提交于 2020-08-19 07:41:04
问题 I am plotting (mapping) sf objects with ggplot2 . My understanding is that since version 2.2.1 ggplot2 contains the geom geom_sf , for simple feature objects. I can produce the exact map that I want by doing the following: library(sf) library(ggplot2) # some points to start with a <- st_as_sf(data.frame(lon = c(1,4,6), lat = c(0,0,-3)), coords = c('lon', 'lat')) b <- st_as_sf(data.frame(lon = c(2.5,4), lat = c(-4.5,-5)), coords = c('lon', 'lat')) # circles around those points buf.a <- st