Show landscape metricsSource:
Show landscape metrics on patch level printed in their corresponding patch.
show_lsm( landscape, what, class = "global", directions = 8, consider_boundary = FALSE, edge_depth = 1, labels = FALSE, label_lsm = FALSE, nrow = NULL, ncol = NULL )
Patch level what to plot
How to show the labeled patches: "global" (single map), "all" (every class as facet), or a vector with the specific classes one wants to show (every selected class as facet).
The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).
Logical if cells that only neighbour the landscape boundary should be considered as core
Distance (in cells) a cell has the be away from the patch edge to be considered as core cell
Logical flag indicating whether to print or not to print patch labels.
If true, the value of the landscape metric is used as label
- nrow, ncol
Number of rows and columns for the facet.
The function plots all patches with a fill corresponding to the value of the chosen landscape metric on patch level.
landscape <- terra::rast(landscapemetrics::landscape) show_lsm(landscape, what = "lsm_p_area", directions = 4) #> $layer_1 #> show_lsm(landscape, what = "lsm_p_shape", class = c(1, 2), label_lsm = TRUE) #> $layer_1 #> show_lsm(landscape, what = "lsm_p_circle", class = 3, labels = TRUE) #> $layer_1 #>