我试图将美国的等值线图格式化为特定的颜色,不幸的是,当scale_fill_brewer用于改变颜色时; 只有48个州(夏威夷和阿拉斯加州没有).是否有可能知道我是否可以为夏威夷和阿拉斯加实施着色?
library(choroplethr)
library(choroplethrMaps)
library(ggplot2)
data(df_pop_county)
county_choropleth(df_pop_county, title = "Title1", legend = "Top 20% of Index", num_colors = 9) +
geom_polygon(aes(fill=value), color="white") +
scale_fill_brewer(name="Top Index", palette="YlOrRd")
Run Code Online (Sandbox Code Playgroud)