Learn R Programming

ggtern (version 1.0.1.3)

validate_element: Overloaded ggplot2 functions

Description

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

Usage

validate_element(el, elname)

theme_update(...)

opts(...)

plot_theme(x)

theme_get()

theme_set(new) update_theme(oldtheme, newtheme)

calc_element(element, theme, verbose = FALSE)

combine_elements(e1, e2) add_ggplot(p, object, objectname)

Arguments

el
the element
elname
the element name
x
gg object
oldtheme
previous theme object
newtheme
new theme object
e1
first element
e2
second element
p
plot
object
to add
objectname
name of obeject
...
named list of theme settings
new
new theme (a list of theme elements)
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

Details

validate_element is a 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.

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

"%+replace%" replace operator

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 method that combines two theme elements

"%+%" add operator no change other than exporting from this namespace

add_ggplot is a local copy of method that adds elements to a gg object.

See Also

calc_element