Entering edit mode
3.8 years ago
luzglongoria
▴
50
Hi there,
I am creating a tree with ggtree and the only thing I am not able to do is to modify some tiplabs (only some! ) in the tree. This is my command:
tree = read.tree(text = "XXXXX;")
p <- ggtree(tree)
## create a data frame that contains the taxa name and the country:
dd <- data.frame(taxa = c("y","z","d"),
Location = c(rep("here", 2), rep("there", 1)))
row.names(dd) <- NULL
print(dd)
### do the tree (use dev.off())
p <- p %<+% dd + geom_tippoint(aes(color=Location),size=6)
p+theme(legend.position="right")+
scale_color_brewer("Location", palette="Dark2")+
geom_tiplab(size=3.5,hjust =-0.1)+
xlim(NA, 0.15)
I have read that with "geom_tiplab" is posible to change the style of the text but for the whole tree and I don't want that.
Any idea?
Thank you so much
Were you able to figure this out? I'm looking for an answer to this as well, but to change hjust position for a subset of taxa/tip labels. Please let me know if you figured this out.