I want to use geom_dotplot to distinguish two different variables by the shape of the dots (and not the colors, as the documentation suggests). For example:
library(ggplot2) set.seed(1) x = rnorm(20) y = rnorm(20) df = data.frame(x,y) ggplot(data = df) + geom_dotplot(aes(x = x), fill = "red") + geom_dotplot(aes(x=y), fill = "blue")
i.e. to distinguish between x and y in the example below

I want all x to be points, and y to be triangles.
Is it possible? Thanks!
r data-visualization ggplot2 shape
Kevin
source share