ropensci / iheatmapr

Complex, interactive heatmaps in R
https://docs.ropensci.org/iheatmapr
Other
267 stars 35 forks source link

Single row heatmap does not show #78

Closed halhen closed 3 years ago

halhen commented 3 years ago

Version 0.4.12:

Plotting a single-row main heatmap results in an all-white plot. I -suspect- that the data is plotted, but with something like a 0-pixel height.

Reproducible example:

2 rows works as you expect

library(iheatmapr)
B <- matrix(1:6, ncol = 3)
main_heatmap(B)

image

1 row does not show

A <- matrix(1:3, ncol = 3)
main_heatmap(A)

image

Workaround /-ish: include a NA-only dummy row

A_dummy <- matrix(c(1:3, NA, NA, NA), ncol = 3, byrow = TRUE)
main_heatmap(A_dummy)

image

Workaround /-ish 2: duplicate the single row

A2 <- rbind(A, A)
main_heatmap(A2)

image

AliciaSchep commented 3 years ago

This issue should be fixed in version 0.5.0 and above. (I am not able to reproduce problem with current version, and that was a bug fix incorporated into that release).

halhen commented 3 years ago

Ah, sweet. Thanks, and sorry for not checking myself. 🌷