Closed xiangpin closed 2 years ago
roundrect
ellipse
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
label of tiplab was mapped to other variable (not label) and as_ylab is TRUE.
label
tiplab
as_ylab
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)
roundrect
andellipse
layout supportingcoord_flip
.label
oftiplab
was mapped to other variable (not label) andas_ylab
is TRUE.related issue #522