Skip to content

Instantly share code, notes, and snippets.

@cpsievert
Created May 22, 2014 18:04
Show Gist options
  • Save cpsievert/ece28830a6c992b29ab6 to your computer and use it in GitHub Desktop.
Save cpsievert/ece28830a6c992b29ab6 to your computer and use it in GitHub Desktop.
dat <- data.frame(x = 1:5, y = 1:5, p = 1:5, q = factor(1:5),
r = factor(1:5))
p <- ggplot(dat, aes(x, y, colour = p, size = q, shape = r)) + geom_point()
p + scale_colour_continuous(guide = "colorbar") + guides(colour = "none") #no guide
p + scale_colour_continuous(guide = "none") + guides(colour = guide_colorbar()) #guide
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment