如何将三向颜色渐变(热图)填充到三角图(三角图),就像这样.
plot(NA,NA,xlim=c(0,1),ylim=c(0,sqrt(3)/2),asp=1,bty="n",axes=F,xlab="",ylab="")
segments(0,0,0.5,sqrt(3)/2)
segments(0.5,sqrt(3)/2,1,0)
segments(1,0,0,0)

颜色应与triplot平行运行.
我可以使用包klaR找出triplot........
   require(klaR)
triplot(label = c("1, 2 or 3", "4 or 5", "6"), 
    main = "die rolls: probabilities", pch = 17)
我想绘制阴影的triplot,以便我可以显示哪个特定点落入哪个类.
是否有任何包(开发或不发达)来做到这一点?或者我们可以调整可用的包来实现这个目标吗?

编辑:回答以下答案:
xpoint <- matrix(c(0, 0, 10,  0, 10, 0, 10,0,0, 10,10, 0, 10,0,10, 0,0, 10, 0,10,10, 10,10,10), ncol =3, byrow= TRUE)
xp <- t(apply(xpoint,1,tern2cart))
points(xp[,1], y = xp[,2], type = "p", col = "green", pch = "*", cex = 4)
text(xp[,1]-0.01,xp[,2]-0.01)
> xpoint 
       [,1] [,2] [,3]
    [1,]    0    0   10
    [2,]    0   10    0
    [3,]   10    0    0 …