Learn R Programming

geostats (version 1.6)

xyz2xy: get x,y plot coordinates of ternary data

Description

Helper function to generate bivariate plot coordinates for ternary data.

Usage

xyz2xy(xyz)

Value

an n x 2 numerical matrix

Arguments

xyz

an n x 3 matrix or data frame

Examples

Run this code
xyz <- rbind(c(1,0,0),c(0,1,0),c(0,0,1),c(1,0,0))
xy <- xyz2xy(xyz)
plot(xy,type='l',bty='n')

Run the code above in your browser using DataLab