plot.segment_domain: Create plot of segment Useful for evaluating & examining...

Description Usage Arguments Examples

View source: R/plot.segment_domain.R

Description

Create plot of segment Useful for evaluating & examining results of calc_stream_voronoi_weights

Usage

1
2
## S3 method for class 'segment_domain'
plot(triangles, voronoi, stream, seg_id, tri_id, trim_seg = T, title = F)

Arguments

triangles

sf polygon of delaunay triangulation corresponding to voronoi grid.

voronoi

sf polygon of voronoi tesselation (unstructured model grid).

stream

sf polyline, "exploded" into segments (see line_explode)

seg_id

integer, id of stream segment to be highlighted in plot

tri_id

integer, id of triangle segment highlighted in plot

trim_seg

(optional) whether segment should be trimmed to triangle extent (as is done in calc_stream_voronoi_weights) Default: True

title

(optional) T/F whether a title should be added to the plot identifying Triangle/Segment IDs

Examples

1
2
3
4
5
6
7
#-- Read in shapefiles
str <- read_sf(system.file("extdata", "MehlandHill2010_stream.shp", package = "pbjr"))
tri <- read_sf(system.file("extdata", "720_triangles.shp", package = "pbjr"))
vor <- read_sf(system.file("extdata", "720_voronoi.shp", package = "pbjr"))

#-- Plot
plot.segment_domain(tri, vor, str, seg_id = 34, tri_id = 451, title = T)

scantle/pbjr documentation built on Dec. 22, 2021, 10:19 p.m.