ggtree tip label position and depth

22 views
Skip to first unread message

Roope

unread,
Apr 9, 2024, 8:12:16 AMApr 9
to ggtree
Hi,

First of all, thanks for developing such a great package. It's been extremely helpful for my work. 

But to the point:

I have previously used ggtree to make a circular phylogram.

Back then, the tip labels (with geom_tiplab2) would appear as below, with some tip labels on the outer layer and others deeper within the circular plot:

example.png

This was very useful for my purpose.

Today, I was using the exact same code as before (I'm quite sure about this). But I have since updated R and ggtree. However, now, all tip labels are appearing on the outermost layer of the circular tree. The branches all reach to the outermost layer. So it appears like this, with all tip labels aligned around the outermost circle:

example2.png

I don't know what is causing this. I'd like for the tip labels to sit closer to their branches again.

If I change layout to rectangular, I can make it happen (note how not all labels sit on the rightmost side):

example3.png

But I'd very much like the tree to be circular.

Here's the code I've used:

###
tree <- ggtree(ca, layout = "circular", color = "slategray4", alpha = 0.7, size = 0.5) +
  geom_tiplab(size = 1) +
  geom_rootpoint(color = "slategrey", size = 1) +
  geom_rootedge(rootedge = 0.6, size = 0)
###

Any ideas? Thank you!
Reply all
Reply to author
Forward
0 new messages