When making an unrooted tree and flipping it using e.g. coord_flip() or visualized using ggplotify::as.ggplot(angle=-30, scale=.9) the angle of the labels aren't following the flip, but keeps the original angle. Is there a way to make the angles follow the flipped tree?
Code I'm using for visualization:
nosZ_comb_muscle_unrooted_daylight <- ggtree(nosZ_muscle, layout = "daylight")
When making an unrooted tree and flipping it using e.g. coord_flip() or visualized using ggplotify::as.ggplot(angle=-30, scale=.9) the angle of the labels aren't following the flip, but keeps the original angle. Is there a way to make the angles follow the flipped tree?
Code I'm using for visualization: nosZ_comb_muscle_unrooted_daylight <- ggtree(nosZ_muscle, layout = "daylight")
nosZ_comb_muscle_unrooted_daylight_label <- nosZ_comb_muscle_unrooted_daylight%<+%nosZ_tax + geom_tiplab(aes(label=Phylum, angle=angle), size = 2) + geom_cladelab(node=857, label="Acidobacteriota", textcolor='black', fontsize=2.5, barsize=NA, offset = -0.15, angle = "auto") + geom_cladelab(node=851, label="Spirochaetota", textcolor='black', fontsize=2.5, barsize=NA, offset = 0.0, angle = "auto") + ... other nodes
nosZ_comb_muscle_unrooted_daylight_col <- collapse(nosZ_comb_muscle_unrooted_daylight_label, node = 857, 'mixed', fill="grey", alpha= 0.6) %>% collapse(851, 'mixed', fill="grey", alpha= 0.6) %>% collapse(545, 'mixed', fill="grey", alpha= 0.6) %>% ... remaining nodes
a <- nosZ_comb_muscle_unrooted_daylight_col b <- nosZ_comb_muscle_unrooted_daylight_col + coord_flip()
grid.arrange(a, b)![image](https://user-images.githubusercontent.com/87179897/185895766-67f032f7-d404-45e5-8ed9-95ea719eebc3.png)