Each cols4all color palette has a specific color for NAs. By default this value is used rather than the tmap option.
However, what if the user deliberately set the option to make it a different color?
vna = tmap_options("value.na")
lobstr::tree(vna)
vna$value.na$fill = "yellow"
tmap_options(vna)
tmap_options_save("my_theme")
tmap_style()
# no yellow for NA
tm_shape(World) +
tm_crs("auto") +
tm_polygons(
fill = "HPI"
)
# yellow for NA
tm_shape(World) +
tm_crs("auto") +
tm_polygons(
fill = "HPI",
fill.scale = tm_scale(values = cols4all::c4a("-hcl.blues3", 5))
)
So ideally, somewhere it should be specified whether to take the palette NA color or the tmap option value.na....
Each cols4all color palette has a specific color for NAs. By default this value is used rather than the tmap option.
However, what if the user deliberately set the option to make it a different color?
So ideally, somewhere it should be specified whether to take the palette NA color or the tmap option
value.na....