How do I change the NA color from gray to white in a ggplot choropleth map?

后端 未结 1 1898
广开言路
广开言路 2020-12-09 07:53

I am trying to create a choropleth map of the US that has the default color changed from gray to white.

I have records for 18 of 48 states and the code works to colo

相关标签:
1条回答
  • 2020-12-09 08:27

    You can change color of NA values (states without data) by changing argument na.value in scale_fill_continuos().

    +scale_fill_continuous(low="thistle2", high="darkred", 
                           guide="colorbar",na.value="white")
    
    0 讨论(0)
提交回复
热议问题