From 568e29460355cd5a6ee7238d10ac35c7a673c023 Mon Sep 17 00:00:00 2001 From: Paul Hobson Date: Mon, 27 Mar 2017 15:46:35 -0700 Subject: [PATCH 1/3] DOC: fix minor typos and formatting (MEP28) --- doc/devel/MEP/MEP28.rst | 30 +++++++++++------------------- 1 file changed, 11 insertions(+), 19 deletions(-) diff --git a/doc/devel/MEP/MEP28.rst b/doc/devel/MEP/MEP28.rst index 777500176faa..6f6fc3dae1c7 100644 --- a/doc/devel/MEP/MEP28.rst +++ b/doc/devel/MEP/MEP28.rst @@ -1,34 +1,26 @@ ============================================= - MEP 28: Remove Complexity from Axes.boxplot + MEP28: Remove Complexity from Axes.boxplot ============================================= .. contents:: :local: + Status ====== - -.. -.. MEPs go through a number of phases in their lifetime: - **Discussion** -.. -.. - **Progress**: Consensus was reached on the mailing list and -.. implementation work has begun. -.. -.. - **Completed**: The implementation has been merged into master. -.. -.. - **Superseded**: This MEP has been abandoned in favor of another -.. approach. Branches and Pull requests ========================== -Adding pre- & post-processing options to ``cbook.boxplot_stats``: https://github.com/phobson/matplotlib/tree/boxplot-stat-transforms -Exposing ``cbook.boxplot_stats`` through ``Axes.boxplot`` kwargs: None -Remove redundant statistical kwargs in ``Axes.boxplot``: None -Remove redundant style options in ``Axes.boxplot``: None -Remaining items that arise through discussion: None +The following lists any open PRs or branches related to this MEP: + +#. Adding pre- & post-processing options to ``cbook.boxplot_stats``: https://github.com/phobson/matplotlib/tree/boxplot-stat-transforms +#. Deprecated passings 2D numpy arrays as input: None +#. Exposing ``cbook.boxplot_stats`` through ``Axes.boxplot`` kwargs: None +#. Remove redundant statistical kwargs in ``Axes.boxplot``: None +#. Remove redundant style options in ``Axes.boxplot``: None +#. 6Remaining items that arise through discussion: None Abstract ======== @@ -121,7 +113,7 @@ data differently depending one these types of transforms. ax.set_yscale('log') data = np.random.lognormal(-1.75, 2.75, size=37) - stats = cbook.boxplot_stats(data, labels=['arimetic']) + stats = cbook.boxplot_stats(data, labels=['arithmetic']) logstats = cbook.boxplot_stats(np.log(data), labels=['log-transformed']) for lsdict in logstats: From 93fd84a6aa2285949d1880ca1b6f2e655bdfb3b0 Mon Sep 17 00:00:00 2001 From: Paul Hobson Date: Mon, 27 Mar 2017 15:47:53 -0700 Subject: [PATCH 2/3] DOC: include 2D array deprecation, accelerate schedule --- doc/devel/MEP/MEP28.rst | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/doc/devel/MEP/MEP28.rst b/doc/devel/MEP/MEP28.rst index 6f6fc3dae1c7..b9c28ab2e1fe 100644 --- a/doc/devel/MEP/MEP28.rst +++ b/doc/devel/MEP/MEP28.rst @@ -195,11 +195,21 @@ Schedule An accelerated timeline could look like the following: #. v2.0.1 add transforms to ``cbook.boxplots_stats``, expose in ``Axes.boxplot`` -#. v2.1.0 deprecate ``usermedians``, ``conf_intervals``, ``sym`` parameters -#. v2.2.0 make deprecations noisier -#. v2.3.0 remove ``usermedians``, ``conf_intervals``, ``sym`` parameters -#. v2.3.0 deprecate ``notch`` in favor of ``shownotches`` to be consistent with other parameters and ``Axes.bxp`` -#. v2.4.0 remove ``notch`` parameter, move all style and artist toggling logic to ``Axes.bxp``. ``Axes.boxplot`` is little more than a broker between ``Axes.bxp`` and ``cbook.boxplots_stats`` +#. v2.1.0 Initial Deprecations , and using 2D numpy arrays as input + + a. Using 2D numpy arrays as input. The semantics around 2D arrays are generally confusing. + b. ``usermedians``, ``conf_intervals``, ``sym`` parameters + +#. v2.2.0 + + a. remove ``usermedians``, ``conf_intervals``, ``sym`` parameters + b. deprecate ``notch`` in favor of ``shownotches`` to be consistent with + other parameters and ``Axes.bxp`` + +#. v2.3.0 + a. remove ``notch`` parameter + b. move all style and artist toggling logic to ``Axes.bxp`` such ``Axes.boxplot`` + is little more than a broker between ``Axes.bxp`` and ``cbook.boxplots_stats`` Anticipated Impacts to Users From d5d9a0f6eb5815e007e524590e8f2f89d5f937a2 Mon Sep 17 00:00:00 2001 From: Paul Hobson Date: Tue, 28 Mar 2017 14:28:05 -0700 Subject: [PATCH 3/3] DOC: add relevant branches to MEP28 --- doc/devel/MEP/MEP28.rst | 8 +++++--- lib/matplotlib/axes/_axes.py | 1 + 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/doc/devel/MEP/MEP28.rst b/doc/devel/MEP/MEP28.rst index b9c28ab2e1fe..691ee7b437b3 100644 --- a/doc/devel/MEP/MEP28.rst +++ b/doc/devel/MEP/MEP28.rst @@ -15,12 +15,14 @@ Branches and Pull requests The following lists any open PRs or branches related to this MEP: -#. Adding pre- & post-processing options to ``cbook.boxplot_stats``: https://github.com/phobson/matplotlib/tree/boxplot-stat-transforms -#. Deprecated passings 2D numpy arrays as input: None +#. Deprecate redundant statistical kwargs in ``Axes.boxplot``: https://github.com/phobson/matplotlib/tree/MEP28-initial-deprecations +#. Deprecate redundant style options in ``Axes.boxplot``: https://github.com/phobson/matplotlib/tree/MEP28-initial-deprecations +#. Deprecate passings 2D numpy arrays as input: None +#. Add pre- & post-processing options to ``cbook.boxplot_stats``: https://github.com/phobson/matplotlib/tree/boxplot-stat-transforms #. Exposing ``cbook.boxplot_stats`` through ``Axes.boxplot`` kwargs: None #. Remove redundant statistical kwargs in ``Axes.boxplot``: None #. Remove redundant style options in ``Axes.boxplot``: None -#. 6Remaining items that arise through discussion: None +#. Remaining items that arise through discussion: None Abstract ======== diff --git a/lib/matplotlib/axes/_axes.py b/lib/matplotlib/axes/_axes.py index 13f73028ff0f..8d618e37c337 100644 --- a/lib/matplotlib/axes/_axes.py +++ b/lib/matplotlib/axes/_axes.py @@ -3280,6 +3280,7 @@ def boxplot(self, x, notch=None, sym=None, vert=None, whis=None, whis = rcParams['boxplot.whiskers'] if bootstrap is None: bootstrap = rcParams['boxplot.bootstrap'] + bxpstats = cbook.boxplot_stats(x, whis=whis, bootstrap=bootstrap, labels=labels, autorange=autorange) if notch is None: