Using iplotx with cogent3#
iplotx is a library to visualise trees and networks using matplotlib (cogent3 uses plotly internally). It supports dozens of options to style the appearance of trees and can produce static images, interactive plots, animations, and so on.
Note
As iplotx is a separate project from cogent3, please post any issues or help requests on the iplotx forums.
Below is a simple example on how to combine cogent3 with iplotx:
A taste of style options#
iplotx supports a large number of options to style the appearance of trees. As an example here, we choose a rectangular layout with non-angular branches, colouring some leaf edges for species related to humans. We can also build the matplotlib figure canvas manually, which is useful to combine trees with other types of graphical elements. We illustrate this by combining the tree plot with a matplotlib figure annotation and a scatter plot around the tree root.