With ggtree (Yu et al. 2017), it is very easy to create phylomoji. Emoji is internally supported by ggtree.
library(ggtree) tree_text <- "(((((cow, (whale, dolphin)), (pig2, boar)), camel), fish), seedling);" x <- read.tree(text=tree_text) ggtree(x, linetype="dashed", color='firebrick') + xlim(NA, 7) + ylim(NA, 8.5) + geom_tiplab(aes(color=label), parse='emoji', size=14, vjust=0.25) + labs(title="phylomoji", caption="powered by ggtree + emojifont")
emojifont is available in CRAN, you can use the following command to install it.
An example of using emoji font in R plot is showed below:
I have played with emoji in
R for a while. My solution of using it is different from what implemented in emoGG.
emoGG is a good attemp to add
ggplot2. It render
emoji picture (png) and creat a layer,
geom_emoji, to add emoji.
In my opinion,
emoji should be treated as ordinary font in user interface, albeit it maynot be true internally.
It would be more flexible if we can use emoji as ordinary font and in this way user don’t need to learn extra stuff.