R/legend_position.R
legend_none.Rd
A one-liner to remove the legend from a plot. Cleaner alternative to theme(legend.position = "none").
theme(legend.position = "none")
legend_none()
A ggplot2 theme object that can be added to a plot.
legend_left, legend_right
legend_left
legend_right
library(ggplot2) # Remove legend ggplot(mtcars, aes(mpg, wt, color = factor(cyl))) + geom_point() + legend_none()