# load tree inventory data from plot Chablais 3
data("tree_inventory_chablais3")
# display tree inventory
plot_tree_inventory(tree_inventory_chablais3[, c("x", "y")],
diam = tree_inventory_chablais3$d, col = "red",
pch = tree_inventory_chablais3$e,
xlab = "X", ylab = "Y"
)
# display tree inventory with CHM background
data("chm_chablais3")
chm_chablais3 <- terra::rast(chm_chablais3)
terra::plot(chm_chablais3, col = gray(seq(0, 1, 1 / 255)))
plot_tree_inventory(tree_inventory_chablais3[, c("x", "y")],
height = tree_inventory_chablais3$h,
species = tree_inventory_chablais3$s,
add = TRUE
)
Run the code above in your browser using DataLab