add_ternary_base: Draw the 2D ternary simplex

View source: R/add_ternary_base.R

add_ternary_baseR Documentation

Draw the 2D ternary simplex

Description

Draws the boundary of a 2D ternary simplex as an equilateral triangle

Usage

add_ternary_base(...)

Arguments

...

Arguments passed to ggplot2::geom_polygon(), such as colour, fill, linewidth, etc.

Value

A ggplot object

Examples

library(ggplot2)

# Basic simplex
ggplot() + add_ternary_base()

# Customize appearance
ggplot() + add_ternary_base(colour = "blue", linewidth = 1.5)


prefviz documentation built on April 13, 2026, 5:07 p.m.