[R] how to rotate a triangle image(ZMAT) ?

From: Cleber N.Borges <klebyn_at_yahoo.com.br>
Date: Wed 28 Jun 2006 - 03:25:20 EST


 Hello R users...

 how to align this Zmat (triangle image) in X axis?  I would like that the triangle's base become in the X axis and
 the triangle's height become in the Y axis

 Is there some trick for make this?

 Thanks.
 Cleber  

######################## my test and try
 f <- function(x,y){
 z=1-x-y
 z[ z < (-1e-15) ] <- NA
 return( -100*x+0*y+100*z )
 }

 x = seq( 1, 0, by = -0.01 )
 y = seq( 1, 0, by = -0.01 )
 zmat = outer(x,y,f)

 image(zmat, col=terrain.colors(10))
 contour(zmat, add=T)



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Wed Jun 28 03:29:30 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Thu 29 Jun 2006 - 00:12:37 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.