Adama FAYE
Adama FAYE

Reputation: 11

changing tips labels on phylogeny into symbols in R

I want to modify tip labels on a phylogenetic tree in R. How can I allow different tips to have different symbols?

Upvotes: 1

Views: 961

Answers (1)

SlowLoris
SlowLoris

Reputation: 1005

Here is code for plotting symbols as tip labels on a phylogeny:

# Load package
library(ape)

# Simulate phylogeny
ntax <- 23
tree <- rtree(ntax)

# Plot tree without tip labels
plot(tree, show.tip.label=F)

# Add symbols with pch
tiplabels(pch=1:ntax, adj=c(0.6, 0.5))

Hope it helps.

Upvotes: 1

Related Questions