Learn R Programming

rasterVis (version 0.21)

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=1, drape=NULL, col, rev=FALSE, adjust=TRUE, ...)

Arguments

docType

methods

Examples

Run this code
if (require(rgl)) {
data(volcano)
r <- raster(volcano)
extent(r) <- c(0, 610, 0, 870)
drape <- cut(r, 5)
plot3D(r, drape=drape, zfac=2)
}

Run the code above in your browser using DataLab