I would like to use the functions in the plot3D package but I am having trouble 
getting the axis limits to work correctly.  The slices plotted by the code 
below go beyond the bounds of the persp box and obscure the axis information.  
How can I show just the part of the domain within x.limits and y.limits?

library(plot3D)
x <- z <- seq(-4, 4, by=0.2)
y <- seq(-6, 6, by=0.2)
M <- mesh(x,y,z)
R <- with(M, sqrt(x^2 + y^2 +z^2))
p <- sin(2*R)/(R+1e-3)
x.limits <- c(-2, 2)
y.limits <- c(-2, 2)
slice3D(x,y,z, colvar=p, xs=0, ys=c(0, 4), zs=NULL, xlim=x.limits, 
ylim=y.limits, scale=F, ticktype="detailed")

Thanks,
Scott Waichler
Pacific Northwest National Laboratory
Richland, WA, USA

______________________________________________
R-help@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.

Reply via email to