WGCNA Labeled Heatmap
0
1
Entering edit mode
2.6 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!

enter image description here

heatmap wgcna • 2.7k views
ADD COMMENT
1
Entering edit mode

I've tried quite a few permutations of the above but nothing seems to work well

did you try increasing the margin within par(mar = c(6, 8.5, 3, 3))?

ADD REPLY
0
Entering edit mode

Hi Andres. I've had to play it around with a lot longer and also tried your suggestion, finally got it to work.

ADD REPLY
1
Entering edit mode

Use setStdMargins = TRUE in labeledHeatmap

ADD REPLY

Login before adding your answer.

Traffic: 2233 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6