Get heatmap positions on the graphics device

htPositionsOnDevice(ht_list = get_last_ht(), unit = "inch", valueOnly = FALSE,
    include_annotation = FALSE, calibrate = TRUE)

Arguments

ht_list

A HeatmapList-class object returned by draw,Heatmap-method or draw,HeatmapList-method. If it is omitted, it uses the last generated heatmap.

unit

The unit.

valueOnly

Whether only return the numeric values.

include_annotation

Internally used.

calibrate

Internally used.

Details

ht_list must have been already updated by draw() function. The function needs to be executed under a graphics device where the heatmap is written.

Value

It returns a DataFrame object of the position of every heatmap slice.

Examples

if(dev.interactive()) {
    m = matrix(rnorm(100), 10)
    ht = Heatmap(m, row_km = 2, column_km = 2)
    ht = draw(ht)
    pos = htPositionsOnDevice(ht)

    InteractiveComplexHeatmap:::redraw_ht_vp(pos)
}