Changelog¶
[0.4.1] - 2025-10-04¶
Fix convergence of the layout algorithm for some Demes models. Optimising the horizontal positions of demes is a quadratic optimisation problem, subject to linear inequality constraints, and has a global optimum. To optimise our objective function, we use scipy, and we were letting scipy calculate the Hessian (matrix of second partial derivatives of our objective function) using a 2-point finite-difference approximation. This approximation wasn’t very accurate, but didn’t noticeably affect the layout positions. However, it did lead to very slow convergence in some circumstances (e.g. see #287). This fix calculates the Hessian analytically, which results in very fast convergence. The vast majority of users shouldn’t notice any change.
[0.4.0] - 2023-05-03¶
Documented the layout algorithm used in tubes plots.
Added
scale_baroption todemesdraw.tubes(), and--scale-baroption to thedemesdraw tubesCLI, to draw a scale bar that indicates the population size.Removed dependency on
cvxpyby going back toscipyfor optimisation of the deme positions. The trust-constr method with linear constraints seems to work well.
[0.3.1] - 2022-09-19¶
Added mouseover annotation popups for interactive tubes plots.
Dropped support for Python 3.6.
Performance improvement when calculating tube positions.
Fix incompatibility with “legend” labels and matplotlib 3.6.0.
[0.3.0] - 2022-01-08¶
Improved the default positions of demes in
demesdraw.tubes()for tree-like models and more elaborate models with many demes. The previously used optimisation procedure (scipy’s SLSQP) has been removed in favour of constrained convex optimisation usingcvxpy.Increased the default amount of space that separates demes in
demesdraw.tubes(), and use more space when there are more contemporary demes (seedemesdraw.utils.separation_heuristic()).Filter numpy warnings about overflow when using a log scale. The overflow in question is harmless and these warnings only serve to confuse users.
Breaking change
Removed the
optimisation_roundsparameter todemesdraw.tubes().
[0.2.0] - 2021-12-01¶
Breaking change
Updates for demes 0.2.0, which changes the syntax for pulses from using a single
sourceandproportionto using a list ofsourcesand a list ofproportions.
[0.1.4] - 2021-07-28¶
Added
max_timeparameter todemesdraw.tubes().Don’t draw ancestry lines for vertically stacked demes.
Pin demes < 0.2 in install_requires.
Made some
demesdraw.utilsfunctions public and cleaned up namespace.Added CLI, with
tubesandsize_historysubcommands.
[0.1.3] - 2021-06-22¶
Fixed problem with numpy 1.21.
[0.1.2] - 2021-06-10¶
Reinstate support for Python 3.6.
[0.1.1] - 2021-06-09¶
[0.1.0] - 2021-04-19¶
Initial release, including
demes.tubes()anddemes.size_history()functions.