Description Usage Format Details Value
'ggset' and 'ggdo' are both nested lists of functions to help setting ggplot themes more intuitively.
1 2 3 4 5 |
An object of class list
of length 9.
'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.
a 'theme' object
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.