根据提供的文档,对于 choropleth 包中的离散变量,set_num_colors 命令在 9 次中断时达到最大值。
有没有办法解决这个问题?
谢谢
choro <- CountyChoropleth$new(imp[[i]])
choro$title <- paste0(as.character(forImg$year[i])," ", "SGL RISK INDEX")
choro$ggplot_scale = scale_fill_viridis(name="Risks rank", discrete=TRUE, option="C" , na.value="grey50")
choro$set_num_colors(8)
choro$render() -> impImg
ggsave(filename=paste0("impImg", "-",i, ".png"), bg="white", dpi=175, height = 1080, width=1920, units = "px")