赞
踩
- mtcars$cyl <- factor(mtcars$cyl, labels=c("four","six","eight"))
- library(gridExtra)
-
- a <- ggplot(mtcars, aes(x=wt, y=mpg, colour=cyl)) + geom_point(aes(colour=cyl)) + labs(title = "Legend is top left") +
- theme(legend.justification = c(0, 1), legend.position = c(0, 1))
-
- b <- ggplot(mtcars, aes(x=wt, y=mpg, colour=cyl)) + geom_point(aes(colour=cyl)) + labs(title = "Legend is bottom right") +
- theme(legend.justification = c(1, 0), legend.position = c(1, 0))
-
- c <- ggplot(mtcars, aes(x=wt, y=mpg, colour=cyl)) + geom_point(aes(colour=cyl)) + labs(title = "Legend is bottom left") +
- theme(legend.justification = c(0, 0), legend.position = c(0, 0))
-
- d <- ggplot(mtcars, aes(x
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。