Skip to content
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

Use smoother curves to draw circular layout barplots for trees with only a few tips #508

Open
fedarko opened this issue Mar 30, 2021 · 0 comments
Labels

Comments

@fedarko
Copy link
Collaborator

fedarko commented Mar 30, 2021

To draw barplots in the circular layout, EMPress uses four triangles for each tip in the tree's "bar". When there are over a couple of tips (probably somewhere in the 10-50 tips range) this looks nice, but below this threshold the approximation is really obvious, and the barplots look very angular:

image
(This screenshot is really old - it's from the #357 PR - but the idea is the same.)

It turns out that this approximation can actually cause the barplots to overlap the tree, in the rare case where the curves from the circular layout extend "beyond" the lack of curves of the barplots (I think the tips having relatively short branch lengths is related to this).

Peek 2021-03-29 18-45

IMO this upgrades this problem from "ugly" to "actually a bug" -- a solution to this is adjusting the way circular barplots are drawn for trees with, say, < 100 tips; I think this would mostly involve altering Empress._addCircularBarCoords().

(...Noticed this problem while testing #505 ✂️ 🌲 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant