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
heatmap_network(network, main = NULL,
  col = colorRampPalette(RColorBrewer::brewer.pal(8, "Greys"))(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 ?heatmap for details.

...

Additional arguments passed to '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")

tgrimes/SeqNet documentation built on Sept. 1, 2020, 7:50 a.m.