flows (version 1.1.1)

plotDomFlows: Dominant Flows Graph

Description

This function plots a dominant flows graph.

Usage

plotDomFlows(mat, legend.flows.pos = "topright", legend.flows.title = "Flows Intensity", legend.nodes.pos = "bottomright", legend.node.txt = c("Dominant", "Intermediary", "Dominated", "Size proportional\nto sum of inflows"), labels = FALSE)

Arguments

mat
A square matrix of dominant flows (see domflows).
legend.flows.pos
Position of the flows legend, one of "topleft", "top", "topright", "left", "right", "bottomleft", "bottom", "bottomright".
legend.flows.title
Title of the flows legend.
legend.nodes.pos
Position of the nodes legend, one of "topleft", "top", "topright", "left", "right", "bottomleft", "bottom", "bottomright".
legend.node.txt
Text of the nodes legend.
labels
A boolean, if TRUE, labels of dominant and intermediary nodes are plotted.

See Also

domflows, plotMapDomFlows

Examples

Run this code
# Import data
data(nav)
myflows <- prepflows(mat = nav, i = "i", j = "j", fij = "fij")

# Remove the matrix diagonal
diag(myflows) <- 0

# Select the dominant flows (incoming flows criterion)
flowSel1 <- domflows(mat = myflows, w = colSums(myflows), k = 1)
# Select the first flows
flowSel2 <- firstflows(mat = myflows, method = "nfirst", ties.method = "first",
                       k = 1)

# Combine selections
flowSel <- myflows * flowSel1 * flowSel2

# Plot dominant flows graph
plotDomFlows(mat = flowSel, legend.flows.title = "Nb. of commuters")

Run the code above in your browser using DataCamp Workspace