plotgraph: Plotting the spatial graph

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/plotgraph.R

Description

Function to plot the spatial graph

Usage

1
2
plotgraph(nodes, edges, land_polyg, scale_nodes = 10, col_nodes = "darkblue", 
col_labels = "darkblue", cex_labels = 1, main = "Graph")

Arguments

nodes

Output of node.creation.

edges

Output of edge.creation.

land_polyg

SpatialPolygonsDataFrame with the polygons defined by roads and the study site limits.

scale_nodes

Node size scaling factor for correct viewing in the plot.

col_nodes

Node colour.

col_labels

Labels colour.

cex_labels

Text labels font size.

main

Main plot title.

Details

Produces a plot of the study site, nodes and edges with the prioritization order.

Value

This function plots the spatial graph.

Author(s)

Frederico Mestre, Fernando Ascensao and A. Marcia Barbosa

See Also

node.creation, edge.creation, prioritize, road_P

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
data(road_P)

#Obtaining nodes
out1 <- node.creation(land_polyg = road_P, value_col = "forest_sum", 
scale_nodes = 10, col_nodes = "pink", cex_labels = 1)

#Obtaining edges
out2 <- edge.creation(nodes = out1, land_polyg = road_P, 
min_length = 0, min_pol_area = 0)

#Prioritize
out3 <- prioritize(nodes = out1, edges = out2, method = "value")

#Plotting results
plotgraph(nodes = out1, edges = out3, land_polyg = road_P, main = "Habitat value")

gDefrag documentation built on Sept. 3, 2020, 1:07 a.m.