Learn R Programming

ggtern (version 2.1.4)

tern_limits: Restrict Ternary Limits

Description

tern_limits (or its aliasses) appends new T, L and R ternary continuous scales, where the maximum scale value is specified, and, where the minimums for each are solved.

Usage

tern_limits(T = 1, L = 1, R = 1, ...)
limits_tern(...)
limit_tern(...)
tern_limit(...)

Arguments

T, L, R
numeric value (scalar) of the maximum T,L,R species limit for each scale respectively
...
other arguments to pass to ALL of scale_X_continuous (X = T, L, R)

Value

Either an empty list (when no solution can be found), or a list containing one of each of scale_X_continuous (X = T, L, R)

Details

The contra value (ie minimum value) for the T, L and R species is solved using linear equations, therefore, if the solution is degenerate, or, the solution results in a zero range in either of the proposed scales, then a warning message will be reported and an empty list returned. Note that limits_tern(...), limit_tern(...) and tern_limit(...) are all aliasses for the main function, tern_limits(...) and can be used interchangeably.

See Also

scale_T_continuous, scale_L_continuous and scale_R_continuous

Examples

Run this code
df = data.frame(x=runif(10),y=runif(10),z=runif(10))
ggtern(df,aes(x,y,z)) + geom_point() + tern_limits(0.7,0.3,0.4)

Run the code above in your browser using DataLab