Default legend on the right
This commit is contained in:
parent
4d4f6d6b57
commit
c67d5ed58c
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue