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

Extra parameter to tree.draw() to scale to height of entire ts #167

Closed
hyanwong opened this issue Apr 5, 2019 · 4 comments · Fixed by #168
Closed

Extra parameter to tree.draw() to scale to height of entire ts #167

hyanwong opened this issue Apr 5, 2019 · 4 comments · Fixed by #168

Comments

@hyanwong
Copy link
Member

hyanwong commented Apr 5, 2019

When drawing multiple trees from a ts, we might want the branch lengths to be comparable. AT the moment, trees are drawn to 100% of the height of the tree, not of the entire tree sequence.

I'm happy to code this up in a PR

@jeromekelleher
Copy link
Member

Good idea. This will make drawing a full tree sequence much easier. Something like global_height_scale=False as an extra parameter?

@hyanwong
Copy link
Member Author

hyanwong commented Apr 5, 2019

I've coded it as scale_to_ts=False. But perhaps your name is better. Not quite sure how to write the test case - presumably we need a ts for testing that has different root heights for a few trees - we might have to invent one.

hyanwong added a commit to hyanwong/tskit that referenced this issue Apr 5, 2019
@hyanwong
Copy link
Member Author

hyanwong commented Apr 5, 2019

Currently here: hyanwong@6944b88

Will create a PR once I've thought of the unit test

@jeromekelleher
Copy link
Member

Can you make the PR, it's easier to discuss then as we can see the diff clearly.

hyanwong added a commit to hyanwong/tskit that referenced this issue Apr 5, 2019
jeromekelleher pushed a commit to hyanwong/tskit that referenced this issue Apr 12, 2019
jeromekelleher pushed a commit to hyanwong/tskit that referenced this issue Jun 11, 2019
jeromekelleher pushed a commit to hyanwong/tskit that referenced this issue Jun 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants