Reputation: 123
I'm trying to place a phylogeny at the middle of a composite plot. I however fail to find the proper setting for this, as either the names on top&bottom, or the names on left and right are cut.
The only solution I found is reducing cex (size of taxa name), but then it looks really silly, because the taxa names are minute.
Simple reproducible example:
library(ape)
par(fig=c(0.25, 0.75, 0.25,0.75))
data(bird.orders)
plot(bird.orders, type = "fan", use.edge.length = T)
Any ideas how to solve this? It would be ideal if I could scale down the branch length part of the plot in comparison to taxa name.
Upvotes: 1
Views: 194
Reputation: 4077
The xpd
graphical parameter allows text to plot outside a clipping area. Try par(xpd = NA)
:
library(ape)
par(fig=c(0.25, 0.75, 0.25,0.75), xpd = NA)
data(bird.orders)
plot(bird.orders, type = "fan", use.edge.length = T)
You can change the ratio of text size to edge lengths using the cex
parameter and enlarging the fig
area, as you allude to you your question.
Upvotes: 1