Show patches
Show patches
show_patches(landscape, class, directions, labels, nrow, ncol) ## S3 method for class 'RasterLayer' show_patches( landscape, class = "global", directions = 8, labels = FALSE, nrow = NULL, ncol = NULL ) ## S3 method for class 'RasterStack' show_patches( landscape, class = "global", directions = 8, labels = FALSE, nrow = NULL, ncol = NULL ) ## S3 method for class 'RasterBrick' show_patches( landscape, class = "global", directions = 8, labels = FALSE, nrow = NULL, ncol = NULL ) ## S3 method for class 'stars' show_patches( landscape, class = "global", directions = 8, labels = FALSE, nrow = NULL, ncol = NULL ) ## S3 method for class 'list' show_patches( landscape, class = "global", directions = 8, labels = FALSE, nrow = NULL, ncol = NULL )
landscape |
*Raster object |
class |
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). |
directions |
The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case). |
labels |
Logical flag indicating whether to print or not to print patch labels. |
nrow, ncol |
Number of rows and columns for the facet. |
The functions plots the landscape with the patches labeled with the corresponding patch id.
ggplot
show_patches(landscape) show_patches(landscape, class = c(1, 2)) show_patches(landscape, class = 3, labels = FALSE)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.