Skip to content

Conversation

xiangpin
Copy link
Member

  • roundrect and ellipse layout supporting coord_flip.
library(ggtree) set.seed(123) tr <- rtree(10) ggtree(tr, layout = 'round') + layout_dendrogram() -> p1 ggtree(tr, layout = 'ellipse') + layout_dendrogram() -> p2 p1 + p2 

xx

  • label of tiplab was mapped to other variable (not label) and as_ylab is TRUE.

related issue #522

library(ggtree) tr <- read.tree(text = "((a,(b,c)),d);") genus <- c("Gorilla", "Pan", "Homo", "Pongo") species <- c("gorilla", "spp.", "sapiens", "pygmaeus") geo <- c("Africa", "Africa", "World", "Asia") d <- data.frame(label = tr$tip.label, genus = genus, species = species, geo = geo) plot1 <- ggtree(tr) + geom_tiplab() + xlim(NA, 5) plot2 <- ggtree(tr) %<+% d + geom_tiplab(aes(label=genus)) + xlim(NA, 5) plot3 <- ggtree(tr) %<+% d + geom_tiplab(aes(label=genus), as_ylab = TRUE) + xlim(NA, 5) 

xx

@GuangchuangYu GuangchuangYu merged commit 9626156 into YuLab-SMU:master Aug 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants