[R] triangular color plot of array

Jim Lemon jim at bitwrit.com.au
Tue Jul 30 06:10:47 CEST 2013


On 07/30/2013 04:54 AM, White, William Patrick wrote:
> Hello,
> I've encountered an interesting situation and can't seem to find an applicable solution. I've got a multivariate synthetic dataset I generated in order to explore various statistical techniques. In my dataset I vary three things, sample size, effect size, and the number of variables that are affected. As these are varied I've output my results into a three dimensional array. So for each possible combination, think xyz location, I have an output value. What I would like to do is to create a somewhat unique style of plot very similar to a triangular soil texture plot, excepting that at rather than dropping a point at a given coordinate, I have all possible coordinates on the grid, and I would like to overlay a color map in which combinations that yield high values shade towards one color, and low values another or some other such color scheme. Thus displaying under what conditions certain accuracies are achieved for the test.
> I've explored both the soil texture plotting solutions in R, and as best I can with little background in image work the 3d plotting solutions offered by various packages. I haven't found anything that seems to be able to handle an array this way. I was wondering if anyone could point me in the right direction.
> P~
>
Hi William,
If you haven't looked at the triax.fill function in the plotrix package, 
that might be helpful. I'm not sure what resolution you want on the 
plot, but triax.fill will display colors down to a few pixels.

Jim



More information about the R-help mailing list