anno_boxplot: Boxplot Annotation

Description Usage Arguments Value See Also Examples

View source: R/AnnotationFunction-function.R

Description

Boxplot Annotation

Usage

1
2
3
4
anno_boxplot(x, which = c("column", "row"), border = TRUE,
    gp = gpar(fill = "#CCCCCC"), ylim = NULL, extend = 0.05, outline = TRUE, box_width = 0.6,
    pch = 1, size = unit(2, "mm"), axis = TRUE, axis_param = default_axis_param(which),
    width = NULL, height = NULL, ...)

Arguments

x

A matrix or a list. If x is a matrix and if which is column, statistics for boxplots are calculated by columns, if which is row, the calculation is done by rows.

which

Whether it is a column annotation or a row annotation?

border

Wether draw borders of the annotation region?

gp

Graphic parameters for the boxes. The length of the graphic parameters should be one or the number of observations.

ylim

Data ranges.

extend

The extension to both side of ylim. The value is a percent value corresponding to ylim[2] - ylim[1].

outline

Whether draw outline of boxplots?

box_width

Relative width of boxes. The value should be smaller than one.

pch

Point style.

size

Point size.

axis

Whether to add axis?

axis_param

parameters for controlling axis. See default_axis_param for all possible settings and default parameters.

width

Width of the annotation. The value should be an absolute unit. Width is not allowed to be set for column annotation.

height

Height of the annotation. The value should be an absolute unit. Height is not allowed to be set for row annotation.

...

Other arguments.

Value

An annotation function which can be used in HeatmapAnnotation.

See Also

https://jokergoo.github.io/ComplexHeatmap-reference/book/heatmap-annotations.html#box-annotation

Examples

1
2
3
4
5
6
set.seed(123)
m = matrix(rnorm(100), 10)
anno = anno_boxplot(m, height = unit(4, "cm"))
draw(anno, test = "anno_boxplot")
anno = anno_boxplot(m, height = unit(4, "cm"), gp = gpar(fill = 1:10))
draw(anno, test = "anno_boxplot with gp")

Example output

Loading required package: grid
========================================
ComplexHeatmap version 2.6.2
Bioconductor page: http://bioconductor.org/packages/ComplexHeatmap/
Github page: https://github.com/jokergoo/ComplexHeatmap
Documentation: http://jokergoo.github.io/ComplexHeatmap-reference

If you use it in published research, please cite:
Gu, Z. Complex heatmaps reveal patterns and correlations in multidimensional 
  genomic data. Bioinformatics 2016.

This message can be suppressed by:
  suppressPackageStartupMessages(library(ComplexHeatmap))
========================================

ComplexHeatmap documentation built on Nov. 14, 2020, 2:01 a.m.