triplot

three-way color gradient fill in r

橙三吉。 提交于 2019-11-30 05:55:50
问题 How can I fill three way color gradient (heatmap) to a triplot (triangle plot), like this. 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) Color should run in parallel to triplot. 回答1: Here is one way to do it - it's a bit of a hack, using points to plot the gradient piece by piece: plot(NA,NA,xlim=c(0,1),ylim=c(0,1),asp=1,bty="n",axes=F,xlab="",ylab="") segments(0,0,0.5,sqrt(3)/2)

three-way color gradient fill in r

。_饼干妹妹 提交于 2019-11-28 04:24:01
How can I fill three way color gradient (heatmap) to a triplot (triangle plot), like this. 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) Color should run in parallel to triplot. Here is one way to do it - it's a bit of a hack, using points to plot the gradient piece by piece: plot(NA,NA,xlim=c(0,1),ylim=c(0,1),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) # sm - how smooth the plot is. Higher values will plot very slowly