ggset: Set components of a ggplot object

Description Usage Format Details Value

Description

'ggset' and 'ggdo' are both nested lists of functions to help setting ggplot themes more intuitively.

Usage

1
2
3
4
5

Format

An object of class list of length 9.

Details

'ggset' lets you dig to the element you want to change, and apply those changes, so that 'ggset$panel$background(fill = "blue")' is the same as 'theme(panel.background = element_rec(fill = "blue"))'. The arguments are most of the time ultimately forwarded to an 'element_*()' function and you can change many attributes of a component at once. '?margin' will provide the description of most parameters.

'ggdo' on the other hands starts from the action you want to perform, so that the equivalent to the above would be 'ggdo$fill_background$panel("red")'. Typically with 'ggdo' we set a single or a couple of attributes at once.

'ggremove' is like 'ggset' but helps removing components, it sets the relevant 'theme()' arguments to either 'element_blank()' or 'NULL', so 'ggremove$panel$background()' is the same as 'theme(panel.background = element_blank())'

There would have been many other ways to organize these lists and we went for an partially arbitrary reorganization rather than a fully systematic one.

Value

a 'theme' object


moodymudskipper/ggdollar documentation built on Dec. 9, 2019, 12:16 a.m.