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")
Are there other options like persp3d where I can just plot my z-values along
the x and y axis??
Thanks in advance
--
View this message in context: http://r.789695.n4.nabble.com/3d-graph-to-show-matrix-of-z-matrix-values-tp3948174p3948174.html
Sent from the R help mailing list archive at Nabble.com.
3d graph to show matrix of z matrix values
4 messages · playballa23, Duncan Murdoch
On 28/10/2011 11:04 AM, playballa23 wrote:
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? Duncan Murdoch
Are there other options like persp3d where I can just plot my z-values along the x and y axis?? Thanks in advance -- View this message in context: http://r.789695.n4.nabble.com/3d-graph-to-show-matrix-of-z-matrix-values-tp3948174p3948174.html Sent from the R help mailing list archive at Nabble.com.
______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
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.
On 11-10-28 11:34 AM, playballa23 wrote:
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
}
}
Is that supposed to respond to my statement or my question? It doesn't seem to do either... Duncan Murdoch