Drawing a tree with subset of sample nodes and/or larger dots for sample nodes #2371
-
|
I am trying to draw a nice tree and I'm failing.
The code I'm using at the moment is very simple: Any help is much appreciated! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 8 replies
-
|
For plotting a subset of the samples, you can use To increase the size of the nodes, you can use Note, however, that if you use the more sophisticated |
Beta Was this translation helpful? Give feedback.
-
|
Thanks! I think I'll manage now :) |
Beta Was this translation helpful? Give feedback.


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…