Zhenguo Zhang moves the legend somewhere else:
By default,
ggplot2places the legend outside the plot area (usually on the right). However, sometimes you may want to move the legend inside the plot to save space or improve the layout. This post explores how to achieve this usingtheme()parameters.
Click through to see what options are available.