R/plot.R
plot_avg_state_diff_graph_vis.Rd
This function uses the visNetwork
package to plot a
network of nodes. The nodes are positioned by default in a hierarchical layout
and their colors are derived using the diff
values and the
get_node_colors
function. The color of each node indicates how
much more inhibited or active that node is, when comparing the average model
classified in the 'good' category vs the average 'bad' one.
plot_avg_state_diff_graph_vis(net, diff, nodes.size = 20, title)
net | igraph graph object (to be translated to a |
---|---|
diff | numeric vector. Every value must be in the [-1,1] interval and
represents the average activity difference of each node. The node names have
to be specified in the names attribute of the given vector. For example,
|
nodes.size | an integer specifying the size of the nodes. Default value: 20. |
title | string. The title of the |
Other network plotting functions:
plot_avg_link_operator_diff_graphs()
,
plot_avg_link_operator_diff_graph()
,
plot_avg_state_diff_graphs()
,
plot_avg_state_diff_graph()
topology.file = system.file("extdata", "example.sif", package = "emba", mustWork = TRUE) net = construct_network(topology.file) diff = c(-0.95,-0.05,0.46,0.39,-0.04,0.72,-0.12,-0.51,-0.86,-0.80) names(diff) = c("A","C","B","D","W","I","E","J","F","K") plot_avg_state_diff_graph_vis(net, diff, title = "TEST")