Hola, eso lo puedes hacer con sf:
library("ggplot2")
library("mxmaps")
library("sf")
library("maps")
df_mxstate_2020$value <- df_mxstate_2020$indigenous_language /
df_mxstate_2020$pop * 100
df_mxstate_2020$value[1:15] <- NA
usa <- st_as_sf(maps::map("state", fill=TRUE, plot =FALSE))
usa <- subset(usa, ID %in% c("arizona", "new mexico", "california", "texas"))
usa$group <- 1
usa$long <- 1
usa$lat <- 1
mxstate_choropleth(df_mxstate_2020,
num_colors = 1,
title = "Percentage of the population that speaks\nan indigenous language",
legend = "%") +
# Add a fake color scale which we'll change to 'no data'
geom_point(data = df_mxmunicipio_2020[1,],
size = -1,
aes(color = "",
group = NA)) +
scale_color_manual(values = NA) +
scale_fill_continuous(low="orange", high="darkred",
na.value = "white") +
theme(legend.key = element_rect(color="black")) +
guides(color=guide_legend("no data",
override.aes=list(color = "white"))) +
geom_sf(data = usa, fill = "gray") +
# scale_x_continuous(limits = c( -129, 9)) +
# scale_y_continuous(limits = c(-76, 40)) +
coord_sf(default_crs = sf::st_crs(4326),
xlim = c(-129, -76), ylim = c(10, 44), datum = NA)