show_patches: Show patches

Description Usage Arguments Details Value Examples

View source: R/show_patches.R

Description

Show patches

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
show_patches(landscape, class, directions, labels, nrow, ncol)

## S3 method for class 'RasterLayer'
show_patches(landscape, class = "global",
  directions = 8, labels = TRUE, nrow = NULL, ncol = NULL)

## S3 method for class 'RasterStack'
show_patches(landscape, class = "global",
  directions = 8, labels = TRUE, nrow = NULL, ncol = NULL)

## S3 method for class 'RasterBrick'
show_patches(landscape, class = "global",
  directions = 8, labels = TRUE, nrow = NULL, ncol = NULL)

## S3 method for class 'stars'
show_patches(landscape, class = "global",
  directions = 8, labels = TRUE, nrow = NULL, ncol = NULL)

## S3 method for class 'list'
show_patches(landscape, class = "global",
  directions = 8, labels = TRUE, nrow = NULL, ncol = NULL)

Arguments

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.

Details

The functions plots the landscape with the patches labeled with the corresponding patch id.

Value

ggplot

Examples

1
2
3

r-spatialecology/landscapemetrics documentation built on April 30, 2019, 6:01 a.m.