ggplot2 - R - ggplot change points color -


i using ggplot draw map of , dots on it. code , image drawn.

ggplot()+ geom_polygon( data=all_states, aes(x=long, y=lat, group = group), colour="white")+ geom_point(aes(x = locations$lon,                 y = locations$lat,                size = locations$num, color=locations$salary),                show.legend = true)) 

enter image description here

my problem is: color of dots blue default. how can set different degrees of yellow according locations$salary. in addition, want darker yellow higher salary, not reverse. thanks.


Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -