Right way to do a 4 value per cell heatmap #823
Unanswered
BenoitFiset
asked this question in
Q&A
Replies: 3 comments
|
Are you using the general For 3D heatmap, the 3D functionality was implemented only for fun and I am not planning to support it with more features. |
0 replies
|
Hi, I was using Heatmap(). So what you are writing is that I can make 4 different squares with 4 different data points in one cell of the heatmap() with cell_fun / alter_fun ? |
0 replies
|
I can give you an example here: m = matrix(rnorm(100), 10)
Heatmap(m, layer_fun = function(j, i, x, y, w, h, f) {
grid.rect(x, y, width = w*0.5, height = h*0.5, just = c("left", "bottom"))
grid.rect(x, y, width = w*0.5, height = h*0.5, just = c("left", "top"))
grid.rect(x, y, width = w*0.5, height = h*0.5, just = c("right", "bottom"))
grid.rect(x, y, width = w*0.5, height = h*0.5, just = c("right", "top"))
grid.text("1", x = x - w*0.25, y = y - h*0.25)
grid.text("2", x = x - w*0.25, y = y + h*0.25)
grid.text("3", x = x + w*0.25, y = y - h*0.25)
grid.text("4", x = x + w*0.25, y = y + h*0.25)
}) |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Uh oh!
There was an error while loading. Please reload this page.
Hi,
Trying to figure out a right way with the package to create a heatmap that each cell has 4 different colour coded values. The values come from 4 different matrices.
Something like this - which would be the first 2 cells (each 4x4 is 1 cell) of a heatmap (Copy this multiple rows and columns in your mind to make the whole heatmap)

M1-M2-M3-M4 = are the colour codes values from the 4 different matrices
The 1-2 are the values in the position of the matrices: 1 would be [1,1] and 2 would be [1,2] and so on...
I was wondering if there is a function in the package to cut up a cell in 4 values or I would just "statically" create row by row and column by column and use row_split/column_split to make my own slices ? Or there is a way to use functions to modify OncoPrint to do this ?
Moving up a notch, with 3D heatmap function, would it be possible to do a 3D stacked chart plot like superposing differently coloured blocks at each cell position ? (I know people usually don't like 3D plots... but just asking :) )
Thanks for suggestions.
All reactions