Remove border lines in ggplot map/choropleth

前端 未结 3 599
Happy的楠姐
Happy的楠姐 2021-02-05 14:14

I would like to remove the lines between regions of a choropleth generated in ggplot. My question is motivated by a very large map with very very small regions

3条回答
  •  借酒劲吻你
    2021-02-05 14:48

    Another option is to set both fill and color equal to group, which worked on the macOS I tried it on:

    library("ggplot2")
    library("maps")
    tn = map_data("county", region = "tennessee")
    ggplot(tn, aes(x = long, y = lat, group = group)) + 
      geom_polygon(aes(fill = group, color = group))
    

    Output:

提交回复
热议问题