talgalili / gplots

13 stars 6 forks source link

Ability to Control xlab and ylab font size through cex.lab #16

Open compbiolover opened 1 year ago

compbiolover commented 1 year ago

Hello @talgalili,

I've been thoroughly enjoying your heatmap.2 package and it has proven indispensable for my ongoing project. It's been an invaluable tool for creating insightful heatmaps. However, I've encountered a challenge where I'm unable to adjust the font size of the xlab and ylab text. Although I've successfully generated heatmaps that I'm pleased with, the axis label text appears to be too small, impacting the overall presentation.

While researching this issue, I came across a Stack Overflow thread that touches on the inability to customize the text size of xlab and ylab (https://stackoverflow.com/questions/42251103/how-to-set-axis-label-size-in-gplots-heatmap-2#42253559). This discussion dates back to 2017.

I recently inspected the source code of heatmap.2 and confirmed the ongoing limitation regarding text size modification for xlab and ylab. Specifically, when looking at this code snippet I don’t see a way to modify the label parameters:

image(1:nc, 1:nr, x, xlim = 0.5 + c(0, nc), ylim = 0.5 + c(0, nr), axes = FALSE, xlab = "", ylab = "", col = col, breaks = breaks, ...)

Given this context, I'm curious if there might be any potential avenues to explore:

1) Is there a viable workaround that would allow me to adjust the font size of these labels, or do you recommend an alternative package that could provide similar heatmap results as heatmap.2 while offering the flexibility to modify label sizes? 2) Is there any possibility of a future update to the heatmap.2 function that could address this limitation and incorporate the ability to customize the xlab and ylab font sizes? I know you mention on the gplots documentation that you “don't plan to develop new features, but if you'll send pull requests I'm willing to review them.” I wasn’t sure if this would fall more in line of a fix then a feature but I understand either way.

I greatly appreciate your insights and suggestions. Your work has been immensely helpful, and any guidance you can offer would be tremendously valuable. Thank you!