Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions python/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

**Features**

- SVG visualization plots mutations at the correct time, if it exists, and a y-axis,
with label can be drawn. Both x- and y-axes can be plotted on trees as well as
tree sequences (:user:`hyanwong`,:issue:`840`, :issue:`580`, :pr:`1236`)

- SVG visualization now uses squares for sample nodes and red crosses for mutations,
with the site/mutation positions marked on the x-axis. Additionally, an x-axis
label can be set (:user:`hyanwong`,:issue:`1155`, :issue:`1194`, :pr:`1182`, :pr:`1213`)
Expand Down
11 changes: 11 additions & 0 deletions python/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ def pytest_addoption(parser):
default=False,
help="Overwrite the expected viz files in tests/data/svg/",
)
parser.addoption(
"--draw-svg-debug-box",
action="store_true",
default=False,
help="To help debugging, draw lines around the plotboxes in SVG output files",
)


def pytest_configure(config):
Expand All @@ -80,6 +86,11 @@ def overwrite_viz(request):
return request.config.getoption("--overwrite-expected-visualizations")


@fixture
def draw_plotbox(request):
return request.config.getoption("--draw-svg-debug-box")


@fixture(scope="session")
def simple_ts_fixture():
return msprime.simulate(10, random_seed=42)
Expand Down
395 changes: 325 additions & 70 deletions python/tests/data/svg/internal_sample_ts.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
58 changes: 0 additions & 58 deletions python/tests/data/svg/mut_tree.svg

This file was deleted.

62 changes: 32 additions & 30 deletions python/tests/data/svg/tree.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
94 changes: 94 additions & 0 deletions python/tests/data/svg/tree_both_axes.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
60 changes: 60 additions & 0 deletions python/tests/data/svg/tree_muts.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading