How can I completely get rid of borders using geom_sf
? (The grids were created with st_make_grid
.) I have tried color=NA
and size=0
, but neither do what I want.
ggplot()
geom_sf(data = plot_data, aes(fill = as.vector(dist)), color=NA, size=0)
scale_fill_viridis(discrete=FALSE, name="", direction=-1)
geom_sf(data = states, fill=alpha("black", 0))
theme_bw()
Example:
The easiest way to fix this is, rather than trying to make the lines disappear, simply color them the same as the grid boxes.
ggplot()
geom_sf(data = plot_data, aes(fill = as.vector(dist),
color = after_scale(fill)), linewidth = 1)
scale_fill_viridis_c(name = "", direction=-1)
geom_sf(data = states, fill = alpha("black", 0), linewidth = 2)
theme_bw()