View source: R/AnnotationFunction-function.R
anno_boxplot | R Documentation |
Boxplot Annotation
anno_boxplot(x, which = c("column", "row"), border = TRUE,
gp = gpar(fill = "#CCCCCC"), ylim = NULL, extend = 0.05, outline = TRUE, box_width = 0.6,
add_points = FALSE, pch = 16, size = unit(4, "pt"), pt_gp = gpar(), axis = TRUE,
axis_param = default_axis_param(which), width = NULL, height = NULL, ...)
x |
A matrix or a list. If |
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 |
outline |
Whether draw outline of boxplots? |
box_width |
Relative width of boxes. The value should be smaller than one. |
add_points |
Whether add points on top of the boxes? |
pch |
Point style. |
size |
Point size. |
pt_gp |
Graphics parameters for points. |
axis |
Whether to add axis? |
axis_param |
parameters for controlling axis. See |
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. |
An annotation function which can be used in HeatmapAnnotation
.
https://jokergoo.github.io/ComplexHeatmap-reference/book/heatmap-annotations.html#box-annotation
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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.