gg_heat_dend: Heatmap with dendrograms with ggplot2

View source: R/mt_extra_1.R

gg_heat_dendR Documentation

Heatmap with dendrograms with ggplot2

Description

Plot heatmap of a data matrix using ggplot2. This function is modified from https://bit.ly/2UUnY2L.

Usage

gg_heat_dend(
  mat,
  row.dend = T,
  col.dend = T,
  row.dend.right = TRUE,
  colors = c("red", "white", "blue"),
  font.size = 10,
  x.rot = 60,
  legend.title = "value",
  dist.method = "euclidean",
  clust.method = "complete",
  dend.line.size = 0.5
)

Arguments

mat

a data mstrix to be plotted.

row.dend

plot row dendrogram or not.

col.dend

plot column dendrogram ot not.

row.dend.right

a logical value to indicate the position of row dendrogram.

colors

a vector of colours for heatmap.

font.size

label font size.

x.rot

plot rotate degree.

legend.title

legend title.

dist.method

distance method.

clust.method

cluster method.

dend.line.size

dendrogram line size.

Value

an object of class ggplot2.

Examples

gg_heat_dend(mtcars)

wanchanglin/mtExtra documentation built on Aug. 2, 2024, 5:47 p.m.