我认为在这种情况下您需要自己编写绘图,但幸运的是这并不太难。这是一个例子:
# choose your states
my_states <- c('Texas', 'Utah', 'Oklahoma')
# get the data
d <- us_map(regions = "states")
# now plot manually. The `full` here refers to the full name of the state,
# which is a column in `d`. Use `abbr` to use abbreviations.
ggplot(d, aes(x, y, group = group, fill = full %in% my_states)) +
geom_polygon(color = 'black') +
coord_equal() +
# Choose your two colors here:
scale_fill_manual(values = c('white', 'firebrick'), guide = 'none') +
usmap:::theme_map() +
labs(
title = "US States",
subtitle = "This is a blank map of the counties of the United States."
) +
theme(panel.background = element_rect(color = "BLACK", fill = "GRAY"))