I am plotting a map with different study sites of malaria parasite drug resistance. The points of the study sites are sized relative to how many malaria parasites were sampled and the fill of the points is a gradient from 0 to 1 of the proportion of malaria parasites that were drug resistant. The following code reveals the map below:
###GENERATING AFRICA MAP###
africa = readOGR("/Users/transfer/Documents/Mapping Files/Africa Countries/Africa_SHP", layer="dissolved")
#FIXING THE NON-NODED INTERSECTS#
africa = gBuffer(africa, width=0, byid=TRUE)
#CREATING DATA FRAME FOR GGPLOT#
africa.map = fortify(africa, region="ID")
###PLOTTING SPM.437###
#SCALING THE SAMPLE SIZE USING CUBE-ROOT#
size = d.spm.437$Tot437^(1/3)
#PLOTTING#
ggplot(africa.map, aes(x = long, y = lat, group = group)) +
geom_polygon(colour="black", size=0.25, fill="white", aes(group=group)) +
geom_point(data = d.spm.437, aes(x = long, y = lat, fill=Frc437, group=NULL, size=Tot437),
size=size, shape=21, colour="black", size=0.5)
I tried using a color option but it did not work:
ggplot(africa.map, aes(x = long, y = lat, group = group)) +
geom_polygon(colour="black", size=0.25, fill="white", aes(group=group)) +
geom_point(data = d.spm.437, aes(x = long, y = lat, colour="red", fill=Frc437, group=NULL, size=Tot437),
size=size, shape=21, colour="black", size=0.5)
Anybody know how to get the color of the fill to show a scale of red, lighter being 0 and darker being 1?