Legend not showing up in choropleth when I make the plot using $legend

167 views Asked by At
managerLeftWrong$title = "Profession Subject, Left Map, Inumerate"
managerLeftWrong$legend= "% Evacuated"
managerLeftWrong$ggplot_scale = scale_fill_gradientn(colors = c("white", "dodgerblue4"), limits = c(0,100))
managerLeftWrong$set_zoom_zip(state_zoom=NULL, county_zoom=NULL, zip_zoom = c(coastal, zoneA, zoneB, zoneC), msa_zoom=NULL)
managerLeftWrong$set_num_colors(1)
managerLeftWrong$render()
managerLeftWrong$legend 

When I chekc managerLeftWrong$legend in the console, the console returns [1] "% Evacuated"

The $title works, but for some reason the legend doesn't. Does anyone have a fix for this?

1

There are 1 answers

0
Anthony Fasano On

''''managerLeftWrong$ggplot_scale = scale_fill_gradientn(name = "% Evacuated", colors = c("white", "dodgerblue4"), limits = c(0,100))''''

I needed to add this instead