Reputation: 282
Using ggplot2
it gives the box of legends for every line in the right of the plot
Is there any command which could add this box under the plot like this one:
Upvotes: 0
Views: 49
Reputation: 3294
legend.position = "bottom"
is what you are looking for:
ggplot(mtcars, aes(hp, mpg, col = factor(cyl))) +
geom_line() +
labs(col = NULL) +
theme(legend.position = "bottom")
Upvotes: 1