Wie ändere ich die NA-Farbe in einer ggplot-Choroplethenkarte von grau nach weiß?

Ich versuche, eine Choroplethenkarte der USA zu erstellen, deren Standardfarbe von grau zu weiß geändert wurde.

Ich habe Datensätze für 18 von 48 Status und der Code färbt nach Wert, aber für Status, für die ich keine Datensätze habe, sind die Status grau. Ich möchte, dass sie weiß sind.

Wie ändere ich die Farbe?

library(maps)
library(plyr)
library(ggplot2)
records1<-read.csv('E:/My Documents/records_by_state.csv')
records<-data.frame(state=tolower(rownames(records1)), records1)
head(records)
all_states<-map_data("state")
head(all_states)
record_map<-merge(all_states, records, by.x="region", by.y="state.name")
record_map<-arrange(record_map, group, order)
head(record_map)

p<- ggplot()

p<- p + geom_polygon(data=record_map, aes(x=long, y=lat, group=group,    fill=record_map$Records), colour="black"
         )+ scale_fill_continuous(low="thistle2", high="darkred", guide="colorbar")
P1 <- p + theme_bw() +labs(fill= "Records by State"
                    , title= "By State", x="", y="")
P1 + scale_y_continuous(breaks=c()) + scale_x_continuous(breaks=c()) +  theme(panel.border= element_blank())

Antworten auf die Frage(1)

Ihre Antwort auf die Frage