Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change figure and axes output handling (#224)
* add `gridspec_kw` kwarg to `make_nd_plot` and forward all remaining kwargs to `plt.figure` * change test for error raising to AttributeError _and_ TypeError, as different python versions seem to raise different errors * stop returning the figure in the `samples.plot_nd` commands, adapt tests accordingly * fix flake8 issues of incorrect indentation * move axes setup into `AxesSeries` and `AxesDataFrame` and call this from `make_nd_axes` * move bulk of axes setup into `AxesSeries` and `AxesDataFrame` initialisation, however still issues with slicing etc * flake8 fixes * fix some whitespace issues * add missing docstrings * change tests to test for `isinstance(axes, AxesDataFrame)` rather than `isinstance(axes, DataFrame)` * reintroduce the constructor properties for `AxesDataFrame` that ensure slicing returns `AxesDataFrame` or `AxesSeries`, also some polishing * simplify and remove some blank lines * remove default `None` from `set_labels` methods * add tests for `AxesSeries` and `AxesDataFrame` * further parametrize `test_make_2d_axes_behaviour` * turn `make_diagonal` into a staticmethod and `_axes_frame` into a classmethod * add lower/diagonal/upper functionality to `axlines` and `axspans` such that you can for example set different truths for the lower and upper triangle * fix minor ticks and change tick defaults * fix issue with incorrect minor ticks (This was particularly annoying because their is a default value set in pandas `plotting.core` module.) * add `tick_params` method to `AxesSeries` and `AxesDataFrame` * change default tick labelrotation to 45 * change default tick labelsize to `'small'` * change default tick behaviour to `"inner"` * ensure desired kde limits are computed before sample compression * add `set_margins` method to `AxesDataFrame` to allow changing/padding axes limits without having to specify precise limits for each parameter * add test for `axes.set_margins` method * add `scatter` method for `AxesDataFrame` which allows to plot truth values as crosses or points rather than vertical and horizontal lines * change signature of `axlines` and `axspans` to take a dictionary of params, modify tests accordingly, and add test for `axes.scatter` method * switch to `from pandas import Series, DataFrame` * clean up `AxesSeries` initialisation a bit * fix ylim range for `kde_1d` plots dependent on `density` kwarg * fix flake8 issue of too long line * attempt at fixing master merge * use `items` instead of `iteritems` * add the call to `make_offdiagonal` which got lost in the master merge * only apply `tight_layout` if no `gridspec_kw` are passed, else it does not work anyhow and throws warnings
- Loading branch information