Skip to content

Instantly share code, notes, and snippets.

@ghuertaramos
Last active October 23, 2023 00:22
Show Gist options
  • Star 11 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save ghuertaramos/c1ee9ca6efd5841190339720939b7ab0 to your computer and use it in GitHub Desktop.
Save ghuertaramos/c1ee9ca6efd5841190339720939b7ab0 to your computer and use it in GitHub Desktop.
Script to make a plant phylogeny using emojis
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")
@ghuertaramos
Copy link
Author

The complete parenthetical phylogeny is :
(🌲(πŸ₯‘((🌷( 🌴( 🍌( 🍍( 🌽( πŸŽ‹πŸŒΎ))))))((πŸ‡(((πŸ₯œβ˜˜οΈ)(((πŸŒΉπŸ“)((🍎🍐)(πŸ‘πŸŒΈ)))(🌰(πŸ‰(πŸ₯’πŸˆ)))))(🌺πŸ₯¦((πŸŠπŸ‹)(🍁πŸ₯­)))))(🌡(πŸ₯((🍠(🌢️(πŸ†(πŸ₯”πŸ…))))(πŸ₯•(πŸ₯¬(🌻🌼))))))))))

@ghuertaramos
Copy link
Author

ghuertaramos commented Oct 12, 2019

Code is modified from the original at Phylomoji with ggtree by Guangchuang Yu

@ghuertaramos
Copy link
Author

PlantPhylomoji now includes πŸ’ and πŸŽƒ

@ghuertaramos
Copy link
Author

ghuertaramos commented Oct 14, 2019

Plant Phylomoji is now on development at Plant Phylomoji GitHub Repo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment