powered by
Helper function to generate bivariate plot coordinates for ternary data.
xyz2xy(xyz)
an n x 2 numerical matrix
n x 2
an n x 3 matrix or data frame
n x 3
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