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:
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" ) 
Comments
Post a Comment