How to plot dendrograms with large datasets?

后端 未结 2 1321
渐次进展
渐次进展 2021-01-30 11:45

I am using ape (Analysis of Phylogenetics and Evolution) package in R that has dendrogram drawing functionality. I use following commands to read the data in Newick format, and

2条回答
  •  庸人自扰
    2021-01-30 12:11

    The cut function described in the other answer is a very good solution; if you would like to maintain the whole tree on one page for some interactive investigation you could also plot to a large page on a PDF.

    The resulting PDF is vectorized so you can zoom in closely with your favourite PDF viewer without loss of resolution.

    Here's an example of how to direct plot output to PDF:

    # Open a PDF for plotting; units are inches by default
    pdf("/path/to/a/pdf/file.pdf", width=40, height=15)
    
    # Do some plotting
    plot(gcPhylo)
    
    # Close the PDF file's associated graphics device (necessary to finalize the output)
    dev.off()
    

提交回复
热议问题