setLegendPosition: Function setLegendPosition

Description Usage Arguments Details Value Author(s) Examples

View source: R/ThemePack.R

Description

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.

Usage

1
setLegendPosition(ggplot, legendPosition = "right", themeStyle = "grey")

Arguments

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")

Details

This should be called after setting one of greyTheme, bwTheme, theme_grey or theme_bw as those theme reset the legend attributes.

Value

A ggplot object with the legend adjusted as specified

Author(s)

John Thompson, john.thompson@bms.com

Examples

1
Myggplot = myggplot + NoXGrid()

jrthompson54/DGE.Tools2 documentation built on May 12, 2021, 8:47 p.m.