Default legend on the right

This commit is contained in:
hadley 2016-08-17 13:52:12 -05:00
parent 4d4f6d6b57
commit c67d5ed58c
1 changed files with 2 additions and 2 deletions

View File

@ -315,10 +315,10 @@ To control the overall position of the legend, you need to use a `theme()` setti
base <- ggplot(mpg, aes(displ, hwy)) +
geom_point(aes(colour = class))
base + theme(legend.position = "left") # the default
base + theme(legend.position = "left")
base + theme(legend.position = "top")
base + theme(legend.position = "bottom")
base + theme(legend.position = "right")
base + theme(legend.position = "right") # the default
```
You can also use `legend.postion = "none"` to suppress the display of the legend altogether.