Learn R Programming

lidR (version 1.2.1)

plot.lasmetrics: Plot an object of class lasmetrics in 2D

Description

This functions implements a plot method for a lasmetrics data.frame

Usage

# S3 method for lasmetrics
plot(x, z = NULL, colorPalette = height.colors(50),
  ...)

Arguments

x

A data.frame or data.table of class lasmetrics.

z

character. The field to plot. If NULL, autodetect.

colorPalette

characters. a list of colors such as that generated by heat.colors, topo.colors, terrain.colors or similar functions. Default is height.colors(50) provided by the package lidR

Supplementary parameters for plot

Details

The … param provides additional arguments to plot.

See Also

grid_metrics grid_canopy height.colors forest.colors heat.colors colorRampPalette

Examples

Run this code
# NOT RUN {
LASfile <- system.file("extdata", "Megaplot.laz", package="lidR")
las = readLAS(LASfile)

# Canopy surface model with 4 m^2 cells
grid_canopy(las) %>% plot

# Mean height with 400 m^2 cells
grid_metrics(las, mean(Z)) %>% plot

# With multiple metrics
metrics = grid_metrics(las, .stdmetrics_z)

plot(metrics)
plot(metrics, "zmean")
plot(metrics, "zmax")
# }

Run the code above in your browser using DataLab