An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20110707/6aa76270/attachment.pl>
plot3D raster coordinates
5 messages · Etienne B. Racine, Robert J. Hijmans
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20110707/8ad8ef84/attachment.pl>
6 days later
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20110713/d66f51fa/attachment.pl>
1 day later
(plot3D is in fact in the rasterVis package now) There's an adjustment factor additional to the zfac parameter. It is impossible to override it. The solution I've found is to comment these lines and run the function under another name (these lines are present 2 times). # adj <- zlen/min(ylen,xlen) # X <- X * adj * zfac # Y <- Y * adj * zfac If you need to keep the zfac, I'd suggest to put it directly on Z. Z <- t((getValues(x, format='matrix'))[nrow(x):1,]) * zfac I'd be curious to hear why is the z scaling factor is applied in that fashion.
The zfac could be changed, but I think the main issue is the "adj" factor that scales the x, y and z values to get a nice 3D plot. It may be possible to do this differently, and I will try to do that; I had overlooked this problem (of wrong coordinates on the axis, and not being able to correctly plot vector data on top). Thanks for pointing this out, Robert -- View this message in context: http://r-sig-geo.2731867.n2.nabble.com/plot3D-raster-coordinates-tp6558234p6585449.html Sent from the R-sig-geo mailing list archive at Nabble.com.
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20110715/40a48820/attachment.pl>