How can I render a plotly map with only a single color. In the example below, I would like the fill for all states to be red, or #FF0000.
library(plotly)
library(tidyverse)
dat <- data.frame(state = state.abb)
plot_ly(dat,
type = "choropleth",
locationmode = 'USA-states',
locations = ~state) %>%
add_trace(color = "red") %>%
layout(geo = list(
projection = list(
type = "albers usa")))
CodePudding user response:


