heatmap_network: Plot heatmap representation of a network

Description Usage Arguments Value Examples

View source: R/plotting.R

Description

This function plots the given network as a heatmap to visualize its connections. If the network is weighted, then the heatmap will use greyscale colors to represent connection strengths; black squares correspond to the strongest connections, while lighter color squares are weaker connections.

Usage

1
2
3
4
5
6
heatmap_network(
  network,
  main = NULL,
  col = colorRampPalette(gray.colors(8, 0.1, 1))(50),
  ...
)

Arguments

network

Either a network object or association matrix of the network.

main

A string containing the title for the graph.

col

Color palatte used for heatmap. See link[stats]{heatmap} for details.

...

Additional arguments passed to link[stats]{heatmap}.

Value

The matrix used to create the heatmap.

Examples

1
2
3
4
5
6
set.seed(12345)
nw <- random_network(10)
nw <- set_node_names(nw, paste("node", 1:10, sep = "_"))
heatmap_network(nw, "Unweighted Network")
nw <- gen_partial_correlations(nw)
heatmap_network(nw, "Weighted Network")

SeqNet documentation built on July 9, 2021, 9:08 a.m.