plot a graph of co-occurrence of terms, as returned by `get_cooc_entities()`. The function uses ggraph, so some color options can not work as expected due to some package incompatibilities. The plot_pos_graph is based in ggraph, that is based on ggplot2. That means that is possible to customize the graph with ggplot2 functions, like `labs()`.
Usage
plot_pos_graph(
pos_list,
n_head = 30,
edge_color = "lightblue",
edge_alpha = 0.1,
edge_norm = TRUE,
font_size = 2,
font_color = "black",
point_fill = "firebrick4",
point_alpha = 0.3,
point_color = "firebrick4",
graph_layout = "graphopt"
)Arguments
- pos_list
a list of POS, as returned by `get_cooc_entities()`
- n_head
maximum number of edges to show. The freq column must be ordered. Default 30, but values near 150 maybe can be a better fit.
- edge_color
color of the edges
- edge_alpha
transparency of the edges. Values between 0 and 1.
- edge_norm
edge normalization if TRUE (default), normalize the result, turning column into values between 0 and 10.
- font_size
integer. font size of the nodes. Values between 1 and 2.
- font_color
color of the nodes.
- point_fill
color of the nodes
- point_alpha
transparency of the nodes
- point_color
color of the nodes
- graph_layout
layout of the graph