Re: [R-sig-phylo] Can I get coordinates from plot.phylo and not get blank page

2017-09-26 Thread Liam J. Revell
Hi Emmanuel, Rafael, & Elizabeth. Some phytools functions suffer from the precisely the same issue identified by Elizabeth as phytools::plotTree and phytools::plotSimmap also have a plot=FALSE option, & Rafael's solution seems to work. For instance, I posted an example to my blog here:

Re: [R-sig-phylo] Can I get coordinates from plot.phylo and not get blank page

2017-09-26 Thread Rafael Maia
Hi Elizabeth, I ran into a similar problem recently (with another package) and a simple solution that worked for me is to call par(new=TRUE) before your plot=TRUE plot. So something like: pdf('test.pdf') plot(tree, plot=FALSE) par(new=TRUE) plot(tree, plot=TRUE) dev.off() HTH Best,

Re: [R-sig-phylo] Can I get coordinates from plot.phylo and not get blank page

2017-09-26 Thread Emmanuel Paradis
Hi Elizabeth, You can use directly the functions behind the calculations of the coordinates; they are documented together: ?node.depth. But this will not give the final coordinates since more calculations are needed depending on the widths of the labels, etc. Another possibility could be to

[R-sig-phylo] Can I get coordinates from plot.phylo and not get blank page

2017-09-26 Thread Elizabeth Purdom
Hello, I am writing a function that calls plot.phylo in the ape package with the option plot=FALSE. I then do some calculations with the output (the calculated coordinates), and then make another call to plot.phylo with plot=TRUE. If I do this, then the plot=FALSE option creates a blank plot,