Learn R Programming

ggtern (version 1.0.2.0)

themeelements: New Theme Elements

Description

ggtern creates many new theme elements and inheritances, the following is an outline:

Usage

theme(..., complete = FALSE)

Arguments

...
a list of element name, element pairings that modify the existing theme.
complete
set this to TRUE if this is a complete theme, such as the one returned by theme_grey(). Complete themes behave differently when added to a ggplot object.

New/Additional Inheritance Structures

Based on the ggplot2 existing structure (theme), the new individual theme elements for the ternary plot are as follows:

llll{ NAME DESCRIPTION OBJECT INHERITS panel.background.tern** Background of Ternary Plot Area element_rect rect axis.tern Base line for ggtern object element_line line axis.tern.vshift Amount to nudge the plot vertically unit axis.tern.hshift Amount to nudge the plot horizontally unit axis.tern.clockwise Clockwise Axis Precession logical axis.tern.showarrows Show axis arrows or not logical axis.tern.padding Padding between axes and panel edges unit axis.tern.arrowsep Distance between axes and the ternary arrows unit axis.tern.arrowstart Proportion along ternary axis when arrow starts numeric axis.tern.arrowfinish Proportion along ternary axis when arrow starts numeric axis.tern.arrow Base line for ternary arrows element_line axis.tern axis.tern.arrow.T Specific line for TOP ternary arrow element_line axis.tern.arrow axis.tern.arrow.L Specific line for LHS ternary arrow element_line axis.tern.arrow axis.tern.arrow.R Specific line for RHS ternary arrow element_line axis.tern.arrow axis.tern.line Base line for ternary axes element_line axis.tern axis.tern.line.T Specific line for TOP ternary axis element_line axis.tern.line axis.tern.line.L Specific line for LHS ternary axis element_line axis.tern.line axis.tern.line.R Specific line for RHS ternary axis element_line axis.tern.line axis.tern.text Base text for ggtern object element_text text axis.tern.text.T Specific text for TOP species element_text axis.tern.text axis.tern.text.L Specific text for LHS species element_text axis.tern.text axis.tern.text.R Specific text for RHS species element_text axis.tern.text axis.tern.arrow.text Base text for arrow labels element_text axis.tern.text axis.tern.arrow.text.T Specific text for TOP arrow label element_text axis.tern.arrow.text axis.tern.arrow.text.L Specific text for LHS arrow label element_text axis.tern.arrow.text axis.tern.arrow.text.R Specific text for RHS arrow label element_text axis.tern.arrow.text axis.tern.title Base text for Apex Labels element_text axis.tern.text axis.tern.title.T Specific text for TOP Apex Label element_text axis.tern.title axis.tern.title.L Specific text for LHS Apex Label element_text axis.tern.title axis.tern.title.R Specific text for RHS Apex Label element_text axis.tern.title axis.tern.ticklength.major Major ticklength unit axis.tern.ticklength.minor Minor ticklength unit axis.tern.ticks.outside Base ticks for ggtern object on outside or not logical axis.tern.ticks.showprimary Show primary tickset logical axis.tern.ticks.showsecondary Show secondary tickset logical axis.tern.ticks Base ticks for ggtern object element_line axis.tern axis.tern.ticks.major Base Major ticks for ggtern object element_line axis.tern.ticks axis.tern.ticks.major.T Major ticks for TOP Axis element_line axis.tern.ticks.major axis.tern.title.major.L Major ticks for LHS Axis element_line axis.tern.ticks.major axis.tern.title.major.R Major ticks for RHS Axis element_line axis.tern.ticks.major axis.tern.ticks.minor Base Minor ticks for ggtern object element_line axis.tern.ticks axis.tern.ticks.minor.T Minor ticks for TOP Axis element_line axis.tern.ticks.minor axis.tern.title.minor.L Minor ticks for LHS Axis element_line axis.tern.ticks.minor axis.tern.title.minor.R Minor ticks for RHS Axis element_line axis.tern.ticks.minor panel.grid.tern Base gridline for ggtern object element_line axis.tern panel.grid.tern.major Base major gridline element_line panel.grid.tern panel.grid.tern.major.T Major gridline for TOP Axis element_line panel.grid.tern.major panel.grid.tern.major.L Major gridline for LHS Axis element_line panel.grid.tern.major panel.grid.tern.major.R Major gridline for RHS Axis element_line panel.grid.tern.major panel.grid.tern.minor Base major gridline element_line panel.grid.tern panel.grid.tern.minor.T Minor gridline for TOP Axis element_line panel.grid.tern.minor panel.grid.tern.minor.L Minor gridline for LHS Axis element_line panel.grid.tern.minor panel.grid.tern.minor.R Minor gridline for RHS Axis element_line panel.grid.tern.minor ternary.options (DEP***) Ternary specific options element_ternary } ** NB: For panel.background.tern, whilst the ternary area is 'triangular' per-se, element_rect has been used, as it actually holds NO information regarding the geometry (width, height), only fill, color, size and linetype border (ie the style of how it will be rendered).

*** NB: Fully Depreciated since ggtern version 1.0.1.3

Details

Theme elements can inherit properties from other theme elements. For example, axis.title.x inherits from axis.title, which in turn inherits from text. All text elements inherit directly or indirectly from text; all lines inherit from line, and all rectangular objects inherit from rect.

Modifying the newly created items requires the same procedures as introduced in the ggplot2 theme documentation. Some convenience functions have been also newly created, proceed to convenience for additional information.