plot_nodal_flows | R Documentation |
This function plots a dominant flows graph.
plot_nodal_flows(
mat,
leg_pos_flows = "topright",
leg_flow = "Flows Intensity",
leg_pos_node = "bottomright",
leg_node = c("Dominant", "Intermediary", "Dominated",
"Size proportional\nto sum of inflows"),
labels = FALSE
)
mat |
A square matrix of dominant flows (see nodal_flows). |
leg_pos_flows |
Position of the flows legend, one of "topleft", "top", "topright", "left", "right", "bottomleft", "bottom", "bottomright". |
leg_flow |
Title of the flows legend. |
leg_pos_node |
Position of the nodes legend, one of "topleft", "top", "topright", "left", "right", "bottomleft", "bottom", "bottomright". |
leg_node |
Text of the nodes legend. |
labels |
A boolean, if TRUE, labels of dominant and intermediary nodes are plotted. |
This function uses the Davidson Harel algorithm from igraph.
As square matrices can easily be plotted with plot.igraph or gplot functions from igraph and sna packages, we do not propose visualisation for other outputs.
nav <- read.csv(system.file("csv/nav.csv", package = "flows"))
mat <- prepare_mat(x = nav, i = "i", j = "j", fij = "fij")
res <- nodal_flows(mat)
# Plot dominant flows graph
plot_nodal_flows(mat = res)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.