I have trouble making a filled / open circle plot by group.
My data looks like:
Body_weight Gender
50 M
60 M
55 M
45 F
43 F
42 F
ggplot(data, aes(x=Gender, y=Body_weight))+
geom_point(aes(fill=Gender))
geom_point(aes(shape=Gender))
The aesthetic "fill" does not determine if the point is filled with colour or not, but fills it with a different colour for each gender. The way to do what you want is using "shape" and mapping the shapes to open and closed circle instead of the default circle/triangle you get. To do this you need to use scale_shape_manual
.
ggplot(data, aes(x=Gender, y=Body_weight)) +
geom_point(aes(shape=Gender)) +
scale_shape_manual(values = c(16, 21))
Have a look at http://sape.inf.usi.ch/quick-reference/ggplot2/shape for other shapes available