Legend title position in ggplot2
Using the transition guide to version 0.9 as a reference, you might try the following (assuming you want to change the title position for the colour
legend):
library(scales)+ guides(colour = guide_legend(title.position = "left"))
For a continuous scale you'd use guide_colorbar
instead of guide_legend
.
Just to provide a concrete example to prove I'm not just making this up,
library(ggplot2)library(scales)p <- ggplot(mtcars, aes(wt, mpg))p + geom_point(aes(colour = qsec)) + guides(colour = guide_legend(title.position = "right"))