pheatmap lengends are being cutoff
1
0
Entering edit mode
22 days ago
enh • 0

I'm trying to removed annotations for the heat map legend. Originally this what the heatmap looks like using the following code:
pheatmap(M.adj, annotation_col = conds, #dropData set border_color = NA, filename = "QC/QCheatmap.pdf", color = colorRampPalette(rev(brewer.pal(n=11, name="RdBu")))(100), cluster_cols = TRUE, show_rownames = FALSE, main=paste("Gene Expression (VST) of Top 1000 Variable Genes") )

when I drop my "dataset" colm using the following piece of code, my legends is cutoff.

pheatmap(M.adj, annotation_col = conds[2,drop=F], #dropData set border_color = NA, filename = "QC/QCheatmap.pdf", color = colorRampPalette(rev(brewer.pal(n=11, name="RdBu")))(100), cluster_cols = TRUE, show_rownames = FALSE, main=paste("Gene Expression (VST) of Top 1000 Variable Genes") )

anyone know how I can make it so that my legend is not cut off in the second heat map?

pheatmap legends rstudio heatmaps • 171 views
0
Entering edit mode
22 days ago

Hi!

You can scale the plotting text with cex. In this case the default value is cex = 1, 1.5 would correspond to 50% larger and 0.5 50% smaller. So, use different values less than 1 until you see the whole text legend.

Best regards

0
Entering edit mode

Hi rodolfo! Thank you!! I'll try what you suggested. I got around it by making the naming conventions of my conditions shorter. I'll try what you suggested and to see if I can keep the length of my conditions.

Thank you for you time:)