frequencyHeatmap: Visualize Frequency Distribution by Heatmap

View source: R/densityHeatmap.R

frequencyHeatmapR Documentation

Visualize Frequency Distribution by Heatmap

Description

Visualize Frequency Distribution by Heatmap

Usage

frequencyHeatmap(data,
    breaks = "Sturges",
    stat = c("count", "density", "proportion"),
    
    col = brewer.pal(9, "Blues"),
    color_space = "LAB",
    ylab = deparse(substitute(data)),
    column_title = paste0("Frequency heatmap of ", deparse(substitute(data))),
    title = column_title,
    ylim = NULL,
    range = ylim,
    
    title_gp = gpar(fontsize = 14),
    ylab_gp = gpar(fontsize = 12),
    tick_label_gp = gpar(fontsize = 10),
    
    column_order = NULL,
    column_names_side = "bottom",
    show_column_names = TRUE,
    column_names_max_height = unit(6, "cm"),
    column_names_gp = gpar(fontsize = 12),
    column_names_rot = 90,
    cluster_columns = FALSE,
    
    use_3d = FALSE,
    ...)

Arguments

data

A matrix or a list. If it is a matrix, density is calculated by columns.

breaks

Pass to hist. Please only set equal bin size.

stat

Statistic to use.

col

A vector of colors that density values are mapped to.

color_space

The color space in which colors are interpolated. Pass to colorRamp2.

ylab

Label on y-axis.

column_title

Title of the heatmap.

title

Same as column_title.

ylim

Ranges on the y-axis.

range

Same as ylim.

title_gp

Graphic parameters for title.

ylab_gp

Graphic parameters for y-labels.

tick_label_gp

Graphic parameters for y-ticks.

column_order

Order of columns.

column_names_side

Pass to Heatmap.

show_column_names

Pass to Heatmap.

column_names_max_height

Pass to Heatmap.

column_names_gp

Pass to Heatmap.

column_names_rot

Pass to Heatmap.

cluster_columns

Whether cluster columns?

use_3d

Whether to visualize the frequencies as a 3D heatmap with Heatmap3D?

...

Pass to Heatmap or Heatmap3D (if use_3d = TRUE).

Value

A Heatmap-class object. It can oly add other heatmaps/annotations vertically.

Author(s)

Zuguang Gu <z.gu@dkfz.de>

Examples

matrix = matrix(rnorm(100), 10); colnames(matrix) = letters[1:10]
frequencyHeatmap(matrix)
frequencyHeatmap(matrix, use_3d = TRUE)

jokergoo/ComplexHeatmap documentation built on Nov. 17, 2023, 11:27 a.m.