Set some default network attributes for pretty plotting
The purpose of this function is to create some default network attribute options to plot networks in a nice and insightfull way.
set_network_attributes( g, size_attribute = "freq", color_attribute = NA, redo_layout = F, edgewidth_coef = 1, layout_fun = igraph::layout_with_fr )
g |
A graph in the Igraph format. |
size_attribute |
the name of the vertex attribute to be used to set the size of nodes |
color_attribute |
the name of the attribute that is used to select the color |
redo_layout |
if TRUE, force new layout if layout already exists as a graph attribute |
edgewidth_coef |
A coefficient for changing the edge width |
layout_fun |
THe igraph layout function used |
a network in the Igraph format
tc = create_tcorpus(c('A B C', 'B C', 'B D')) g = semnet(tc, 'token') igraph::get.edge.attribute(g) igraph::get.vertex.attribute(g) plot(g) g = set_network_attributes(g, size_attribute = 'freq') igraph::get.edge.attribute(g) igraph::get.vertex.attribute(g) plot(g)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.