[R] Axes in perspective plot - persp()
David Afshartous
dafshartous at med.miami.edu
Wed Jul 30 18:09:57 CEST 2008
All,
I'm making some plots with the persp() function and am having trouble
sorting out the following:
- How does one avoid the axes label overlapping the tick values?
- Is doesn't seem possible to independently control the number of ticks of
the x,y, and z-axes, e.g., I'd like say only 4 ticks on the y axes but 10 on
the other two.
- for my function (although it doens't happen for the reproducible example
below unfortunately) the origin of the x and y tick values seem to overlap,
is there any way to avoid this?
Example below.
theta <- seq(.1, 10, length = 30)
rho <- seq(0, .99, length = 30)
f <- function(theta, rho) { theta + rho^2 }
Z <- outer(theta, rho, f)
persp(theta, rho, Z, expand = 0.5, col = "lightblue", ticktype =
"detailed", nticks = 10)
Thanks,
David
More information about the R-help
mailing list