Re: [R] Plotting Upper triangle of Matrix with diagonal as the Base

2006-06-20 Thread Greg Snow
Try these functions (modify to suit your needs: tri1 - function(x){ n - dim(x)[2] for(i in n:1){ for( j in 1:(n-i+1) ){ cat(sprintf(' %5.2f',x[j,j+i-1])) } cat(\n) } } tri2 - function(x){ n

[R] Plotting Upper triangle of Matrix with diagonal as the Base

2006-06-19 Thread Cal Stats
Hi.. I a have a symmetric matrix to plot . I would like to plot only the Upper triangle but with the diagonal as the Base of the rectangle. Is there an easy way to do it. Thanks. Harsh - [[alternative HTML