forked from handley-lab/anesthetic
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
implement axes logscales (handley-lab#328)
* add logscale capability to `kde_contour_plot_2d` * add logscale capability to `fastkde_contour_plot_2d`, and remove `set_xlim` which should really be determined by the contourplots * add logscale capability to `hist_plot_2d` * presumably fix `test_hist_plot_2d` which did not create new figures despite checking for axes limits * add logscale capability to `kde_plot_1d` * add logscale capability to `fastkde_plot_1d` * add `logx` and `logxy` kwargs to `make_1d_axes`, `make_2d_axes`, `plot_1d`, and `plot_2d` which takes a list of parameters that are to be plotted on a log-scale * add logscale capability to `hist_plot_1d` * fix `logx` and `logxy` behaviour to work for empty lists and both for already existing axes and newly to create axes * add log-scale capability to `hist_plot_1d` when it is called on its own * add tests for log-scale capability of the anesthetic plotting functions * attempt setting logscale only if ax not None * move `local_kwargs` instantiation until after `logxy` is popped from kwargs * add test for logscale creation in `make_1d_axes` and `make_2d_axes` * add test for correct logscale handling of `Samples.plot_1d` and `Samples.plot_2d` * version bump to 2.2.0 * skip logscale tests for fastkde if not installed * add `logx`, `logxy`, and `label` to the docstring of `plot_1d` and/or `plot_2d` * add documentation for log-scale usage * add test checking for ValueError if log-axes do not match in repeated calls to `plot_1d` or `plot_2d` * add minimum requirement of `Sphinx>=4.2.0` * add minimum requirement of `sphinx_rtd_theme>=1.2.2` * version bump to 2.3.0 * version bump to 2.4.0 * fix logscaling post master merge * add test for combination of logscale hist plot with bins and range kwargs * add test for combination of logscale hist plot with bins and range kwargs in test_samples * fix `hist_plot_1d` for various combinations of `bins` and `range` kwargs with logscale, and remove astropy option since we now have string input for bins independent of astropy * add `noqa: disable=D101` to suppress `missing docstring` * change tests involving astropy to now test for ValueError, since astropy has been removed, since automatic bin computation is now directly integrated in anesthetic * change `logxy` to independent `logx` and `logy` * adjust docs to new `logx` and `logy` kwargs instead of the `logxy` kwarg * change docs on logscale to plot more parameters to see the different `logx` and `logy` behaviour * change docs on logscale to include descriptive legends * version bump to 2.5.0 * add pytest warning capture for hist * replace allsegs with get_paths * fix range of hist1d as data has already been logarithmed * get_paths only works on matplotlib>=3.8.0 * split logscale tests up for 1d and 2d, to make it easier to identify where issues reside * do not emit to orthogonal axes when logx and logy are different, and use data bounds for fastkde by default * revert the data constrained bounds from fastkde, they help with sharp bounds, but they ruin Gaussian results, this is very different from gaussian_kde, so for fastkde we actually would need to provide prior bounds and it is not good enough to infer bounds from the data... * add test for setting limits when horizontal axes are linear and vertical are logarithmic or vice versa, where those limits should not emit * simplify tests from previous commit to focus only on the cases that could actually fail * make new tests compatible with python 3.9 * clean up warnings import setup --------- Co-authored-by: AdamOrmondroyd <[email protected]>
- Loading branch information
1 parent
2c01d13
commit 10f032f
Showing
8 changed files
with
580 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = '2.4.2' | ||
__version__ = '2.5.0' |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.