We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0f248a6 commit 9d1a948Copy full SHA for 9d1a948
R/spatial_sf.R
@@ -65,7 +65,7 @@ tmapSubsetShp.sf = function(shp, vars) {
65
shp$LENGTH = sf::st_length(shp)
66
}
67
if ("MAP_COLORS" %in% vars) {
68
- shp$MAP_COLORS = as.factor(tmaptools::map_coloring(shp))
+ shp$MAP_COLORS = as.factor(tmaptools::map_coloring(shp, ncols = 7))
69
70
71
if (!length(vars)) {
@@ -86,7 +86,7 @@ tmapSubsetShp.sfc = function(shp, vars) {
86
s$LENGTH = sf::st_length(shp)
87
88
89
- s$MAP_COLORS = tmaptools::map_coloring(s)
+ s$MAP_COLORS = as.factor(tmaptools::map_coloring(shp, ncols = 7))
90
91
s
92
0 commit comments