plot.LcpFinder | R Documentation |
LcpFinder
objectPlots a LcpFinder
object.
## S4 method for signature 'LcpFinder'
points(x, add = TRUE, ...)
## S4 method for signature 'LcpFinder'
lines(x, add = TRUE, ...)
x |
a |
add |
boolean; if |
... |
arguments passed to the default plotting functions |
points()
plots points at the centroids of the cells to which
a path has been found. lines()
plots all of the LCPs found so far by
the LcpFinder
object.
no return value
library(quadtree)
habitat <- terra::rast(system.file("extdata", "habitat.tif", package="quadtree"))
qt <- quadtree(habitat, .1)
start_point <- c(6989, 34007)
end_point <- c(12558, 27602)
lcpf <- lcp_finder(qt, start_point)
lcp <- find_lcp(lcpf, end_point)
plot(qt, crop = TRUE, border_lwd = .3, na_col = NULL)
points(lcpf, col = "red", pch = 16, cex = .4)
lines(lcpf)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.