This is a test version of Biostars. For the public version, visit https://www.biostars.org.
how to save TOMplot into a pdf/png file

I am using WGCNA library and wonder how I can write the result of TOMplot into a file which format and function is appropriate. I have used pdf command and dev.off() but the resulting file was empty.

r wgcna

can you post the chunk of code used to export the TOMplot as pdf file?

Hi,

I'm not familiar with the TOMplot() function, but based on the online description it seems to return an heatmap (see link).

Does the function TOMplot() returns a plot in R without using pdf() and dev.off()? If so, then the problem seems related with the way that you're saving the result. If not, then the problem is the input that you're giving to the function.

You may want to try the following:

pdf("heatmap.pdf")
print(
TOMplot() # please, give the arguments and inputs inside the TOMplot function which I don't know 
)
dev.off()

Let me know if this worked,

António

1 answer

I used png instead of pdf and increased the size of the page and worked out

Log in to answer this question.