r - Scatterplot fill doesn't change in ggplot2 even when specified -


i trying assign single color points on scatter plot in ggplot2. however, no matter color set fill = to, points end being black.

here code (with dummy variables):

ggplot(data = testdf) +     geom_point(aes(x = testdf$x, y = testdf$y),      fill = "#2ec4b6", color = "#e71d36") # fill cyan, color red 

this plot looks like:

http://i.imgur.com/fageq9r.png

the default shape used geom_point not have fill aesthetic. can address changing shape parameter:

ggplot( mtcars, aes( x = wt, y = mpg ) ) +     geom_point( shape = 21, fill = "#2ec4b6", color = "#e71d36" ) 

enter image description here


Comments

Popular posts from this blog

javascript - Create a stacked percentage column -

Optimising Firebase database by automatically overwriting data -

javascript - Angular UI-Grid customTemplate directive causing rows to load slowly/? -