diff --git a/communicate-plots.Rmd b/communicate-plots.Rmd index 889d357..2344dff 100644 --- a/communicate-plots.Rmd +++ b/communicate-plots.Rmd @@ -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.