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

Demo example of plotting a tubes plot for a model #1588

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions docs/tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,19 @@ The number of "sampling" populations could be smaller than the number of populat
since some models have ancient populations which are currently not allowed to be
sampled from -- but that is not the case in this model.

If working in a notebook, it's also possible to plot a schematic of your chosen model
using the `demesdraw <https://grahamgower.github.io/demesdraw/>`__ python library.
This provides both a ``size_history`` plot and a ``tubes`` visualization. E.g.

.. code-block:: python

import demesdraw
graph = model.model.to_demes()
demesdraw.tubes(model.model.to_demes());

Equivalent plots for all the available demographic models are also
shown in the :ref:`sec_catalog`.

Set up the contig
-----------------

Expand Down
Loading