Showing posts with label ternary plot. Show all posts
Showing posts with label ternary plot. Show all posts

Monday, April 8, 2013

RG#29: Ternary plot

# data
X1 <- c(0.3, 0.2, 0.5, 0.6, 0.2, 0, 0, 0.004166667, 0.45)
X2 <- c(0.75,0.35,0,0.1,0.2,0.951612903,0.918103448,0.7875,0.45)
X3 <- c(0.15,0,0.5,0.3,0.6,0.048387097,0.081896552,0.208333333,0.1)
X4 <- c(100,2325,2503,1245, 551,-644,-377,-200, 2800)

dataf <- data.frame(X1, X2, X3, X4)

# plot
require(vcd)
ternaryplot(dataf[,1:3], dataf$X4)