Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

theme_elements

New Theme Elements


Description

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

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 theme_convenience_functions for additional information.

New/Additional Inheritance Structures

Based on the ggplot2existing structure (theme), the NEWindividual theme elements for the ternary plot are as follows:

NAME OBJECT/(INHERITS) DESCRIPTION
line element_line
rect element_rect
text element_text
title element_text/(text)
axis.line element_line/(line)
axis.text element_text/(text)
axis.title element_text/(title)
axis.ticks element_line/(line)
legend.key.size unit
panel.grid element_line/(line)
panel.grid.major element_line/(panel.grid)
panel.grid.minor element_line/(panel.grid)
strip.text element_text/(text)
axis.line.x element_line/(axis.line)
axis.line.x.top element_line/(axis.line.x)
axis.line.x.bottom element_line/(axis.line.x)
axis.line.y element_line/(axis.line)
axis.line.y.left element_line/(axis.line.y)
axis.line.y.right element_line/(axis.line.y)
axis.text.x element_text/(axis.text)
axis.text.x.top element_text/(axis.text.x)
axis.text.x.bottom element_text/(axis.text.x)
axis.text.y element_text/(axis.text)
axis.text.y.left element_text/(axis.text.y)
axis.text.y.right element_text/(axis.text.y)
axis.ticks.length unit
axis.ticks.length.x unit/(axis.ticks.length)
axis.ticks.length.x.top unit/(axis.ticks.length.x)
axis.ticks.length.x.bottom unit/(axis.ticks.length.x)
axis.ticks.length.y unit/(axis.ticks.length)
axis.ticks.length.y.left unit/(axis.ticks.length.y)
axis.ticks.length.y.right unit/(axis.ticks.length.y)
axis.ticks.x element_line/(axis.ticks)
axis.ticks.x.top element_line/(axis.ticks.x)
axis.ticks.x.bottom element_line/(axis.ticks.x)
axis.ticks.y element_line/(axis.ticks)
axis.ticks.y.left element_line/(axis.ticks.y)
axis.ticks.y.right element_line/(axis.ticks.y)
axis.title.x element_text/(axis.title)
axis.title.x.top element_text/(axis.title.x)
axis.title.x.bottom element_text/(axis.title.x)
axis.title.y element_text/(axis.title)
axis.title.y.left element_text/(axis.title.y)
axis.title.y.right element_text/(axis.title.y)
legend.background element_rect/(rect)
legend.margin margin
legend.spacing unit
legend.spacing.x unit/(legend.spacing)
legend.spacing.y unit/(legend.spacing)
legend.key element_rect/(rect)
legend.key.height unit/(legend.key.size)
legend.key.width unit/(legend.key.size)
legend.text element_text/(text)
legend.text.align character
legend.title element_text/(title)
legend.title.align character
legend.position character
legend.direction character
legend.justification character
legend.box character
legend.box.just character
legend.box.margin margin
legend.box.background element_rect/(rect)
legend.box.spacing unit
panel.background element_rect/(rect)
panel.border element_rect/(rect)
panel.spacing unit
panel.spacing.x unit/(panel.spacing)
panel.spacing.y unit/(panel.spacing)
panel.grid.major.x element_line/(panel.grid.major)
panel.grid.major.y element_line/(panel.grid.major)
panel.grid.minor.x element_line/(panel.grid.minor)
panel.grid.minor.y element_line/(panel.grid.minor)
panel.ontop logical
strip.background element_rect/(rect)
strip.background.x element_rect/(strip.background)
strip.background.y element_rect/(strip.background)
strip.text.x element_text/(strip.text)
strip.text.x.top element_text/(strip.text.x)
strip.text.x.bottom element_text/(strip.text.x)
strip.text.y element_text/(strip.text)
strip.text.y.left element_text/(strip.text.y)
strip.text.y.right element_text/(strip.text.y)
strip.placement character
strip.placement.x character/(strip.placement)
strip.placement.y character/(strip.placement)
strip.switch.pad.grid unit
strip.switch.pad.wrap unit
plot.background element_rect/(rect)
plot.title element_text/(title)
plot.title.position character
plot.subtitle element_text/(title)
plot.caption element_text/(title)
plot.caption.position character
plot.tag element_text/(title)
plot.tag.position character
plot.margin margin
aspect.ratio character

** NB: tern.panel.background, 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).

Author(s)

Nicholas Hamilton


ggtern

An Extension to 'ggplot2', for the Creation of Ternary Diagrams

v3.3.0
GPL-2 | file LICENSE
Authors
Nicholas Hamilton [aut, cre]
Initial release
2020-04-9

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.