I would like to create a scatterplot such that geom_point has different shapes, all shapes are outlined in the same color, but each distinct shape is filled with it's own color.
Per the example below, I want all of the points to be outlined in blue. I want the squares to be filled in red, the circles to be filled in magenta, and the triangles filled in yellow.
ggplot(mtcars, aes(x = mpg, y = wt, shape = factor(gear), fill = factor(gear))) +
geom_point(size = 5, color = "blue") +
scale_shape_manual(values = c(0,1,2)) +
scale_fill_manual(values = c( "red", "magenta", "yellow"))
I have tried adding fill , and scale_fill_manual every which way that I can think of.