Skip to content

Drawing a tree with subset of sample nodes and/or larger dots for sample nodes #2371

Answered by hyanwong
janaobsteter asked this question in Q&A
Discussion options

You must be logged in to vote

For plotting a subset of the samples, you can use simplify(): there's an example in https://tskit.dev/tutorials/getting_started.html#processing-trees but you are quite right that it is a bit hidden, and we should also give an example in the "viz" tutorial (I've opened an issue: tskit-dev/tutorials#182).

To increase the size of the nodes, you can use draw_svg(symbol_size=5) (pick whatever number seems right for your viz). If you only want to increase the size of the sample nodes, you could, for example, hide the other nodes by adding ".node:not(.leaf) > .sym {display: none}" to the style (see https://tskit.dev/tutorials/viz.html#restricting-styling).

Note, however, that if you use the more…

Replies: 2 comments 8 replies

Comment options

You must be logged in to vote
1 reply
@hyanwong
Comment options

Answer selected by hyanwong
Comment options

You must be logged in to vote
7 replies
@hyanwong
Comment options

@janaobsteter
Comment options

@hyanwong
Comment options

@jeromekelleher
Comment options

@hyanwong
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants