Learn R Programming

ggtern (version 2.1.4)

zzz-overloaded: Overloaded ggplot2 functions

Description

INTERNAL FUNCTIONS (Overloaded from ggplot2): The source of the following functions originate from ggplot2, however, minor patches were required in order for them to function under the ggtern framework. Patches were mainly to do with handling the new theme elements and heirarchies.

validate_element is a local copy of the ggplot2 function which checks the validity of a given theme element against the elements table. Since the .elements_tree is an internal function, which is not exported, and modifications could not be made, a new (and equivalent) .element_tree is created within ggtern to handle the new theme elements created within this package.

plot_theme is a local copy of the method that determines the net theme between a plot and the current global theme.

add_theme is a local copy of the ggplot2 function which modifies the current theme, by a proposed theme. It is slightly modified to handle 'logical' values the same way it handles 'character' or 'numeric' values, which do not inherit from 'element' objects.

"%+replace%" is a local copy of the ggplot2 replace operator, no different other than being exported from the ggtern namespace.

update_theme is a local copy of a ggplot2 function, which copies elements from the new theme into an old theme.

combine_elements is a local copy of the ggplot2 function that combines two theme elements

calc_element is a local copy of the ggplot2 function which determines the net element based on inheritances, given input theme.

Usage

validate_element(el, elname)
theme_update(...)
plot_theme(x)
theme_get()
theme_set(new)
add_theme(t1, t2, t2name)
e1 %+replace% e2
update_theme(oldtheme, newtheme)
combine_elements(e1, e2)
calc_element(element, theme, verbose = FALSE)

Arguments

el
the element
elname
the element name
...
named list of theme settings
x
gg object
new
new theme (a list of theme elements)
t1
A theme object
t2
A theme object that is to be added to t1
t2name
A name of the t2 object. This is used for printing informative error messages.
e1
first element
e2
second element
oldtheme
previous theme object
newtheme
new theme object
element
The name of the theme element to calculate
theme
A theme object (like theme_grey())
verbose
If TRUE, print out which elements this one inherits from

Format

functions and objects

See Also

theme_update

add_theme