raster (version 1.1.7)

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

Arguments

Methods

plot3D(x, background=0, maxpixels=100000, zfac=6, drape=NULL, col=terrain.colors, rev=TRUE, ...) rll{ x a RasterLayer object background value used to replace NA values maxpixels Maximum number of pixels to use zfac Numeric, to set the elevation scale relative to x and y drape RasterLayer, to 'drape' colors representing the values of this layer on the 3D representation of layer x. In this casex typically has elevation data col A color palette, i.e. a vector of n contiguous colors such as rainbow, heat.colors, and topo.colors, on one or your own making rev Logical. If TRUE, the color palette values are reversed in order ... Any argument that can be passed to plot3d }

Examples

Run this code
if (require(rgl)) {
r <- raster(system.file("external/test.grd", package="raster"))
plot3D(r)
}

Run the code above in your browser using DataCamp Workspace