View source: R/plot_charinet.R
plot_charinet | R Documentation |
Create a quick visualisation of the aggregated character interaction network.
plot_charinet(
adjacency = NULL,
char_names = NULL,
degree = NULL,
cutoff = NULL,
drop_isolates = TRUE,
node_fill = "#eb4034",
parallel_edges = FALSE,
title = ""
)
adjacency |
The adjacency matrix based on a given character interaction network event list. |
char_names |
A vector of character names, arranged in order of the
character IDs. If not supplied, names will be inferred from the rownames of
|
degree |
A vector of numeric values containing information on the degree/activity of nodes. This will be used to scale the size of the nodes in the network diagram. |
cutoff |
A numeric value to be used to filter the visualisation to only
include those characters whose |
drop_isolates |
Logical. If TRUE, nodes with no ties to other nodes will not be included in the graph. |
node_fill |
A character string providing the colour to be used to fill the nodes. |
parallel_edges |
Logical. If TRUE, directed edges will be drawn as two separate parallel arrows. If FALSE, a single double-sided arrow will be drawn. |
title |
An optional character string which can be used to add a title to the visualisation. |
A ggplot2 plot.
tfa <- movienetdata::starwars_tfa
## Not run:
# Plot the network, dropping characters who don't speak more than 3 lines
plot_charinet(adjacency = tfa$adjacency,
char_names = tfa$nodelist$char_name,
degree = tfa$nodelist$nlines,
cutoff = 3,
title = "Dialogue interactions in Star Wars: The Force Awakens")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.