This function creates several plotting regions (boxes) which corresponds to each row/column of a Heatmap. While anno_zoom and anno_link are primarily designed to add ggplot2 objects to slices (row_split, column_split, km etc), adding them to each row/column is possible but tedious, and the annotation cannot be decorated if sliced. This function is designed to function similarly to them, with the same parameters, but with a focus on adding the objects, especially ggplot2 objects, to each row/column instead of slices, and to be decorated and sliced just like any other annotation.
Arguments
- panel_fun
Function. (from
anno_zoomdocumentation) A self-defined function that defines how to draw graphics in the box. The function must have a index argument which is the indices for the rows/columns that the box corresponds to. It can have second argument nm which is the "name" of the selected part in the heatmap.- which
Character. (from
anno_zoomdocumentation) Whether it is a column annotation or a row annotation?- outer.border
Logical. Whether to draw border around the annotation.
- inner.border
Logical. Whether to draw border around each box.
- side
Character. (from
anno_zoomdocumentation) Side of the boxes If it is a column annotation, valid values are "top" and "bottom"; If it is a row annotation, valid values are "left" and "right".- size
Numeric or Unit. (from
anno_zoomdocumentation) The size of boxes. It can be pure numeric that they are treated as relative fractions of the total height/width of the heatmap. The value of size can also be absolute units.- gap
Unit. (from
anno_zoomdocumentation) Gaps between boxes.- width
Unit. (from
anno_zoomdocumentation) Width of the annotation. The value should be an absolute unit. Width is not allowed to be set for column annotation.- height
Unit. (from
anno_zoomdocumentation) Height of the annotation. The value should be an absolute unit. Height is not allowed to be set for row annotation.