library(ggplot2)
p1 <- ggplot(diamonds, aes(carat, price, colour = clarity, shape = cut)) +
geom_point() + guides(shape = guide_legend(order = 1), colour = guide_legend(order = 2))
p1
## Warning: Using shapes for an ordinal variable is not advised
p2 <- ggplot(diamonds, aes(carat, price, colour = clarity, shape = cut)) +
geom_point() + guides(colour = guide_legend(order = 1),
shape = guide_legend(order = 2))
p2
## Warning: Using shapes for an ordinal variable is not advised