Problem here is a bit obvious I think. I'd like the legend placed (locked) in the top left hand corner of the 'plotting region'. Using c(0.1,0.13) etc is not an option for a number of reasons.
Is there a way to change the reference point for the co-ordinates so they are relative to the plotting region?
mtcars$cyl <- factor(mtcars$cyl, labels=c("four","six","eight"))
ggplot(mtcars, aes(x=wt, y=mpg, colour=cyl)) + geom_point(aes(colour=cyl)) +
opts(legend.position = c(0, 1), title="Legend placement makes me sad")
Cheers
See Question&Answers more detail:os