-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Styling individual tip labels #64
Comments
Hi @rotifyld, Thanks. I am very happy for new contributors. As you may know, the toytree draw arguments for I agree it would be nice to be able to style the tip labels in complex ways more easily. For now, the simplest solution is to draw each text element (e.g., tip) separately by using toyplot in combination with toytree. For example, to draw tip labels of different font sizes, stroke colors, etc., you can do something like the following: If we did want to support this type of thing within the For the future (toytree version 3 in development branch 'toy3') I have an idea for how to implement this using a submodule I'm still deciding on the best syntax to use for this new module. It will likely be something like the following: # create a tree drawing on a set of axes
canvas, axes, tree_mark = tree.draw()
# add additional marks to the axes taking the tree mark as an input
# b/c it contains the coordinates of the current tree drawing given its
# orientation and other drawing style arguments.
tip_marks = toytree.annotate.draw_tip_labels(axes, mark, ...) |
I found out about the package only yesterday, and I already love the project and its simplicity. The only thing I miss right now is that all the tip labels has to be styled identically (apart from the color property). I'm interested in contributing towards the codebase with this feature if you think it wouldn't break the minimalism/simplicity of the overall project. Also, any guidance on that would be appreciated.
And thank you for all the work you put into this project!
The text was updated successfully, but these errors were encountered: