plot_graph: Plots graphs containing thresholded communties

Description Usage Arguments See Also Examples

View source: R/PlotBCR.R

Description

plot_graph transforms a graph into an internal representation to abstract unnecessary noise away and highlight important communities detected. You can adjust the behaviour by applying different arguments to the parameters.

Usage

1
2
3
4
plot_graph(weighted_graph, edge_threshold = 4, community_threshold = 1,
  vertex_size = 10, vertex_color = "grey", edge_width = 1,
  edge_color = "darkgrey", community_algorithm = cluster_louvain,
  layout_algorithm = "layout_nicely", dynamic = TRUE)

Arguments

weighted_graph

The base graph. Will be used as a base for the layout of the final graph.

edge_threshold

All edges lower than this are removed from the final graph.

community_threshold

Only communities with higher vertex count than this are highlighted.

vertex_size

Controls size of vertices.

vertex_color

Controls color of vertices.

edge_width

Controls width of edges.

edge_color

Controls color of edges.

community_algorithm

which algorithm is used to calculate the communities

layout_algorithm

which algorithm is used to calculate the layout of the graph

dynamic

Logical Type. Determines if the plot is rendered dynamically via JS or static as a SVG

See Also

igraph

visNetwork

communities

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
require(igraph)
plot_graph(igraph::graph(edges=c(1,2), n=3, directed=FALSE))

## Not run: 
library(igraphdata)
data("karate")
 
plot_graph(karate)

## End(Not run)

snaketron/BcellNet documentation built on May 30, 2019, 5:04 a.m.