Hi, I would like to be able to use all functionalities of ggtree with plotly. In particular, I would like to pass labels to the trees.
Here is the message I received while trying to add labels:
## Warning in geom2trace.default(dots[[1L]][[1L]], dots[[2L]][[1L]], dots[[3L]][[1L]]): geom_GeomTextGGtree() has yet to be implemented in plotly.
## If you'd like to see this geom implemented,
## Please open an issue with your example code at
## https://github.com/ropensci/plotly/issues
Thanks
Thanks, what package is this from?
Hi, the package was ggtree.
A minimum example reads like this
# create a tree object with package ape
tree <- ape::rtree(n = 20)
# draw a tree with ggtree package; works fine
p <- ggtree::ggtree(tree) + ggtree::geom_text2(aes(subset=!isTip, label=node), hjust=-.3) + ggtree::geom_tiplab()
# try to plot this interactively with plotly: throws above warning/error
plotly::ggplotly(p)
# it works fine however if I omit plotting the node labels in the tree
p2 <- ggtree(tree)
plotly::ggplotly(p2)
Thanks
Added to #566
Most helpful comment
Added to #566