Question: how to arrange multiple TOMplot() and plotDendroAndColors() in one page
gravatar for kingwind333
12 months ago by
kingwind3330 wrote:

In WGCNA, I got several TOM and dendroandcolor plots via the TOMplot() and plotDendroAndColors(). I want to arrange them in one page in a pdf file which gets the sagitta vector graph.

p1 = TOMplot(plotDisscons, selectdissTreecons,selectdissColorscons)
p2 = plotDendroAndColors(net$dendrograms[[1]], mergedColors[net$blockGenes[[1]]], "Module colors", setLayout = T, dendroLabels = FALSE, hang = 0.03, addGuide = TRUE, guideHang = 0.05)
layoutMatrix = matrix(c(1,2),byrow = FALSE)
multiplot(p1, p2, layout = layoutMatrix)

Then the returned result is not a combined figure, but the value of p1 and p2. enter image description here p1 and p2 are not figures either, but the lists, list of 4, or list of 1...enter image description here

I found WGCNA functions TOMplot() and plotDendroAndColors() could not be used in the same way as ggplot2 functions, such as p1 = ggplot(), p2 = barchart()...... because class() p1 or p2 here you got the type 'gg' 'ggplot'.

Then, could you please tell me how to combine the figures, which are results of TOMplot() and plotDendroAndColors(), into one page of pdf. Thanks´╝ü

ADD COMMENTlink modified 12 months ago by Biostar ♦♦ 20 • written 12 months ago by kingwind3330

I am not sure, but take a look at the setLayout parameter that can be passed to both TOMplot() and plotDendroAndColors(). If all else fails, just save them to disk as PDFs and then bind them together via, e.g., PDF-Shuffler or Adobe, or something else.

ADD REPLYlink written 12 months ago by Kevin Blighe71k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1647 users visited in the last hour