SFUStatgen / LDheatmap

15 stars 8 forks source link

heatmap printed LD measurements on each cell -- too small to read #9

Closed mpage21 closed 1 year ago

mpage21 commented 1 year ago

Hello @mcneney,

Thank you for your work on this tool. I wanted to add the LD measurements to the cells, but they are currently too small to read (see attached picture). Is there a way to increase the text size? Here is the R command that I ran to generate the image.

LDheatmap(test_matrix, color = rgb.palette(18), text=TRUE)

Screenshot 2023-03-06 105815

mpage21 commented 1 year ago

Additionally, it seems that when I use the flip = TRUE param, the numbers don't display correctly (they aren't level)

mcneney commented 1 year ago

Hi, thanks for your interest in LDheatmap. You need to edit the grob that holds the text. Try something like

LDheatmap(test_matrix, color = rgb.palette(18), text=TRUE,name="myld") # name LDheatmap grop "myld"
grid::grid.edit(gPath("myld","heatMap","heatmaptext"),gp=gpar(cex=1.5))

The text orientation when the heatmap is flipped was the easiest to implement. At some point we'll revamp the flipped heatmap code and will take your comment into account.

Brad

mpage21 commented 1 year ago

Thank you for this, I was able to increase the text size.