Open AMFBio opened 5 years ago
Hi @AMFBio . I'm wondering if by any chance did you find a way to add a scale bar using phyloseq?
Better late than never. Sharing what I found and eventually used to generate a scale bar. The library ggtree does the job, although importing the library may generate unusual warnings along the way (I surmise they can be safely ignored). In brief, a scale bar can be generated by appending geom_treescale(x=int, y=int, fontsize=int, linesize=int, offset=int, color='str') to the plot_tree()/ggplot object. The arguments specified in x, y and offset will tell how the scale bar is positioned relative to the tree.
Hi there,
I'm trying to get a scale bar for my phlyogenetic tree.
I’m using the instructions found in this tutorial: https://f1000research.com/articles/5-1492/v2
After I process my sequences and run the alignment, my script is as follows:
I combine this into my phyloseq object, then I filter and prune my data set to give me the new phyloseq object: test15_2
I plot this tree using:
plot_tree(test15_2, color="Species", ladderize="left", label.tips=labeltips)
But I’m unsure of how to add the scale bar in here?
Any help would be appreciated.
Cheers,