[R] 3d graph to show matrix of z matrix values
playballa23
cjose at mail.usp.edu
Fri Oct 28 17:34:01 CEST 2011
> Hello,
>
> I'm not getting a great looking 3d graph when plotting my z values:
>
> x<- seq(0.0, max(d1), max(d1)/20)
> y<- seq(0.0, max(d2), max(d2)/20)
> z<- matrix(NA, length(x), length(y))
>
> persp3d(x, y, z, phi=30, theta=30, scale=TRUE,shade = 0.75,
> col=pal[col.ind], xlab=var.name[1], ylab=var.name[2], main="3d plot")
Your z values are all NA. What are you expecting to see?
*z values*:
i <- 0
for (el.x in x)
{
i <- i+1
j <- 1
for (el.y in y)
{
if( el.x==0 & el.y==0) *z[i,j]* <- Emax + B
if(!(el.x==0 & el.y==0)) *z[i,j]* <- model(el.x, el.y, m1, m2, dm1,
dm2, alpha)
j <- j+1
}
}
--
View this message in context: http://r.789695.n4.nabble.com/3d-graph-to-show-matrix-of-z-matrix-values-tp3948174p3948273.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list