legend changes unexpectedly with ggplot2

Viewed 182

Any idea why this happens? Reversing the order of the legend changes it quite substantially.

ggplot(mtcars, aes(x = disp, y = mpg, colour = disp, size = disp)) +
  geom_point() +
  scale_colour_distiller(palette = "PuOr") + 
  guides(size = FALSE)

ggplot(mtcars, aes(x = disp, y = mpg, colour = disp, size = disp)) +
  geom_point() +
  scale_colour_distiller(palette = "PuOr") + 
  guides(size = FALSE, colour = guide_legend(reverse = TRUE))

0 Answers
Related