简体   繁体   中英

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

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?

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

I needed to add this instead

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM