D Comic (xkcd-like) phylogenetic tree
library(htmltools)
library(XML)
library(gridSVG)
library(ggplot2)
library(ggtree)
library(comicR)
ggtree(rtree(30), layout="circular") +
p <- geom_tiplab(aes(label=label), color="purple")
print(p)
grid.export(name="", res=100)$svg svg <-
tagList(
$div(
tagsid = "ggtree_comic",
$style("#ggtree_comic text {font-family:Comic Sans MS;}"),
tagsHTML(saveXML(svg)),
comicR("#ggtree_comic", ff=5)
)# %>% html_print )