Open janstrauss1 opened 2 years ago
I am having the same issue, were you able to solve it?
Same issue here.
I am having the same issue, were you able to solve it?
Problem apparently solved. I realized scaleClade did not work after a collapse, so I tried scaling all clades first, and then collapsing. It worked! Example where p is my tree:
p1 <- scaleClade(p, 2457, .2) %>%
scaleClade(2410, .2) %>%
scaleClade(2122, .2) %>%
ggtree::collapse(2457, 'max', fill="red") %>%
ggtree::collapse(2410, 'max', fill="red") %>%
ggtree::collapse(2122, 'max', fill="red")
p1
I am having the same issue, were you able to solve it?
Problem apparently solved. I realized scaleClade did not work after a collapse, so I tried scaling all clades first, and then collapsing. It worked! Example where p is my tree:
p1 <- scaleClade(p, 2457, .2) %>% scaleClade(2410, .2) %>% scaleClade(2122, .2) %>% ggtree::collapse(2457, 'max', fill="red") %>% ggtree::collapse(2410, 'max', fill="red") %>% ggtree::collapse(2122, 'max', fill="red") p1
Works for me! Thanks a lot!
Hi there,
I'm trying to visualize a tree with multiple selected clades being scaled (condensed) and collapsed to save space for a publication figure.
I've seen the issue also reported in the ggtree google group. I've attached a reprex below to illustrate the issue when trying to scale and collapse multiple clades.
I think https://github.com/YuLab-SMU/ggtree/issues/409 somewhat relates to this.
Any help and suggestions would be very welcome.
Many thanks in advance!
Created on 2022-09-23 with reprex v2.0.2