cubeView {mapview} | R Documentation |
Create a 3D data cube from a RasterStack or RasterBrick. The cube can be freely rotated so that Hovmoller views of x - z and y - z are possible.
cubeView( x, at, col.regions = mapviewGetOption("raster.palette"), na.color = mapviewGetOption("na.color"), legend = TRUE ) cubeview(...)
x |
a RasterStack or RasterBrick |
at |
the breakpoints used for the visualisation. See
|
col.regions |
color (palette).See |
na.color |
color for missing values. |
legend |
logical. Whether to plot a legend. |
... |
currently not used. |
The visible layers are alterable by keys:
x-axis: LEFT / RIGHT arrow key
y-axis: DOWN / UP arrow key
z-axis: PAGE_DOWN / PAGE_UP key
Note: In RStudio cubeView may show a blank viewer window. In this case open the view in a web-browser (RStudio button at viewer: "show in new window").
Note: Because of key focus issues key-press-events are not always recognised within RStudio at Windows. In this case open the view in a web-browser (RStudio button at viewer: "show in new window").
Press and hold left mouse-button to rotate the cube. Press and hold right mouse-button to move the cube. Spin mouse-wheel or press and hold middle mouse-button and move mouse down/up to zoom the cube.
cubeview
: alias for ease of typing
Stephan Woellauer and Tim Appelhans
## Not run: library(raster) kili_data <- system.file("extdata", "kiliNDVI.tif", package = "mapview") kiliNDVI <- stack(kili_data) cubeView(kiliNDVI) clr <- viridisLite::viridis cubeView(kiliNDVI, at = seq(-0.15, 0.95, 0.1), col.regions = clr) ## End(Not run)