Is there an option to show taxa name/tip label with spaces, and possibly selectively format them?

836 views
Skip to first unread message

Migun Shakya

unread,
May 4, 2016, 10:08:43 AM5/4/16
to ggtree
Hi ,

Is there an option in ggtree to show the taxa name with spaces? I replaced underscore with spaces in tree object tip.label, but when plotted with ggtree, it didnt show tip labels. Also, is there a way to selectively format tip labels? For example, italicizing genus and species name, but not the strain name (Acetobacter pasteurianus IFO 3283-01-42C to Acetobacter pasteurianus IFO 3283-01-42C).

Thank you

gc...@connect.hku.hk

unread,
May 9, 2016, 11:45:38 PM5/9/16
to ggtree
taxa name with spaces is of course supported.

formatting label is also possible by using plotmath.

Migun Shakya

unread,
May 10, 2016, 11:56:55 AM5/10/16
to gc...@connect.hku.hk, ggtree
Great! Can the formatting works in geom_text2 with plotmath? 

This did not work:
geom_text(aes(subset=(node==508), label = italic('Acetobacter spp.')), parse=TRUE, colour="blue", hjust=-.02) 

--
You received this message because you are subscribed to a topic in the Google Groups "ggtree" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/bioc-ggtree/7371Zt8Olno/unsubscribe.
To unsubscribe from this group and all its topics, send an email to bioc-ggtree...@googlegroups.com.
To post to this group, send email to bioc-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bioc-ggtree/164d208b-2407-4784-ad2c-410aa749eb84%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Yu, Guangchuang

unread,
May 10, 2016, 12:14:53 PM5/10/16
to Migun Shakya, ggtree
should be:

geom_text2(aes(subset=(node==508)), label = "italic('Acetobacter spp.')", parse=TRUE, colour="blue", hjust=-.02)
--
--~--~---------~--~----~------------~-------~--~----~
Guangchuang Yu, PhD Candidate
State Key Laboratory of Emerging Infectious Diseases
School of Public Health
The University of Hong Kong
Hong Kong SAR, China
-~----------~----~----~----~------~----~------~--~---
Reply all
Reply to author
Forward
Message has been deleted
0 new messages