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:
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,
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
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,