Entering edit mode
3.2 years ago
Anand
▴
40
Hi.
I'm trying to create a labelled heatmap of module trait relationships using the following code from the WGCNA tutorial:
png(filename = "Module-Trait Relationship.png", width = 20, height = 30, res=300, unit="cm")
par(mar = c(6, 8.5, 3, 3))
labeledHeatmap(Matrix = moduleTraitCor, xLabels = names(stressdatTraits), yLabels = names(MEs), ySymbols = names(MEs), colorLabels = FALSE, colors = blueWhiteRed(50), textMatrix = textMatrix, cex.text = 0.5, zlim = c(-1,1), main = paste("Module-trait relationships"))
dev.off()
And this works fine but the labels for the modules are partially cut off. I've tried quite a few permutations of the above but nothing seems to work well. It's probably a really small edit I need to make but at this stage, i can't see what it should be. Help!
did you try increasing the margin within
par(mar = c(6, 8.5, 3, 3))
?Hi Andres. I've had to play it around with a lot longer and also tried your suggestion, finally got it to work.
Use
setStdMargins = TRUE
inlabeledHeatmap