Last active
October 23, 2023 00:22
-
-
Save ghuertaramos/c1ee9ca6efd5841190339720939b7ab0 to your computer and use it in GitHub Desktop.
Script to make a plant phylogeny using emojis
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(ggplot2) | |
library(ggtree) | |
library(emojifont) | |
tree_text <- "(evergreen_tree,(avocado,((tulip, ( palm_tree, ( banana, ( pineapple, (corn, ( tanabata_tree, ear_of_rice )))))),((grapes, (((peanuts, shamrock), ((( rose, strawberry ), ((apple, pear ), ( peach, (cherry_blossom, cherries) ))), (chestnut, (jack_o_lantern, (watermelon, (cucumber, melon)))))), (hibiscus, (( tangerine, lemon ), (maple_leaf))))),(cactus, (kiwi_fruit, ((sweet_potato, (hot_pepper, (eggplant, (potato, tomato)))), (carrot,(sunflower, blossom)))))))));" | |
x <- read.tree(text=tree_text) | |
ggtree(x, layout="circular") + | |
xlim(NA, 13) + ylim(NA, 39) + | |
geom_tiplab(aes(color=label), parse='emoji', size=6, vjust=0.5, hjust = 0.5, offset = 0.6) + | |
labs(title="plant phylomoji", caption="powered by ggtree + emojifont") | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Plant Phylomoji is now on development at Plant Phylomoji GitHub Repo