Description Usage Arguments Details Value Author(s) Examples
Move the legend around outside (right, left, top, bottom) or inside corner (ne, se, nw, sw) of your plot. Respects the bw or grey theme style. You could also use this to get a grey legend on a bw theme or vice versa.
1 | setLegendPosition(ggplot, legendPosition = "right", themeStyle = "grey")
|
ggplot |
A ggplot plot object |
legendPosition |
One of top, bottom, right, left, ne, se, nw, sw. The first four place it outside the figure. The last four place it inside the figure. (Default = "right") |
themeStyle |
one of "grey" or "bw". (Default = "grey") |
This should be called after setting one of greyTheme, bwTheme, theme_grey or theme_bw as those theme reset the legend attributes.
A ggplot object with the legend adjusted as specified
John Thompson, john.thompson@bms.com
1 | Myggplot = myggplot + NoXGrid()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.