decorate_dend(heatmap, code, slice = 1, which = c("column", "row"))
Arguments
heatmap
name of the heatmap
code
code that adds graphics in the selected heatmap body
slice
index of row slices in the heatmap
which
on rows or on columns?
Value
This function returns no value.
Details
There is a viewport for each dendrogram in the heatmap.
This function contructs the name of the viewport,
goes to the viewport by seekViewport and applies code
to that viewport.
If you know the number of leaves in the dendrogram, it is
simple to calculate the position of every leave in the dendrogram.
E.g., for the column dendrogram, the i^th leave is located at:
# assume nc is the number of columns
unit((i-0.5)/nc, "npc")