This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How do I add circles to the tips of a phylogenetic tree that have white fill and a black border in ggtree?

I would like to visualize a phylogenetic tree with circles at the tips. The tips should have white fill, but a black border. How do I do this in ggtree?

Here is a MWE:

library(ape)

library(ggtree) tree <- rtree(50)

ggtree(tree) + geom_tippoint(size=3, fill="white", color="black")

ggtree(tree) + geom_point(size=3, fill="white", color="black")

With both the geom_tippoint and geom_point functions, the circles are solidly black despite the presence of fill="white". What am I doing wrong?

ggtree visualization phylogenetic tree

Please, be more elaborate, e.g. provide the code you have tried, the error messages you have obtained, and so on. You would not expect a person to spend more time on the answer than you have spent on writing the question, would you?

I edited the original question.

1 answer

ggtree(tree) + geom_tippoint(size=3, fill="white", color="black", shape=21)

Log in to answer this question.