Learn R Programming

rasterVis (version 0.10-2)

plot3D: Interactive 3D plot of a RasterLayer

Description

Make an interactive 3D plot (map) of a RasterLayer. This is a wrapper around surface3d in the rgl package. You can use decorate3d to add axes.

Usage

## S3 method for class 'RasterLayer':
plot3D(x, maxpixels=100000,
  zfac=6, drape=NULL, col=terrain.colors, rev=FALSE, ...)

Arguments

docType

methods

Examples

Run this code
if (require(rgl)) {
data(volcano)
r <- raster(volcano)
drape <- cut(r, 5)
plot3D(r, drape=drape, zfac=4)
decorate3d(xlab = "x", ylab = "y", zlab = "z", axes=TRUE)
}

Run the code above in your browser using DataLab