@@ -46,7 +46,7 @@ of the chromosome, then throw some neutral mutations onto the resulting tree seq
4646``` {code-cell} ipython3
4747import msprime
4848
49- pop_size=10_000
49+ pop_size=5000
5050seq_length=10_000_000
5151
5252sweep_model = msprime.SweepGenicSelection(
@@ -167,9 +167,14 @@ using the {meth}`Tree.draw_svg` method.
167167``` {code-cell} ipython3
168168swept_tree = ts.at(5_000_000) # or you can get e.g. the nth tree using ts.at_index(n)
169169intvl = swept_tree.interval
170- print(f"Tree number {swept_tree.index}, which runs from position {intvl.left} to {intvl.right}:")
171- # Draw it at a wide size, to make room for all 40 tips
172- swept_tree.draw_svg(size=(1000, 200))
170+
171+ swept_tree.draw_svg(
172+ size=(1000, 200), # Draw the tree at a wide size, to make room for all 40 tips
173+ title=f"Tree number {swept_tree.index}, which runs from position {intvl.left} to {intvl.right}:",
174+ y_axis=True,
175+ y_ticks=[0, 20, 40, 60, 80],
176+ node_labels={}
177+ )
173178```
174179:::{margin}
175180The {ref}` visualization tutorial<sec_tskit_viz> ` gives more drawing possibilities
@@ -193,8 +198,14 @@ more than one tree: either the entire tree sequence, or
193198
194199``` {code-cell} ipython3
195200reduced_ts = ts.simplify([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]) # simplify to the first 10 samples
196- print("Genealogy of the first 10 samples for the first 5kb of the genome")
197- reduced_ts.draw_svg(x_lim=(0, 5000))
201+
202+ reduced_ts.draw_svg(
203+ x_lim=(0, 10000),
204+ title="Genealogy of the first 10 samples for the first 10kb of the genome",
205+ y_axis=True,
206+ y_ticks=[0, 2000, 4000, 6000, 8000],
207+ node_labels = {u: u for u in reduced_ts.samples()},
208+ )
198209```
199210
200211These are much more standard-looking coalescent trees, with far longer branches higher
0 commit comments