Closed locusclassicus closed 8 months ago
Dear @locusclassicus,
in the development version from github you can use the additional argument direction="axial"
to just do that.
Regards,
Klaus
Thank you for this function, however, there is a problem with plotting axial labels outside plot margins. Is there any easy fix?
Hi @tomas-fer, there is! You can get the x and y limits of the plot the following way:
plot(nnet, direction="axial")
lastPP <- get("last_plot.phylo", envir = .PlotPhyloEnv)
lastPP$x.lim
lastPP$y.lim
You can increase the margins using the xlim
and ylim
arguments as usual , for example:
plot(nnet, direction="axial", xlim=c(-10,10), ylim=c(-10,10))
I made some small changes recently, so you might want to try the development version.
Dear Klaus,
thank you for your answer. However, as I understand your suggestion, it requires playing with the xlim and ylim parameters, right? I am still thinking about an ‘automated’ xlim and ylim settings that would always result in correct plotting…
My solution (also not ‘automated’) was to set large plot margins and allow plotting outside margins before plot command, e.g.,
a=8 par(mar=c(a,a,a,a), xpd=T) plot(nnet, direction="axial")
Excessive white margins can be removed later (e.g., from the resulting PDF)…
Another useful function would be to allow label offset from tips (like offset in tiplabels() with trees).
Thank you for very useful functions in phangorn.
Best wishes, Tomas
Dear @tomas-fer,
I will try to get better defaults, when I have time. One can use tiplabels()
with plot.networx
already, but it needs some fiddling within ape code so that both functions understand each other better. As plot.networx
is based on plot.phylo
, but ape
does not know about plot.networx
or networx
objects.
Regards,
Klaus
First of all, thanks for the useful package! My problem is with labels which are now all horizontal, and therefore not legible. I can find to way to rotate them (see picture). Ideally they should be rotated at the same angle as the edge
This one was made with: