heatmap: Visualize a connectivity matrix

Description Usage Arguments Details Author(s)

View source: R/heatmap.R

Description

Visualize a connectivity matrix

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
heatmap(
  graph,
  plot = TRUE,
  type = "static",
  save.html = FALSE,
  plot.title = "Network Heatmap",
  directory = paste0(getwd(), "/"),
  filename = "heatmap.html",
  color.scheme = viridis::viridis(500)
)

Arguments

graph

an igraph object or matrix

type

"static" (the default) creates a standard image, "html" creates an interactive image with plotly

save.html

Save the HTML file (only for type="html")

plot.title

A title for the image

directory

Where to save the HTML for a plotly image. Deaults to current working directory.

filename

What to call the html file

color.scheme

A color scheme. Defaults to viridis from the viridis package, a colorblind friendly palette.

Details

This creates a visualization of a connectivity matrix. Either a standard static image can be created or an interactive image with plotly can be created. Color palettes can be supplied that will work with either output type with packages such as viridis, colorRamps, grDevices, and RColorBrewer.

A few color palettes I recommend besides the default:

colorRamps::blue2red(500) , which is particuarly good for visualizing a contrast between positive and negative correlations

colorRamps::ygobb(500))

colorRamps::matlab.like(500)

colorRamps::matlab.like2(500)

viridis::magma(500)

viridis::plasma(500)

grDevices::grey.colors(500)

Author(s)

Brandon Vaughan

This creates a correlogram (heatmap) with plotly in html format.


abnormally-distributed/rsfcNet documentation built on March 8, 2020, 5:32 p.m.