Description Usage Arguments References Examples
View source: R/plot_projection.R
Visualization of a projected voxel cloud.
1 | plot_projection(data, var, th, palette)
|
data |
a data.frame or data.table containing the output of the project_voxels function: x, y, number of voxels, number of points and ratio of a projected voxel cloud. |
var |
character. The variable to plot: "nvox" for the number of voxels per pixel, "npts" for the number of points or "ratio" for the ratio npts/nvox. Default is "nvox". |
th |
numeric between 0 and 1. A quantile threshold that defines the maximum value of |
palette |
a color palette to use for plotting. |
Lecigne, B., Delagrange, S., & Messier, C. (2018). Exploring trees in three dimensions: VoxR, a novel voxel-based R package dedicated to analysing the complex arrangement of tree crowns. Annals of botany, 121(4), 589-601.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | #- import tls data
tls=data.table::fread(system.file("extdata", "Tree_t0.asc", package="VoxR"))
#- voxelisation
voxels = VoxR::vox(tls,0.05)
#- project into the xy plan
project = VoxR::project_voxels(voxels,"xy")
#- plot the number of voxels
VoxR::plot_projection(project,var = "nvox")
#- plot the number of points
VoxR::plot_projection(project,var = "npts")
#- plot the ratio npts/nvox
VoxR::plot_projection(project,var = "ratio")
#- plot the number of voxels with different color palette
VoxR::plot_projection(project,palette = terrain.colors)
#- plot the number of voxels with a 95% percentile threshold
VoxR::plot_projection(project,th = 0.95)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.