From: Marius Hofert <m_hofert_at_web.de>

Date: Fri, 04 Mar 2011 09:17:47 +0100

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. Received on Fri 04 Mar 2011 - 08:22:21 GMT

Date: Fri, 04 Mar 2011 09:17:47 +0100

f <- function(x) 1/((1-x[1])*(1-x[2])+1)

u <- seq(0, 1, length.out=20)

grid <- expand.grid(x=u, y=u)

x <- grid[,1] y <- grid[,2] z <- apply(grid, 1, f)

pt.x <- c(0.2, 0.5)

pt.y <- c(0.6, 0.8)

eps <- 0.25

pts <- rbind(c(pt.x, f(pt.x)-eps), c(pt.y, f(pt.y))) # points to add to the wireframe

wireframe(z~x*y, pts=pts, aspect=1, scales=list(col=1, arrows=FALSE),

panel.3d.wireframe = function(x,y,z,xlim,ylim,zlim,xlim.scaled, ylim.scaled,zlim.scaled,pts,...){ panel.3dwire(x=x, y=y, z=z, xlim=xlim, ylim=ylim, zlim=zlim, xlim.scaled=xlim.scaled, ylim.scaled=ylim.scaled, zlim.scaled=zlim.scaled, ...) panel.3dscatter(x=pts[,1], y=pts[,2], z=pts[,3], xlim=xlim, ylim=ylim, zlim=zlim, xlim.scaled=xlim.scaled, ylim.scaled=ylim.scaled, zlim.scaled=zlim.scaled, type="p", col=c(2,3), cex=1.8, .scale=TRUE, ...) }, key=list(x=0.5, y=0.95, points=list(col=c(2,3)), text=list(c("Point 1", "Point 2")), cex=1, align=TRUE, transparent=TRUE)) ______________________________________________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. Received on Fri 04 Mar 2011 - 08:22:21 GMT

Archive maintained by Robert King, hosted by
the discipline of
statistics at the
University of Newcastle,
Australia.

Archive generated by hypermail 2.2.0, at Wed 30 Mar 2011 - 09:10:25 GMT.

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