Description Usage Arguments Details Value
plot_semnet is a wrapper for the plot.igraph() function optimized for plotting a network with vertex labels.
1 2 3 4 | plot_semnet(g, weight_attr = "weight", minweight = NA,
vertexsize_attr = "freq", vertexcolor_attr = NA, labelsize_coef = 1,
labeldist_coef = 1.5, reduce_labeloverlap = T, redo_layout = F,
return_graph = T, layout = layout_with_fr, ...)
|
g |
A network in the igraph format. Specifically designed for the output of coOccurenceNetwork() and windowedCoOccurenceNetwork() |
vertexsize_attr |
a character string indicating a vertex attribute that represents size. Default is 'freq', which is created in the coOccurenceNetwork functions to indicate the number of times a word occured. |
vertexcolor_attr |
a character string indicating a vertex attribute that represents color. The attribute can also be a numeric value (e.g., a cluster membership) in which case colors are assigned to numbers. |
labelsize_coef |
a coefficient for increasing or decreasing the size of the vertexlabel. |
labeldist_coef |
a coefficient that roughly determines the minimal distance between vertex labels, based on the size of labels. Only used if reduce_labeloverlap is TRUE. |
reduce_labeloverlap |
if TRUE, an algorithm is used to reduce overlap as best as possible. |
redo_layout |
If TRUE, a new layout will be calculated using layout_with_fr(). If g does not have a layout attribute (g$layout), a new layout is automatically calculated. |
return_graph |
if TRUE, plot_semnet() also returns the graph object with the attributes and layout as shown in the plot. |
... |
additional arguments are passed on to plot.igraph() |
Before plotting the network, the setNetworkAttributes() function is used to set pretty defaults for plotting. Optionally, reduce_labeloverlap can be used to prevent labeloverlap (as much as possible).
Plots a network, and returns the network object if return_graph is TRUE.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.