Users, I’d like to have some tips for a ternaryplot (“vcd”).
I have this dataframe:
a <- c(0.1, 0.5, 0.5, 0.6, 0.2, 0, 0, 0.004166667, 0.45)
b <- c(0.75,0.5,0,0.1,0.2,0.951612903,0.918103448,0.7875,0.45)
c <- c(0.15,0,0.5,0.3,0.6,0.048387097,0.081896552,0.208333333,0.1)
d <- c(500,2324.90,2551.44,1244.50, 551.22,-644.20,-377.17,-100, 2493.04)
df <- data.frame(a, b, c, d)
and I’m building a ternary plot:
ternaryplot(df[,1:3], df$d)
How can I map the continuous variable d, obtaining a result similar to this one?

This is probably not the most elegant way to do this but it works (from scratch and without using
ternaryplotthough: I couldn’t figure out how to do it).