Description Usage Arguments Details Value
Wrapper function for hist3D() and plotrgl() that plots an rgl plot from a Raster layer
1 2 3 | Plot3DRaster(raster, azimuth, colaltitude, col, border, x_lab, y_lab,
z_lab, z_lim, main, legend_lab, rgl, rgl_window, spin, movie, movie_name,
...)
|
raster |
Raster layer to plot |
azimuth |
azimuth angle, default is 45 |
coaltitude |
coaltitude angle, default is 30 |
col |
color palette. Default is plot3D::gg.col() |
border |
color of the lines drawn around surface facets, default is "black". |
x_lab |
label for x-axis, default is "Longitude" |
y_lab |
label for y-axis, default is "Latitude" |
z_lab |
label for z-axis, default is "" |
z_lim |
range of values for z axis, default is range(z) |
main |
plot title, default is raster object name |
legend_lab |
label for legend, default is z_lab |
rgl |
logical, create an interactive rgl object, default is TRUE |
rgl_window |
sets rgl window size, either "screen" or "image", optimized for viewing on screen or as an 1024x768 pixel image, respectively. Default is "screen". |
spin |
logical, spin the plot 360 degrees once, default is TRUE |
movie |
logical, create a .gif movie from the rgl plot. Default is FALSE. |
movie_name |
name of output gif movie. Default is saved in in working directroy as "RasterSpin.gif" |
... |
additional arguments for the hist3D() function |
For additional arguments see ?persp3D. If a movie is made, a new rgl window will open set with the proper dimensions, record the movie, then automatically close. All NA values are converted to 0 because the hist3d() plots were not working with NA values included in the matrix.
Plot of Raster layer in RStudio, 3d plot in interactive rgl device (optional), and a .gif movie of the plot rotating 360 degrees (optional)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.