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

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -