From a1dc9666b830b88f170d598fb500b6b71e01a62f Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Sun, 1 Oct 2017 20:22:22 -0400 Subject: [PATCH 01/49] DOC: Correct review issues with what's new page. --- doc/users/whats_new.rst | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/doc/users/whats_new.rst b/doc/users/whats_new.rst index 7d69e9037d9f..1b01a8c4228c 100644 --- a/doc/users/whats_new.rst +++ b/doc/users/whats_new.rst @@ -107,8 +107,8 @@ path. CheckButtons widget get_status function --------------------------------------- -A :func:`~matplotlib.widgets.CheckButtons.get_status` method has been added the -:class:`matplotlib.widgets.CheckButtons` class. This ``get_status`` method +A :func:`~matplotlib.widgets.CheckButtons.get_status` method has been added to +the :class:`matplotlib.widgets.CheckButtons` class. This ``get_status`` method allows user to query the status (True/False) of all of the buttons in the ``CheckButtons`` object. @@ -117,10 +117,10 @@ Abstract base class for movie writers ------------------------------------- The new :class:`~matplotlib.animation.AbstractMovieWriter` class defines -the API required by a class that is to be used as the `writer` in the -`save` method of the :class:`~matplotlib.animation.Animation` class. -The existing :class:`~matplotlib.animation.MovieWriter` class now derives -from the new abstract base class. +the API required by a class that is to be used as the ``writer`` in the +:meth:`matplotlib.animation.Animation.save` method. The existing +:class:`~matplotlib.animation.MovieWriter` class now derives from the new +abstract base class. Add fill_bar argument to ``AnchoredSizeBar`` @@ -156,7 +156,7 @@ orthographic view. ``voxels`` function for mplot3d ------------------------------- :class:`~mpl_toolkits.mplot3d.axes3d.Axes3D` now has a -`~mpl_toolkits.mplot3d.axes3d.Axes3D.voxels` method, for visualizing boolean 3d +`~mpl_toolkits.mplot3d.axes3d.Axes3D.voxels` method, for visualizing boolean 3D data. Uses could include plotting a sparse 3D heat map, or visualizing a volumetric model. @@ -182,9 +182,9 @@ around the hexagons. Figure.legend() can be called without arguments ----------------------------------------------- -Calling ``Figure.``:func:`~matplotlib.figure.Figure.legend` can now be -done with no arguments. In this case a legend will be created that contains all -the artists on all the axes contained within the figure. +Calling :meth:`.Figure.legend` can now be done with no arguments. In this case +a legend will be created that contains all the artists on all the axes +contained within the figure. New parameter `clear` for :func:`~matplotlib.pyplot.figure` @@ -260,7 +260,8 @@ Specify minimum value to format as scalar for ``LogFormatterMathtext`` ---------------------------------------------------------------------- :class:`~matplotlib.ticker.LogFormatterMathtext` now includes the option to -specify a minimum value exponent to format as a scalar (ie. 0.001 instead of 10^-3). +specify a minimum value exponent to format as a scalar (ie. 0.001 instead of +10\ :sup:`-3`). Multiple legend keys for legend entries From 380920418522fb380143a679f655749fdfad88d8 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Sun, 1 Oct 2017 23:09:18 -0400 Subject: [PATCH 02/49] DOC: Add more plots to What's new page. --- doc/users/whats_new.rst | 84 +++++++++++++++++++++++++++++++++++------ 1 file changed, 72 insertions(+), 12 deletions(-) diff --git a/doc/users/whats_new.rst b/doc/users/whats_new.rst index 1b01a8c4228c..70ff1857d75b 100644 --- a/doc/users/whats_new.rst +++ b/doc/users/whats_new.rst @@ -42,7 +42,7 @@ to further specify the zero location based on the given anchor point. .. figure:: /gallery/pie_and_polar_charts/images/sphx_glr_polar_scatter_002.png :target: ../gallery/pie_and_polar_charts/polar_scatter.html#scatter-plot-on-polar-axis-with-offset-origin :align: center - :scale: 50 + :scale: 70 Polar Offset Demo @@ -53,7 +53,7 @@ be used to limit the range of angles plotted, producing sectors of a circle. .. figure:: /gallery/pie_and_polar_charts/images/sphx_glr_polar_scatter_003.png :target: ../gallery/pie_and_polar_charts/polar_scatter.html#scatter-plot-on-polar-axis-confined-to-a-sector :align: center - :scale: 50 + :scale: 70 Polar Sector Demo @@ -137,6 +137,27 @@ and whether or not the bar will be filled by default depends on the value of ``True`` or ``False`` to unconditionally always or never use a filled patch rectangle for the size bar. +Example +~~~~~~~ + +.. plot:: + :include-source: + :align: center + + import matplotlib.pyplot as plt + from mpl_toolkits.axes_grid1.anchored_artists import AnchoredSizeBar + + fig, ax = plt.subplots(figsize=(3, 3)) + + bar0 = AnchoredSizeBar(ax.transData, 0.3, 'unfilled', loc=3, frameon=False, + size_vertical=0.05, fill_bar=False) + ax.add_artist(bar0) + bar1 = AnchoredSizeBar(ax.transData, 0.3, 'filled', loc=4, frameon=False, + size_vertical=0.05, fill_bar=True) + ax.add_artist(bar1) + + plt.show() + Annotation can use a default arrow style ---------------------------------------- @@ -152,6 +173,31 @@ argument and has a method :meth:`~mpl_toolkits.mplot3d.axes3d.Axes3D.set_proj_ty The default option is ``'persp'`` as before, and supplying ``'ortho'`` enables orthographic view. +Example +~~~~~~~ + +Compare the z-axis which is vertical in orthographic view, but slightly skewed +in the perspective view. + +.. plot:: + :include-source: + :align: center + + import numpy as np + import matplotlib.pyplot as plt + from mpl_toolkits.mplot3d import Axes3D + + fig = plt.figure(figsize=(4, 6)) + ax1 = fig.add_subplot(2, 1, 1, projection='3d') + ax1.set_proj_type('persp') + ax1.set_title('Perspective (default)') + + ax2 = fig.add_subplot(2, 1, 2, projection='3d') + ax2.set_proj_type('ortho') + ax2.set_title('Orthographic') + + plt.show() + ``voxels`` function for mplot3d ------------------------------- @@ -160,6 +206,13 @@ orthographic view. data. Uses could include plotting a sparse 3D heat map, or visualizing a volumetric model. +.. figure:: /gallery/mplot3d/images/sphx_glr_voxels_numpy_logo_001.png + :target: ../gallery/mplot3d/voxels_numpy_logo.html + :align: center + :scale: 70 + + Voxel Demo + Barbs and Quiver Support Dates ------------------------------ @@ -275,7 +328,7 @@ A legend entry can now contain more than one legend key. The extended .. figure:: /gallery/text_labels_and_annotations/images/sphx_glr_legend_demo_004.png :target: ../gallery/text_labels_and_annotations/legend_demo.html :align: center - :scale: 50 + :scale: 70 Multiple Legend Keys @@ -410,24 +463,31 @@ to ``False``. Example ~~~~~~~ -:: +.. plot:: + :include-source: + :align: center import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D - fig = plt.figure(figsize=(7,3)) - ax1 = fig.add_subplot(121, projection='3d') x = np.arange(2) y = np.arange(3) x2d, y2d = np.meshgrid(x, y) - x2d, y2d = x2d.ravel(), y2d.ravel() - z = x2d + y2d - ax1.bar3d(x2d, y2d, x2d * 0, 1, 1, z, shade=True) + x, y = x2d.ravel(), y2d.ravel() + z = np.zeros_like(x) + dz = x + y + + fig = plt.figure(figsize=(4, 6)) + ax1 = fig.add_subplot(2, 1, 1, projection='3d') + ax1.bar3d(x, y, z, 1, 1, dz, shade=True) + ax1.set_title('Shading On') + + ax2 = fig.add_subplot(2, 1, 2, projection='3d') + ax2.bar3d(x, y, z, 1, 1, dz, shade=False) + ax2.set_title('Shading Off') - ax2 = fig.add_subplot(122, projection='3d') - ax2.bar3d(x2d, y2d, x2d * 0, 1, 1, z, shade=False) - fig.canvas.draw() + plt.show() New which Parameter for autofmt_xdate From 7ef54d81175919799152c7b378522184d1f222ae Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Sun, 1 Oct 2017 22:03:44 -0700 Subject: [PATCH 03/49] DOC: put in top-level sections --- doc/users/whats_new.rst | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/doc/users/whats_new.rst b/doc/users/whats_new.rst index 70ff1857d75b..b0dc601f7673 100644 --- a/doc/users/whats_new.rst +++ b/doc/users/whats_new.rst @@ -8,7 +8,7 @@ For a list of all of the issues and pull requests since the last revision, see the :ref:`github-stats`. .. contents:: Table of Contents - :depth: 3 + :depth: 4 .. @@ -24,6 +24,18 @@ revision, see the :ref:`github-stats`. New in Matplotlib 2.1 ===================== +New features +++++++++++++ + +Improvements +++++++++++++ + +Internals ++++++++++ + +Pending ++++++++ + Enhancements to polar plot -------------------------- From 3e67e1a3dc53afa9bd39e46499f51de8b5ec3b30 Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Sun, 1 Oct 2017 22:28:34 -0700 Subject: [PATCH 04/49] DOC: move polar plot whats new entry --- doc/users/whats_new.rst | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/doc/users/whats_new.rst b/doc/users/whats_new.rst index b0dc601f7673..949ef0dca434 100644 --- a/doc/users/whats_new.rst +++ b/doc/users/whats_new.rst @@ -27,15 +27,6 @@ New in Matplotlib 2.1 New features ++++++++++++ -Improvements -++++++++++++ - -Internals -+++++++++ - -Pending -+++++++ - Enhancements to polar plot -------------------------- @@ -82,6 +73,16 @@ labels will be parallel to the circular grid line, and angular tick labels will be perpendicular to the grid line (i.e., parallel to the outer boundary.) + +Improvements +++++++++++++ + +Internals ++++++++++ + +Pending ++++++++ + Merge JSAnimation ----------------- From cbdb552a3767e6a81700f983275d1d02fe2be5d8 Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Sun, 1 Oct 2017 22:29:18 -0700 Subject: [PATCH 05/49] DOC: move js animation whats new --- doc/users/whats_new.rst | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/doc/users/whats_new.rst b/doc/users/whats_new.rst index 949ef0dca434..504ef3ad1898 100644 --- a/doc/users/whats_new.rst +++ b/doc/users/whats_new.rst @@ -72,19 +72,8 @@ be useful to rotate tick *labels* to match the boundary. Calling labels will be parallel to the circular grid line, and angular tick labels will be perpendicular to the grid line (i.e., parallel to the outer boundary.) - - -Improvements -++++++++++++ - -Internals -+++++++++ - -Pending -+++++++ - -Merge JSAnimation ------------------ +Interactive JS widgets for animation +------------------------------------ Jake Vanderplas' JSAnimation package has been merged into matplotlib. This adds to matplotlib the `~matplotlib.animation.HTMLWriter` class for @@ -102,6 +91,17 @@ an HTML file by asking for the ``html`` writer. + + +Improvements +++++++++++++ + +Internals ++++++++++ + +Pending ++++++++ + New TransformedPatchPath caching object --------------------------------------- From e5784e3bbe4d275dd11b55adbbab23ddb01b2173 Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Sun, 1 Oct 2017 22:32:24 -0700 Subject: [PATCH 06/49] DOC: move TransformedPatchPath docs --- doc/users/whats_new.rst | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/doc/users/whats_new.rst b/doc/users/whats_new.rst index 504ef3ad1898..3be4b593fca5 100644 --- a/doc/users/whats_new.rst +++ b/doc/users/whats_new.rst @@ -91,17 +91,12 @@ an HTML file by asking for the ``html`` writer. - - Improvements ++++++++++++ Internals +++++++++ -Pending -+++++++ - New TransformedPatchPath caching object --------------------------------------- @@ -117,6 +112,10 @@ itself based on the underlying patch while the older class uses an immutable path. + +Pending ++++++++ + CheckButtons widget get_status function --------------------------------------- From 10272f469357c1e88699ce5ff313df8c9802a2b7 Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Sun, 1 Oct 2017 22:33:29 -0700 Subject: [PATCH 07/49] DOC: move checkbox widget docs --- doc/users/whats_new.rst | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/doc/users/whats_new.rst b/doc/users/whats_new.rst index 3be4b593fca5..609212b03965 100644 --- a/doc/users/whats_new.rst +++ b/doc/users/whats_new.rst @@ -94,6 +94,16 @@ an HTML file by asking for the ``html`` writer. Improvements ++++++++++++ +CheckButtons widget get_status function +--------------------------------------- + +A :func:`~matplotlib.widgets.CheckButtons.get_status` method has been added to +the :class:`matplotlib.widgets.CheckButtons` class. This ``get_status`` method +allows user to query the status (True/False) of all of the buttons in the +``CheckButtons`` object. + + + Internals +++++++++ @@ -116,15 +126,6 @@ path. Pending +++++++ -CheckButtons widget get_status function ---------------------------------------- - -A :func:`~matplotlib.widgets.CheckButtons.get_status` method has been added to -the :class:`matplotlib.widgets.CheckButtons` class. This ``get_status`` method -allows user to query the status (True/False) of all of the buttons in the -``CheckButtons`` object. - - Abstract base class for movie writers ------------------------------------- From 92f211c7f208aa58fb5b4db41f22ed60a821d72b Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Sun, 1 Oct 2017 22:33:51 -0700 Subject: [PATCH 08/49] DOC: move animation ABC whats new --- doc/users/whats_new.rst | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/doc/users/whats_new.rst b/doc/users/whats_new.rst index 609212b03965..fd83688321d0 100644 --- a/doc/users/whats_new.rst +++ b/doc/users/whats_new.rst @@ -122,10 +122,6 @@ itself based on the underlying patch while the older class uses an immutable path. - -Pending -+++++++ - Abstract base class for movie writers ------------------------------------- @@ -136,6 +132,11 @@ the API required by a class that is to be used as the ``writer`` in the abstract base class. + + +Pending ++++++++ + Add fill_bar argument to ``AnchoredSizeBar`` -------------------------------------------- From 1f41d333b81b24bc5e8fe35675b78b25726d5028 Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Sun, 1 Oct 2017 22:58:06 -0700 Subject: [PATCH 09/49] DOC: move AnchoreSizeBar whats new --- doc/users/whats_new.rst | 71 +++++++++++++++++++++-------------------- 1 file changed, 36 insertions(+), 35 deletions(-) diff --git a/doc/users/whats_new.rst b/doc/users/whats_new.rst index fd83688321d0..3b1adf211d42 100644 --- a/doc/users/whats_new.rst +++ b/doc/users/whats_new.rst @@ -103,6 +103,42 @@ allows user to query the status (True/False) of all of the buttons in the ``CheckButtons`` object. +Add ``fill_bar`` argument to ``AnchoredSizeBar`` +------------------------------------------------ + +The ``mpl_toolkits`` class +:class:`~mpl_toolkits.axes_grid1.anchored_artists.AnchoredSizeBar` now has an +additional ``fill_bar`` argument, which makes the size bar a solid rectangle +instead of just drawing the border of the rectangle. The default is ``None``, +and whether or not the bar will be filled by default depends on the value of +``size_vertical``. If ``size_vertical`` is nonzero, ``fill_bar`` will be set to +``True``. If ``size_vertical`` is zero then ``fill_bar`` will be set to +``False``. If you wish to override this default behavior, set ``fill_bar`` to +``True`` or ``False`` to unconditionally always or never use a filled patch +rectangle for the size bar. + +Example +~~~~~~~ + +.. plot:: + :include-source: + :align: center + + import matplotlib.pyplot as plt + from mpl_toolkits.axes_grid1.anchored_artists import AnchoredSizeBar + + fig, ax = plt.subplots(figsize=(3, 3)) + + bar0 = AnchoredSizeBar(ax.transData, 0.3, 'unfilled', loc=3, frameon=False, + size_vertical=0.05, fill_bar=False) + ax.add_artist(bar0) + bar1 = AnchoredSizeBar(ax.transData, 0.3, 'filled', loc=4, frameon=False, + size_vertical=0.05, fill_bar=True) + ax.add_artist(bar1) + + plt.show() + + Internals +++++++++ @@ -137,41 +173,6 @@ abstract base class. Pending +++++++ -Add fill_bar argument to ``AnchoredSizeBar`` --------------------------------------------- - -The ``mpl_toolkits`` class -:class:`~mpl_toolkits.axes_grid1.anchored_artists.AnchoredSizeBar` now has an -additional ``fill_bar`` argument, which makes the size bar a solid rectangle -instead of just drawing the border of the rectangle. The default is ``None``, -and whether or not the bar will be filled by default depends on the value of -``size_vertical``. If ``size_vertical`` is nonzero, ``fill_bar`` will be set to -``True``. If ``size_vertical`` is zero then ``fill_bar`` will be set to -``False``. If you wish to override this default behavior, set ``fill_bar`` to -``True`` or ``False`` to unconditionally always or never use a filled patch -rectangle for the size bar. - -Example -~~~~~~~ - -.. plot:: - :include-source: - :align: center - - import matplotlib.pyplot as plt - from mpl_toolkits.axes_grid1.anchored_artists import AnchoredSizeBar - - fig, ax = plt.subplots(figsize=(3, 3)) - - bar0 = AnchoredSizeBar(ax.transData, 0.3, 'unfilled', loc=3, frameon=False, - size_vertical=0.05, fill_bar=False) - ax.add_artist(bar0) - bar1 = AnchoredSizeBar(ax.transData, 0.3, 'filled', loc=4, frameon=False, - size_vertical=0.05, fill_bar=True) - ax.add_artist(bar1) - - plt.show() - Annotation can use a default arrow style ---------------------------------------- From e7b3fc7da367bfd5450b57cb1534f65244698760 Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Sun, 1 Oct 2017 23:05:22 -0700 Subject: [PATCH 10/49] DOC: move annotation whats new --- doc/users/whats_new.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/users/whats_new.rst b/doc/users/whats_new.rst index 3b1adf211d42..e6e71ad06ea9 100644 --- a/doc/users/whats_new.rst +++ b/doc/users/whats_new.rst @@ -138,6 +138,11 @@ Example plt.show() +Annotation can use a default arrow style +---------------------------------------- + +Annotations now use the default arrow style when setting ``arrowprops={}``, +rather than no arrow (the new behavior actually matches the documentation). Internals @@ -174,11 +179,6 @@ Pending +++++++ -Annotation can use a default arrow style ----------------------------------------- - -Annotations now use the default arrow style when setting ``arrowprops={}``, -rather than no arrow (the new behavior actually matches the documentation). Orthographic projection for mplot3d From e5171ad3c1eb1376dc775fb746e04c738c6a7648 Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Sun, 1 Oct 2017 23:06:11 -0700 Subject: [PATCH 11/49] DOC: move mplot3d whats new --- doc/users/whats_new.rst | 93 +++++++++++++++++++++-------------------- 1 file changed, 47 insertions(+), 46 deletions(-) diff --git a/doc/users/whats_new.rst b/doc/users/whats_new.rst index e6e71ad06ea9..b16738205e4e 100644 --- a/doc/users/whats_new.rst +++ b/doc/users/whats_new.rst @@ -90,6 +90,53 @@ The `~matplotlib.animation.HTMLWriter` class can also be used to generate an HTML file by asking for the ``html`` writer. +Orthographic projection for mplot3d +----------------------------------- +:class:`~mpl_toolkits.mplot3d.axes3d.Axes3D` now accepts ``proj_type`` keyword +argument and has a method :meth:`~mpl_toolkits.mplot3d.axes3d.Axes3D.set_proj_type`. +The default option is ``'persp'`` as before, and supplying ``'ortho'`` enables +orthographic view. + +Example +~~~~~~~ + +Compare the z-axis which is vertical in orthographic view, but slightly skewed +in the perspective view. + +.. plot:: + :include-source: + :align: center + + import numpy as np + import matplotlib.pyplot as plt + from mpl_toolkits.mplot3d import Axes3D + + fig = plt.figure(figsize=(4, 6)) + ax1 = fig.add_subplot(2, 1, 1, projection='3d') + ax1.set_proj_type('persp') + ax1.set_title('Perspective (default)') + + ax2 = fig.add_subplot(2, 1, 2, projection='3d') + ax2.set_proj_type('ortho') + ax2.set_title('Orthographic') + + plt.show() + + +``voxels`` function for mplot3d +------------------------------- +:class:`~mpl_toolkits.mplot3d.axes3d.Axes3D` now has a +`~mpl_toolkits.mplot3d.axes3d.Axes3D.voxels` method, for visualizing boolean 3D +data. Uses could include plotting a sparse 3D heat map, or visualizing a +volumetric model. + +.. figure:: /gallery/mplot3d/images/sphx_glr_voxels_numpy_logo_001.png + :target: ../gallery/mplot3d/voxels_numpy_logo.html + :align: center + :scale: 70 + + Voxel Demo + Improvements ++++++++++++ @@ -181,52 +228,6 @@ Pending -Orthographic projection for mplot3d ------------------------------------ -:class:`~mpl_toolkits.mplot3d.axes3d.Axes3D` now accepts ``proj_type`` keyword -argument and has a method :meth:`~mpl_toolkits.mplot3d.axes3d.Axes3D.set_proj_type`. -The default option is ``'persp'`` as before, and supplying ``'ortho'`` enables -orthographic view. - -Example -~~~~~~~ - -Compare the z-axis which is vertical in orthographic view, but slightly skewed -in the perspective view. - -.. plot:: - :include-source: - :align: center - - import numpy as np - import matplotlib.pyplot as plt - from mpl_toolkits.mplot3d import Axes3D - - fig = plt.figure(figsize=(4, 6)) - ax1 = fig.add_subplot(2, 1, 1, projection='3d') - ax1.set_proj_type('persp') - ax1.set_title('Perspective (default)') - - ax2 = fig.add_subplot(2, 1, 2, projection='3d') - ax2.set_proj_type('ortho') - ax2.set_title('Orthographic') - - plt.show() - - -``voxels`` function for mplot3d -------------------------------- -:class:`~mpl_toolkits.mplot3d.axes3d.Axes3D` now has a -`~mpl_toolkits.mplot3d.axes3d.Axes3D.voxels` method, for visualizing boolean 3D -data. Uses could include plotting a sparse 3D heat map, or visualizing a -volumetric model. - -.. figure:: /gallery/mplot3d/images/sphx_glr_voxels_numpy_logo_001.png - :target: ../gallery/mplot3d/voxels_numpy_logo.html - :align: center - :scale: 70 - - Voxel Demo Barbs and Quiver Support Dates From 109aaf7c8de329f58d302a7603dd8808e6aa4e67 Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Sun, 1 Oct 2017 23:18:19 -0700 Subject: [PATCH 12/49] DOC: move quiver/barbs whats new --- doc/users/whats_new.rst | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/doc/users/whats_new.rst b/doc/users/whats_new.rst index b16738205e4e..f9932c716f91 100644 --- a/doc/users/whats_new.rst +++ b/doc/users/whats_new.rst @@ -191,6 +191,15 @@ Annotation can use a default arrow style Annotations now use the default arrow style when setting ``arrowprops={}``, rather than no arrow (the new behavior actually matches the documentation). +Barbs and Quiver Support Dates +------------------------------ + +When using the :func:`~matplotlib.axes.Axes.quiver` and +:func:`~matplotlib.axes.Axes.barbs` plotting methods, it is now possible to +pass dates, just like for other methods like :func:`~matplotlib.axes.Axes.plot`. +This also allows these functions to handle values that need unit-conversion +applied. + Internals +++++++++ @@ -226,20 +235,6 @@ Pending +++++++ - - - - -Barbs and Quiver Support Dates ------------------------------- - -When using the :func:`~matplotlib.axes.Axes.quiver` and -:func:`~matplotlib.axes.Axes.barbs` plotting methods, it is now possible to -pass dates, just like for other methods like :func:`~matplotlib.axes.Axes.plot`. -This also allows these functions to handle values that need unit-conversion -applied. - - Hexbin default line color ------------------------- From ec8b1d3f0bd44ee93ae145fc24fcbff5951ee351 Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Sun, 1 Oct 2017 23:23:50 -0700 Subject: [PATCH 13/49] DOC: move hexbin whats new --- doc/users/whats_new.rst | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/doc/users/whats_new.rst b/doc/users/whats_new.rst index f9932c716f91..dff5de51b4fa 100644 --- a/doc/users/whats_new.rst +++ b/doc/users/whats_new.rst @@ -201,6 +201,14 @@ This also allows these functions to handle values that need unit-conversion applied. +Hexbin default line color +------------------------- + +The default ``linecolor`` keyword argument for :func:`~matplotlib.axes.Axes.hexbin` +is now ``'face'``, and supplying ``'none'`` now prevents lines from being drawn +around the hexagons. + + Internals +++++++++ @@ -235,13 +243,6 @@ Pending +++++++ -Hexbin default line color -------------------------- - -The default ``linecolor`` keyword argument for :func:`~matplotlib.axes.Axes.hexbin` -is now ``'face'``, and supplying ``'none'`` now prevents lines from being drawn -around the hexagons. - Figure.legend() can be called without arguments ----------------------------------------------- From bfa2af368a76930a529fe07ae9057da1a62b144b Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Sun, 1 Oct 2017 23:25:12 -0700 Subject: [PATCH 14/49] DOC: move the legend whats new --- doc/users/whats_new.rst | 44 +++++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/doc/users/whats_new.rst b/doc/users/whats_new.rst index dff5de51b4fa..466473b2b67f 100644 --- a/doc/users/whats_new.rst +++ b/doc/users/whats_new.rst @@ -208,6 +208,29 @@ The default ``linecolor`` keyword argument for :func:`~matplotlib.axes.Axes.hexb is now ``'face'``, and supplying ``'none'`` now prevents lines from being drawn around the hexagons. +Figure.legend() can be called without arguments +----------------------------------------------- + +Calling :meth:`.Figure.legend` can now be done with no arguments. In this case +a legend will be created that contains all the artists on all the axes +contained within the figure. + +Multiple legend keys for legend entries +--------------------------------------- + +A legend entry can now contain more than one legend key. The extended +`~matplotlib.legend_handler.HandlerTuple` class now accepts two parameters: +``ndivide`` divides the legend area in the specified number of sections; +``pad`` changes the padding between the legend keys. + +.. figure:: /gallery/text_labels_and_annotations/images/sphx_glr_legend_demo_004.png + :target: ../gallery/text_labels_and_annotations/legend_demo.html + :align: center + :scale: 70 + + Multiple Legend Keys + + Internals +++++++++ @@ -244,12 +267,6 @@ Pending -Figure.legend() can be called without arguments ------------------------------------------------ - -Calling :meth:`.Figure.legend` can now be done with no arguments. In this case -a legend will be created that contains all the artists on all the axes -contained within the figure. New parameter `clear` for :func:`~matplotlib.pyplot.figure` @@ -329,21 +346,6 @@ specify a minimum value exponent to format as a scalar (ie. 0.001 instead of 10\ :sup:`-3`). -Multiple legend keys for legend entries ---------------------------------------- - -A legend entry can now contain more than one legend key. The extended -`~matplotlib.legend_handler.HandlerTuple` class now accepts two parameters: -``ndivide`` divides the legend area in the specified number of sections; -``pad`` changes the padding between the legend keys. - -.. figure:: /gallery/text_labels_and_annotations/images/sphx_glr_legend_demo_004.png - :target: ../gallery/text_labels_and_annotations/legend_demo.html - :align: center - :scale: 70 - - Multiple Legend Keys - Path simplification updates --------------------------- From 29470411d8f93f5b5eb595d422ada91ea04bf43f Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Sun, 1 Oct 2017 23:28:54 -0700 Subject: [PATCH 15/49] DOC: move figure clear what new --- doc/users/whats_new.rst | 68 ++++++++++++++++++++--------------------- 1 file changed, 33 insertions(+), 35 deletions(-) diff --git a/doc/users/whats_new.rst b/doc/users/whats_new.rst index 466473b2b67f..b5b5952ef0df 100644 --- a/doc/users/whats_new.rst +++ b/doc/users/whats_new.rst @@ -231,6 +231,39 @@ A legend entry can now contain more than one legend key. The extended Multiple Legend Keys +New parameter `clear` for :func:`~matplotlib.pyplot.figure` +----------------------------------------------------------- + +When the pyplot's function :func:`~matplotlib.pyplot.figure` is called +with a ``num`` parameter, a new window is only created if no existing +window with the same value exists. A new bool parameter `clear` was +added for explicitly clearing its existing contents. This is particularly +useful when utilized in interactive sessions. Since +:func:`~matplotlib.pyplot.subplots` also accepts keyword arguments +from :func:`~matplotlib.pyplot.figure`, it can also be used there:: + + import matplotlib.pyplot as plt + + fig0 = plt.figure(num=1) + fig0.suptitle("A fancy plot") + print("fig0.texts: ", [t.get_text() for t in fig0.texts]) + + fig1 = plt.figure(num=1, clear=False) # do not clear contents of window + fig1.text(0.5, 0.5, "Really fancy!") + print("fig0 is fig1: ", fig0 is fig1) + print("fig1.texts: ", [t.get_text() for t in fig1.texts]) + + fig2, ax2 = plt.subplots(2, 1, num=1, clear=True) # clear contents + print("fig0 is fig2: ", fig0 is fig2) + print("fig2.texts: ", [t.get_text() for t in fig2.texts]) + + # The output: + # fig0.texts: ['A fancy plot'] + # fig0 is fig1: True + # fig1.texts: ['A fancy plot', 'Really fancy!'] + # fig0 is fig2: True + # fig2.texts: [] + Internals +++++++++ @@ -267,41 +300,6 @@ Pending - - -New parameter `clear` for :func:`~matplotlib.pyplot.figure` ------------------------------------------------------------ - -When the pyplot's function :func:`~matplotlib.pyplot.figure` is called -with a ``num`` parameter, a new window is only created if no existing -window with the same value exists. A new bool parameter `clear` was -added for explicitly clearing its existing contents. This is particularly -useful when utilized in interactive sessions. Since -:func:`~matplotlib.pyplot.subplots` also accepts keyword arguments -from :func:`~matplotlib.pyplot.figure`, it can also be used there:: - - import matplotlib.pyplot as plt - - fig0 = plt.figure(num=1) - fig0.suptitle("A fancy plot") - print("fig0.texts: ", [t.get_text() for t in fig0.texts]) - - fig1 = plt.figure(num=1, clear=False) # do not clear contents of window - fig1.text(0.5, 0.5, "Really fancy!") - print("fig0 is fig1: ", fig0 is fig1) - print("fig1.texts: ", [t.get_text() for t in fig1.texts]) - - fig2, ax2 = plt.subplots(2, 1, num=1, clear=True) # clear contents - print("fig0 is fig2: ", fig0 is fig2) - print("fig2.texts: ", [t.get_text() for t in fig2.texts]) - - # The output: - # fig0.texts: ['A fancy plot'] - # fig0 is fig1: True - # fig1.texts: ['A fancy plot', 'Really fancy!'] - # fig0 is fig2: True - # fig2.texts: [] - AVConv writer is back --------------------- Correct a bug that prevented detection of AVconv for `matplotlib.animation`. From 48e2280f5e21c79df2c8286fa2b419ec1a3ea109 Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Sun, 1 Oct 2017 23:31:35 -0700 Subject: [PATCH 16/49] DOC: remove avconv whats new This is more of a bug fix than a new feature --- doc/users/whats_new.rst | 5 ----- 1 file changed, 5 deletions(-) diff --git a/doc/users/whats_new.rst b/doc/users/whats_new.rst index b5b5952ef0df..3470684d5b50 100644 --- a/doc/users/whats_new.rst +++ b/doc/users/whats_new.rst @@ -300,11 +300,6 @@ Pending -AVConv writer is back ---------------------- -Correct a bug that prevented detection of AVconv for `matplotlib.animation`. - - Invalid (Non-finite) Axis Limit Error ------------------------------------- From c9e5ccc58c11095ce9d8a6d94cb7e6081734d552 Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Sun, 1 Oct 2017 23:35:15 -0700 Subject: [PATCH 17/49] DOC: move non-finite axis limits whats new to api changes --- doc/api/api_changes.rst | 9 +++++++++ doc/users/whats_new.rst | 7 ------- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/doc/api/api_changes.rst b/doc/api/api_changes.rst index db4155131947..c711adc691cd 100644 --- a/doc/api/api_changes.rst +++ b/doc/api/api_changes.rst @@ -362,6 +362,15 @@ The `matplotlib.lines` module no longer imports the `pts_to_prestep`, `pts_to_midstep` and `pts_to_poststep` functions from the `matplotlib.cbook` module. +Invalid (Non-finite) Axis Limit Error +------------------------------------- + +When using :func:`~matplotlib.axes.Axes.set_xlim` and +:func:`~matplotlib.axes.Axes.set_ylim`, passing non-finite values now +results in a ``ValueError``. The previous behavior resulted in the +limits being erroneously reset to ``(-0.001, 0.001)``. + + API Changes in 2.0.1 ==================== diff --git a/doc/users/whats_new.rst b/doc/users/whats_new.rst index 3470684d5b50..b77d427cf162 100644 --- a/doc/users/whats_new.rst +++ b/doc/users/whats_new.rst @@ -300,13 +300,6 @@ Pending -Invalid (Non-finite) Axis Limit Error -------------------------------------- - -When using :func:`~matplotlib.axes.Axes.set_xlim` and -:func:`~matplotlib.axes.Axes.set_ylim`, passing non-finite values now results -in a ``ValueError``. The previous behavior resulted in the limits being -erroneously reset to ``(-0.001, 0.001)``. Metadata savefig keyword argument From 2773dae134ff7638a8b007391188d741d4e0d39f Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Sun, 1 Oct 2017 23:37:25 -0700 Subject: [PATCH 18/49] DOC: move meta-data whats new --- doc/users/whats_new.rst | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/doc/users/whats_new.rst b/doc/users/whats_new.rst index b77d427cf162..9f9b03a2b1f0 100644 --- a/doc/users/whats_new.rst +++ b/doc/users/whats_new.rst @@ -89,6 +89,26 @@ animation. This can be displayed using IPython's ``HTML`` display class:: The `~matplotlib.animation.HTMLWriter` class can also be used to generate an HTML file by asking for the ``html`` writer. +Metadata savefig keyword argument +--------------------------------- + +:func:`~matplotlib.pyplot.savefig` now accepts ``metadata`` as a keyword +argument. It can be used to store key/value pairs in the image metadata. + +Supported formats and backends +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +* 'png' with Agg backend +* 'pdf' with PDF backend (see + :func:`~matplotlib.backends.backend_pdf.PdfFile.writeInfoDict` for a list of + supported keywords) +* 'eps' and 'ps' with PS backend (only 'Creator' key is accepted) + +Example +~~~~~~~ +:: + + plt.savefig('test.png', metadata={'Software': 'My awesome software'}) + Orthographic projection for mplot3d ----------------------------------- @@ -302,26 +322,6 @@ Pending -Metadata savefig keyword argument ---------------------------------- - -:func:`~matplotlib.pyplot.savefig` now accepts ``metadata`` as a keyword -argument. It can be used to store key/value pairs in the image metadata. - -Supported formats and backends -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -* 'png' with Agg backend -* 'pdf' with PDF backend (see - :func:`~matplotlib.backends.backend_pdf.PdfFile.writeInfoDict` for a list of - supported keywords) -* 'eps' and 'ps' with PS backend (only 'Creator' key is accepted) - -Example -~~~~~~~ -:: - - plt.savefig('test.png', metadata={'Software': 'My awesome software'}) - Specify minimum value to format as scalar for ``LogFormatterMathtext`` From 0804809af0abd9ec010381a6c4dfeca649baaa81 Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Sun, 1 Oct 2017 23:39:09 -0700 Subject: [PATCH 19/49] DOC: move LogFormatterMathtext whats new --- doc/users/whats_new.rst | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/doc/users/whats_new.rst b/doc/users/whats_new.rst index 9f9b03a2b1f0..beeafccf5359 100644 --- a/doc/users/whats_new.rst +++ b/doc/users/whats_new.rst @@ -285,6 +285,15 @@ from :func:`~matplotlib.pyplot.figure`, it can also be used there:: # fig2.texts: [] +Specify minimum value to format as scalar for ``LogFormatterMathtext`` +---------------------------------------------------------------------- + +:class:`~matplotlib.ticker.LogFormatterMathtext` now includes the +option to specify a minimum value exponent to format as a scalar +(ie. 0.001 instead of 10\ :sup:`-3`). + + + Internals +++++++++ @@ -324,15 +333,6 @@ Pending -Specify minimum value to format as scalar for ``LogFormatterMathtext`` ----------------------------------------------------------------------- - -:class:`~matplotlib.ticker.LogFormatterMathtext` now includes the option to -specify a minimum value exponent to format as a scalar (ie. 0.001 instead of -10\ :sup:`-3`). - - - Path simplification updates --------------------------- From 4841e9cfe381a75330f4052b4f03886b128cb1b7 Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Sun, 1 Oct 2017 23:40:20 -0700 Subject: [PATCH 20/49] DOC: move patch simplification whats new --- doc/users/whats_new.rst | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/doc/users/whats_new.rst b/doc/users/whats_new.rst index beeafccf5359..9a11d0b16fb7 100644 --- a/doc/users/whats_new.rst +++ b/doc/users/whats_new.rst @@ -322,16 +322,8 @@ the API required by a class that is to be used as the ``writer`` in the abstract base class. - - -Pending -+++++++ - - - - - - +Performance ++++++++++++ Path simplification updates --------------------------- @@ -359,6 +351,17 @@ Matplotlib currently defaults to a conservative value of ``1/9``, smaller values are unlikely to cause any visible differences in your plots. + + +Pending ++++++++ + + + + + + + Added `matplotlib.ticker.PercentFormatter` ------------------------------------------ From b0c71ca3b15a0ba467229ab9f865b4d19fa89ba7 Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Sun, 1 Oct 2017 23:41:07 -0700 Subject: [PATCH 21/49] DOC: move PercentFormatter whats new --- doc/users/whats_new.rst | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/doc/users/whats_new.rst b/doc/users/whats_new.rst index 9a11d0b16fb7..7856ff1cc625 100644 --- a/doc/users/whats_new.rst +++ b/doc/users/whats_new.rst @@ -158,6 +158,16 @@ volumetric model. Voxel Demo +Added `matplotlib.ticker.PercentFormatter` +------------------------------------------ + +The new `~matplotlib.ticker.PercentFormatter` formatter has some nice +features like being able to convert from arbitrary data scales to +percents, a customizable percent symbol and either automatic or manual +control over the decimal points. + + + Improvements ++++++++++++ @@ -362,15 +372,6 @@ Pending -Added `matplotlib.ticker.PercentFormatter` ------------------------------------------- - -The new `~matplotlib.ticker.PercentFormatter` formatter has some nice features -like being able to convert from arbitrary data scales to percents, a -customizable percent symbol and either automatic or manual control over the -decimal points. - - New quiverkey angle keyword argument ------------------------------------ From 4570155bcc0ffd1f8b333fafc309920327f8b63a Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Sun, 1 Oct 2017 23:50:26 -0700 Subject: [PATCH 22/49] DOC: move quiverkey whats new --- doc/users/whats_new.rst | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/doc/users/whats_new.rst b/doc/users/whats_new.rst index 7856ff1cc625..05daccfca70e 100644 --- a/doc/users/whats_new.rst +++ b/doc/users/whats_new.rst @@ -303,6 +303,13 @@ option to specify a minimum value exponent to format as a scalar (ie. 0.001 instead of 10\ :sup:`-3`). +New quiverkey angle keyword argument +------------------------------------ + +Plotting a :func:`~matplotlib.axes.Axes.quiverkey` now admits the +``angle`` keyword argument, which sets the angle at which to draw the +key arrow. + Internals +++++++++ @@ -368,17 +375,6 @@ Pending - - - - -New quiverkey angle keyword argument ------------------------------------- - -Plotting a :func:`~matplotlib.axes.Axes.quiverkey` now admits the ``angle`` -keyword argument, which sets the angle at which to draw the key arrow. - - Reproducible PS, PDF and SVG output ----------------------------------- From f6331fbedfc6237a65c51d1728cc626ada5ef218 Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Sun, 1 Oct 2017 23:55:26 -0700 Subject: [PATCH 23/49] DOC: move reproducible whats new --- doc/users/whats_new.rst | 59 +++++++++++++++++++++-------------------- 1 file changed, 30 insertions(+), 29 deletions(-) diff --git a/doc/users/whats_new.rst b/doc/users/whats_new.rst index 05daccfca70e..256d3bbd2c83 100644 --- a/doc/users/whats_new.rst +++ b/doc/users/whats_new.rst @@ -167,6 +167,36 @@ percents, a customizable percent symbol and either automatic or manual control over the decimal points. +Reproducible PS, PDF and SVG output +----------------------------------- + +The ``SOURCE_DATE_EPOCH`` environment variable can now be used to set +the timestamp value in the PS and PDF outputs. See +https://reproducible-builds.org/specs/source-date-epoch/ + +Alternatively, calling ``savefig`` with ``metadata={'creationDate': None}`` +will omit the timestamp altogether. + +The reproducibility of the output from the PS and PDF backends has so +far been tested using various plot elements but only default values of +options such as ``{ps,pdf}.fonttype`` that can affect the output at a +low level, and not with the mathtext or usetex features. When +matplotlib calls external tools (such as PS distillers or LaTeX) their +versions need to be kept constant for reproducibility, and they may +add sources of nondeterminism outside the control of matplotlib. + +For SVG output, the ``svg.hashsalt`` rc parameter has been added in an +earlier release. This parameter changes some random identifiers in the +SVG file to be deterministic. The downside of this setting is that if +more than one file is generated using deterministic identifiers +and they end up as parts of one larger document, the identifiers can +collide and cause the different parts to affect each other. + +These features are now enabled in the tests for the PDF and SVG +backends, so most test output files (but not all of them) are now +deterministic. + + Improvements ++++++++++++ @@ -375,35 +405,6 @@ Pending -Reproducible PS, PDF and SVG output ------------------------------------ - -The ``SOURCE_DATE_EPOCH`` environment variable can now be used to set -the timestamp value in the PS and PDF outputs. See -https://reproducible-builds.org/specs/source-date-epoch/ - -Alternatively, calling ``savefig`` with ``metadata={'creationDate': None}`` -will omit the timestamp altogether. - -The reproducibility of the output from the PS and PDF backends has so -far been tested using various plot elements but only default values of -options such as ``{ps,pdf}.fonttype`` that can affect the output at a -low level, and not with the mathtext or usetex features. When -matplotlib calls external tools (such as PS distillers or LaTeX) their -versions need to be kept constant for reproducibility, and they may -add sources of nondeterminism outside the control of matplotlib. - -For SVG output, the ``svg.hashsalt`` rc parameter has been added in an -earlier release. This parameter changes some random identifiers in the -SVG file to be deterministic. The downside of this setting is that if -more than one file is generated using deterministic identifiers -and they end up as parts of one larger document, the identifiers can -collide and cause the different parts to affect each other. - -These features are now enabled in the tests for the PDF and SVG -backends, so most test output files (but not all of them) are now -deterministic. - Colormap reversed method ------------------------ From 9690898dd544f70fb85139dd29a7e097b2f50133 Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Mon, 2 Oct 2017 00:06:47 -0700 Subject: [PATCH 24/49] DOC: move collection scatter flattening docs to api changes --- doc/api/api_changes.rst | 8 ++++++++ doc/users/whats_new.rst | 11 ----------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/doc/api/api_changes.rst b/doc/api/api_changes.rst index c711adc691cd..f4ccaced6b61 100644 --- a/doc/api/api_changes.rst +++ b/doc/api/api_changes.rst @@ -370,6 +370,14 @@ When using :func:`~matplotlib.axes.Axes.set_xlim` and results in a ``ValueError``. The previous behavior resulted in the limits being erroneously reset to ``(-0.001, 0.001)``. +`scatter` and `Collection` offsets are no longer implicitly flattened +--------------------------------------------------------------------- + +`~matplotlib.collections.Collection` (and thus both 2D +`~matplotlib.axes.Axes.scatter` and 3D +`~mpl_toolkits.mplot3d.axes3d.Axes3D.scatter`) no +longer implicitly flattens its offsets. As a consequence, ``scatter``'s ``x`` +and ``y`` arguments can no longer be 2+-dimensional arrays. API Changes in 2.0.1 diff --git a/doc/users/whats_new.rst b/doc/users/whats_new.rst index 256d3bbd2c83..c08dd77c4419 100644 --- a/doc/users/whats_new.rst +++ b/doc/users/whats_new.rst @@ -414,17 +414,6 @@ The methods :meth:`~matplotlib.colors.LinearSegmentedColormap.reversed` and instance of the Colormap. This implements a way for any Colormap to be reversed. - -`Collection` offsets are no longer implicitly flattened -------------------------------------------------------- - -`~matplotlib.collections.Collection` (and thus both 2D -`~matplotlib.axes.Axes.scatter` and 3D -`~mpl_toolkits.mplot3d.axes3d.Axes3D.scatter`) no -longer implicitly flattens its offsets. As a consequence, ``scatter``'s ``x`` -and ``y`` arguments can no longer be 2+-dimensional arrays. - - `Artist.setp` (and `pyplot.setp`) accept a `file` argument ---------------------------------------------------------- From 5fb27d15c8711075f72023dc9cda75cfcb3c986c Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Mon, 2 Oct 2017 00:08:21 -0700 Subject: [PATCH 25/49] DOC: move colorbare reversed whats new --- doc/users/whats_new.rst | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/doc/users/whats_new.rst b/doc/users/whats_new.rst index c08dd77c4419..134e4c191f91 100644 --- a/doc/users/whats_new.rst +++ b/doc/users/whats_new.rst @@ -340,6 +340,14 @@ Plotting a :func:`~matplotlib.axes.Axes.quiverkey` now admits the ``angle`` keyword argument, which sets the angle at which to draw the key arrow. +Colormap reversed method +------------------------ + +The methods :meth:`~matplotlib.colors.LinearSegmentedColormap.reversed` and +:meth:`~matplotlib.colors.ListedColormap.reversed` return a reversed +instance of the Colormap. This implements a way for any Colormap to be +reversed. + Internals +++++++++ @@ -406,14 +414,6 @@ Pending -Colormap reversed method ------------------------- - -The methods :meth:`~matplotlib.colors.LinearSegmentedColormap.reversed` and -:meth:`~matplotlib.colors.ListedColormap.reversed` return a reversed -instance of the Colormap. This implements a way for any Colormap to be -reversed. - `Artist.setp` (and `pyplot.setp`) accept a `file` argument ---------------------------------------------------------- From 6652dc77c7d8f50401d85f8b310bff127eecdac2 Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Mon, 2 Oct 2017 00:10:24 -0700 Subject: [PATCH 26/49] DOC: move setp whats new --- doc/users/whats_new.rst | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/doc/users/whats_new.rst b/doc/users/whats_new.rst index 134e4c191f91..da7130a6a82b 100644 --- a/doc/users/whats_new.rst +++ b/doc/users/whats_new.rst @@ -349,6 +349,15 @@ instance of the Colormap. This implements a way for any Colormap to be reversed. +`Artist.setp` (and `pyplot.setp`) accept a ``file`` argument +------------------------------------------------------------ + +The argument is keyword-only. It allows an output file other than +`sys.stdout` to be specified. It works exactly like the ``file`` argument +to `print`. + + + Internals +++++++++ @@ -414,14 +423,6 @@ Pending -`Artist.setp` (and `pyplot.setp`) accept a `file` argument ----------------------------------------------------------- - -The argument is keyword-only. It allows an output file other than -`sys.stdout` to be specified. It works exactly like the ``file`` argument -to `print`. - - Maximum streamline length and integration direction can now be specified ------------------------------------------------------------------------ From 92a4835ff11ea029576949fb12dd60bca387b4a4 Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Mon, 2 Oct 2017 00:14:13 -0700 Subject: [PATCH 27/49] DOC: move and expand streamplot whats new --- doc/users/whats_new.rst | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/doc/users/whats_new.rst b/doc/users/whats_new.rst index da7130a6a82b..bca773fc342c 100644 --- a/doc/users/whats_new.rst +++ b/doc/users/whats_new.rst @@ -357,6 +357,14 @@ The argument is keyword-only. It allows an output file other than to `print`. +``streamplot`` streamline generation more configurable +------------------------------------------------------ + +The starting point, direction, and length of the stream lines can now +be configured. This allows to follow the vector field for a longer +time and can enhance the visibility of the flow pattern in some use +cases. + Internals +++++++++ @@ -424,12 +432,6 @@ Pending -Maximum streamline length and integration direction can now be specified ------------------------------------------------------------------------- - -This allows to follow the vector field for a longer time and can enhance the -visibility of the flow pattern in some use cases. - `Axis.set_tick_params` now responds to 'rotation' ------------------------------------------------- From 9adf3d9b77df4b681101a8dd10edf2ecc1cf9933 Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Mon, 2 Oct 2017 00:15:00 -0700 Subject: [PATCH 28/49] DOC: move tick_params rotation whats new --- doc/users/whats_new.rst | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/doc/users/whats_new.rst b/doc/users/whats_new.rst index bca773fc342c..206fb2eab68a 100644 --- a/doc/users/whats_new.rst +++ b/doc/users/whats_new.rst @@ -366,6 +366,19 @@ time and can enhance the visibility of the flow pattern in some use cases. +`Axis.set_tick_params` now responds to ``rotation`` +--------------------------------------------------- + +Bulk setting of tick label rotation is now possible via +:func:`~matplotlib.axis.Axis.set_tick_params` using the ``rotation`` keyword. + +Example +~~~~~~~ +:: + + ax.xaxis.set_tick_params(which='both', rotation=90) + + Internals +++++++++ @@ -429,22 +442,6 @@ Pending +++++++ - - - - -`Axis.set_tick_params` now responds to 'rotation' -------------------------------------------------- - -Bulk setting of tick label rotation is now possible via -:func:`~matplotlib.axis.Axis.set_tick_params` using the ``rotation`` keyword. - -Example -~~~~~~~ -:: - - ax.xaxis.set_tick_params(which='both', rotation=90) - Users can now toggle shading in 3D bar plots -------------------------------------------- From 28afbf61d1735a1e97b78a9bdb1f0267d37176a3 Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Mon, 2 Oct 2017 00:20:51 -0700 Subject: [PATCH 29/49] DOC: move shaded 3D bar whats new docs --- doc/users/whats_new.rst | 73 ++++++++++++++++++++--------------------- 1 file changed, 36 insertions(+), 37 deletions(-) diff --git a/doc/users/whats_new.rst b/doc/users/whats_new.rst index 206fb2eab68a..d33049271470 100644 --- a/doc/users/whats_new.rst +++ b/doc/users/whats_new.rst @@ -379,6 +379,42 @@ Example ax.xaxis.set_tick_params(which='both', rotation=90) +Users can now toggle shading in 3D bar plots +-------------------------------------------- + +A new ``shade`` parameter has been added the 3D +`~mpl_toolkits.mplot3d.axes3d.Axes3D.bar` plotting method. The default behavior +remains to shade the bars, but now users have the option of setting ``shade`` +to ``False``. + + +Example +~~~~~~~ +.. plot:: + :include-source: + :align: center + + import numpy as np + import matplotlib.pyplot as plt + from mpl_toolkits.mplot3d import Axes3D + + x = np.arange(2) + y = np.arange(3) + x2d, y2d = np.meshgrid(x, y) + x, y = x2d.ravel(), y2d.ravel() + z = np.zeros_like(x) + dz = x + y + + fig = plt.figure(figsize=(4, 6)) + ax1 = fig.add_subplot(2, 1, 1, projection='3d') + ax1.bar3d(x, y, z, 1, 1, dz, shade=True) + ax1.set_title('Shading On') + + ax2 = fig.add_subplot(2, 1, 2, projection='3d') + ax2.bar3d(x, y, z, 1, 1, dz, shade=False) + ax2.set_title('Shading Off') + + plt.show() Internals +++++++++ @@ -442,43 +478,6 @@ Pending +++++++ -Users can now toggle shading in 3D bar plots --------------------------------------------- - -A new ``shade`` parameter has been added the 3D -`~mpl_toolkits.mplot3d.axes3d.Axes3D.bar` plotting method. The default behavior -remains to shade the bars, but now users have the option of setting ``shade`` -to ``False``. - - -Example -~~~~~~~ -.. plot:: - :include-source: - :align: center - - import numpy as np - import matplotlib.pyplot as plt - from mpl_toolkits.mplot3d import Axes3D - - x = np.arange(2) - y = np.arange(3) - x2d, y2d = np.meshgrid(x, y) - x, y = x2d.ravel(), y2d.ravel() - z = np.zeros_like(x) - dz = x + y - - fig = plt.figure(figsize=(4, 6)) - ax1 = fig.add_subplot(2, 1, 1, projection='3d') - ax1.bar3d(x, y, z, 1, 1, dz, shade=True) - ax1.set_title('Shading On') - - ax2 = fig.add_subplot(2, 1, 2, projection='3d') - ax2.bar3d(x, y, z, 1, 1, dz, shade=False) - ax2.set_title('Shading Off') - - plt.show() - New which Parameter for autofmt_xdate ------------------------------------- From 1b6326de135465014017b0b7a5c08a2d8d33ed9f Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Mon, 2 Oct 2017 00:22:41 -0700 Subject: [PATCH 30/49] DOC: move autofmt_xdata whats new --- doc/users/whats_new.rst | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/doc/users/whats_new.rst b/doc/users/whats_new.rst index d33049271470..8304f2a30a83 100644 --- a/doc/users/whats_new.rst +++ b/doc/users/whats_new.rst @@ -415,6 +415,25 @@ Example ax2.set_title('Shading Off') plt.show() + + +New which Parameter for ``autofmt_xdate`` +----------------------------------------- + +A ``which`` parameter now exists for the method +:func:`~matplotlib.figure.Figure.autofmt_xdate`. This allows a user to format +``major``, ``minor`` or ``both`` tick labels selectively. If ``which`` is +``None`` (default) then the method will rotate ``major`` tick labels. + +Example +~~~~~~~ +:: + + fig.autofmt_xdate(bottom=0.2, rotation=30, ha='right', which='minor') + + + + Internals +++++++++ @@ -479,21 +498,6 @@ Pending -New which Parameter for autofmt_xdate -------------------------------------- - -A ``which`` parameter now exists for the method -:func:`~matplotlib.figure.Figure.autofmt_xdate`. This allows a user to format -``major``, ``minor`` or ``both`` tick labels selectively. If ``which`` is -``None`` (default) then the method will rotate ``major`` tick labels. - -Example -~~~~~~~ -:: - - fig.autofmt_xdate(bottom=0.2, rotation=30, ha='right', which='minor') - - New Figure Parameter for subplot2grid ------------------------------------- From 429f96160836fe73fbd3118e1bd8a783d6397138 Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Mon, 2 Oct 2017 00:27:33 -0700 Subject: [PATCH 31/49] DOC: move subplot2grid whats new --- doc/users/whats_new.rst | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/doc/users/whats_new.rst b/doc/users/whats_new.rst index 8304f2a30a83..25ba55df17c4 100644 --- a/doc/users/whats_new.rst +++ b/doc/users/whats_new.rst @@ -432,6 +432,21 @@ Example fig.autofmt_xdate(bottom=0.2, rotation=30, ha='right', which='minor') +New Figure Parameter for subplot2grid +------------------------------------- + +A ``fig`` parameter now exists for the function +:func:`~matplotlib.pyplot.subplot2grid`. This allows a user to specify the +figure where the subplots will be created. If ``fig`` is ``None`` (default) +then the method will use the current figure retrieved by +:func:`~matplotlib.pyplot.gcf`. + +Example +~~~~~~~ +:: + + subplot2grid(shape, loc, rowspan=1, colspan=1, fig=myfig) + Internals @@ -498,21 +513,6 @@ Pending -New Figure Parameter for subplot2grid -------------------------------------- - -A ``fig`` parameter now exists for the function -:func:`~matplotlib.pyplot.subplot2grid`. This allows a user to specify the -figure where the subplots will be created. If ``fig`` is ``None`` (default) -then the method will use the current figure retrieved by -:func:`~matplotlib.pyplot.gcf`. - -Example -~~~~~~~ -:: - - subplot2grid(shape, loc, rowspan=1, colspan=1, fig=myfig) - Interpolation in fill_betweenx ------------------------------ From bf6f80192ebeea84bf24ce5a1c4d7f1588aead36 Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Mon, 2 Oct 2017 00:28:40 -0700 Subject: [PATCH 32/49] DOC: hove fill_betweenx whats new --- doc/users/whats_new.rst | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/doc/users/whats_new.rst b/doc/users/whats_new.rst index 25ba55df17c4..797bb7fb22c8 100644 --- a/doc/users/whats_new.rst +++ b/doc/users/whats_new.rst @@ -448,6 +448,14 @@ Example subplot2grid(shape, loc, rowspan=1, colspan=1, fig=myfig) +Interpolation in ``fill_betweenx`` +---------------------------------- + +The ``interpolate`` parameter now exists for the method +:func:`~matplotlib.axes.Axes.fill_betweenx`. This allows a user to +interpolate the data and fill the areas in the crossover points, +similarly to :func:`~matplotlib.axes.Axes.fill_between`. + Internals +++++++++ @@ -511,18 +519,6 @@ values are unlikely to cause any visible differences in your plots. Pending +++++++ - - - -Interpolation in fill_betweenx ------------------------------- - -The ``interpolate`` parameter now exists for the method -:func:`~matplotlib.axes.Axes.fill_betweenx`. This allows a user to interpolate -the data and fill the areas in the crossover points, similarly to -:func:`~matplotlib.axes.Axes.fill_between`. - - Validation of line style rcParams --------------------------------- From 973143885f8126f546b76daf62b3930526a6b78a Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Mon, 2 Oct 2017 00:29:27 -0700 Subject: [PATCH 33/49] DOC: hove rcParams validation whats new --- doc/users/whats_new.rst | 64 ++++++++++++++++++++--------------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/doc/users/whats_new.rst b/doc/users/whats_new.rst index 797bb7fb22c8..84f6a4a841b6 100644 --- a/doc/users/whats_new.rst +++ b/doc/users/whats_new.rst @@ -484,6 +484,38 @@ the API required by a class that is to be used as the ``writer`` in the :class:`~matplotlib.animation.MovieWriter` class now derives from the new abstract base class. +Validation of line style rcParams +--------------------------------- + +Stricter validation +~~~~~~~~~~~~~~~~~~~ +The validation of rcParams that are related to line styles +(``lines.linestyle``, ``boxplot.*.linestyle``, ``grid.linestyle`` and +``contour.negative_linestyle``) now effectively checks that the values +are valid line styles. Strings like ``dashed`` or ``--`` are accepted, +as well as even-length sequences of on-off ink like ``[1, 1.65]``. In +this latter case, the offset value is handled internally and should *not* +be provided by the user. + +The validation is case-insensitive. + +Deprecation of the former validators for ``contour.negative_linestyle`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +The new validation scheme replaces the former one used for the +``contour.negative_linestyle`` rcParams, that was limited to ``solid`` +and ``dashed`` line styles. + +The former public validation functions ``validate_negative_linestyle`` +and ``validate_negative_linestyle_legacy`` will be deprecated in 2.1 and +may be removed in 2.3. There are no public functions to replace them. + +Examples of use +~~~~~~~~~~~~~~~ +:: + + grid.linestyle : (1, 3) # loosely dotted grid lines + contour.negative_linestyle : dashdot # previously only solid or dashed + Performance +++++++++++ @@ -519,38 +551,6 @@ values are unlikely to cause any visible differences in your plots. Pending +++++++ -Validation of line style rcParams ---------------------------------- - -Stricter validation -~~~~~~~~~~~~~~~~~~~ -The validation of rcParams that are related to line styles -(``lines.linestyle``, ``boxplot.*.linestyle``, ``grid.linestyle`` and -``contour.negative_linestyle``) now effectively checks that the values -are valid line styles. Strings like ``dashed`` or ``--`` are accepted, -as well as even-length sequences of on-off ink like ``[1, 1.65]``. In -this latter case, the offset value is handled internally and should *not* -be provided by the user. - -The validation is case-insensitive. - -Deprecation of the former validators for ``contour.negative_linestyle`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The new validation scheme replaces the former one used for the -``contour.negative_linestyle`` rcParams, that was limited to ``solid`` -and ``dashed`` line styles. - -The former public validation functions ``validate_negative_linestyle`` -and ``validate_negative_linestyle_legacy`` will be deprecated in 2.1 and -may be removed in 2.3. There are no public functions to replace them. - -Examples of use -~~~~~~~~~~~~~~~ -:: - - grid.linestyle : (1, 3) # loosely dotted grid lines - contour.negative_linestyle : dashdot # previously only solid or dashed - New keyword argument 'sep' for EngFormatter ------------------------------------------- From f81ec161f4da9d6922b2b338a84619d8dfa63f94 Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Mon, 2 Oct 2017 00:30:21 -0700 Subject: [PATCH 34/49] DOC: move EngFormatter whats new --- doc/users/whats_new.rst | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/doc/users/whats_new.rst b/doc/users/whats_new.rst index 84f6a4a841b6..41cf3e2f2ea4 100644 --- a/doc/users/whats_new.rst +++ b/doc/users/whats_new.rst @@ -457,6 +457,19 @@ interpolate the data and fill the areas in the crossover points, similarly to :func:`~matplotlib.axes.Axes.fill_between`. +New keyword argument ``sep`` for EngFormatter +--------------------------------------------- + +A new ``sep`` keyword argument has been added to +:class:`~matplotlib.ticker.EngFormatter` and provides a means to +define the string that will be used between the value and its +unit. The default string is " ", which preserves the former +behavior. Additionally, the separator is now present between the value +and its unit even in the absence of SI prefix. There was formerly a +bug that was causing strings like "3.14V" to be returned instead of +the expected "3.14 V" (with the default behavior). + + Internals +++++++++ @@ -552,16 +565,6 @@ Pending +++++++ -New keyword argument 'sep' for EngFormatter -------------------------------------------- - -A new "sep" keyword argument has been added to -:class:`~matplotlib.ticker.EngFormatter` and provides a means to define -the string that will be used between the value and its unit. The default -string is " ", which preserves the former behavior. Additionally, the separator -is now present between the value and its unit even in the absence of SI prefix. -There was formerly a bug that was causing strings like "3.14V" to be returned -instead of the expected "3.14 V" (with the default behavior). Previous Whats New From 266f0c038e002bd1abed18852bdc0a150e405a2d Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Mon, 2 Oct 2017 00:31:37 -0700 Subject: [PATCH 35/49] DOC: remove temporary heading --- doc/users/whats_new.rst | 7 ------- 1 file changed, 7 deletions(-) diff --git a/doc/users/whats_new.rst b/doc/users/whats_new.rst index 41cf3e2f2ea4..742e9b2096a4 100644 --- a/doc/users/whats_new.rst +++ b/doc/users/whats_new.rst @@ -560,13 +560,6 @@ values are unlikely to cause any visible differences in your plots. - -Pending -+++++++ - - - - Previous Whats New ================== From 6f273172c54d4b41a9b2fbdc578ab053b06ffbcc Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Mon, 2 Oct 2017 01:12:51 -0700 Subject: [PATCH 36/49] DOC: document changing font cache to json --- doc/api/api_changes.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/api/api_changes.rst b/doc/api/api_changes.rst index f4ccaced6b61..ae9681e4821e 100644 --- a/doc/api/api_changes.rst +++ b/doc/api/api_changes.rst @@ -290,6 +290,10 @@ now uses 'mask' as the default method to handle invalid values (as opposed to Previously they were clipped to a very small number and shown. +Font cache as json +------------------ + +The font cache is now saved as json, rather than a pickle. Code Removal ------------ From 88894a95185a3cbc14a4ded1ef74818e3efc6b9a Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Mon, 2 Oct 2017 01:57:16 -0700 Subject: [PATCH 37/49] DOC: add stub sections --- doc/users/whats_new.rst | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/doc/users/whats_new.rst b/doc/users/whats_new.rst index 742e9b2096a4..25d505e8f463 100644 --- a/doc/users/whats_new.rst +++ b/doc/users/whats_new.rst @@ -27,6 +27,11 @@ New in Matplotlib 2.1 New features ++++++++++++ +String categorical values +------------------------- + +TODO + Enhancements to polar plot -------------------------- @@ -197,6 +202,11 @@ backends, so most test output files (but not all of them) are now deterministic. +``Axes`` class now has ``subplots`` method +------------------------------------------ + +TODO WRITE THIS + Improvements ++++++++++++ @@ -469,6 +479,21 @@ and its unit even in the absence of SI prefix. There was formerly a bug that was causing strings like "3.14V" to be returned instead of the expected "3.14 V" (with the default behavior). +Extend ``MATPLOTLIBRC`` behavior +-------------------------------- + +The environmental variable can now specify the full file path or path +to find :file:`matplotlibrc` in. + +Improvements to Qt plot options +------------------------------- + +TODO write + +Added style sheets +------------------ + +TODO write Internals +++++++++ @@ -529,6 +554,10 @@ Examples of use grid.linestyle : (1, 3) # loosely dotted grid lines contour.negative_linestyle : dashdot # previously only solid or dashed +pytest +------ + +The automated tests have been switched from `nose` to `pytest`. Performance +++++++++++ From 3a588996bcae3970fa0a30fdd92e3041b3f754cf Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Mon, 2 Oct 2017 12:50:32 -0700 Subject: [PATCH 38/49] DOC: fix headline --- doc/users/whats_new.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/users/whats_new.rst b/doc/users/whats_new.rst index 25d505e8f463..74b9b8e94dd3 100644 --- a/doc/users/whats_new.rst +++ b/doc/users/whats_new.rst @@ -202,8 +202,8 @@ backends, so most test output files (but not all of them) are now deterministic. -``Axes`` class now has ``subplots`` method ------------------------------------------- +``Figure`` class now has ``subplots`` method +-------------------------------------------- TODO WRITE THIS From 5a15e2a3e268815924e726821e248e8191952003 Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Wed, 4 Oct 2017 01:35:12 -0700 Subject: [PATCH 39/49] DOC: fill in remaining whats new entries --- doc/users/whats_new.rst | 176 +++++++++++++++++++++++++--------------- 1 file changed, 111 insertions(+), 65 deletions(-) diff --git a/doc/users/whats_new.rst b/doc/users/whats_new.rst index 74b9b8e94dd3..0c0bfda9bc99 100644 --- a/doc/users/whats_new.rst +++ b/doc/users/whats_new.rst @@ -24,13 +24,53 @@ revision, see the :ref:`github-stats`. New in Matplotlib 2.1 ===================== +Documentation ++++++++++++++ + +The examples have been migrated to use sphinx gallery. This allows +better mixing of prose and code in the examples, provides links to +download the examples as both a python script and a Jupyter notebook, +and improves the thumbnail galleries. The examples have been +re-organized into :ref:`tutorials` and a :ref:`gallery`. + +Many docstrings and examples have been clarified and improved. + + New features ++++++++++++ String categorical values ------------------------- -TODO +All plotting functions now support string categorical values as input. +For example: + +.. plot:: + :include-source: + :align: center + + data = {'apples':10, 'oranges':15, 'lemons':5, 'limes':20} + fig, ax = plt.subplots() + ax.bar(data.keys(), data.values(), color='lightgray') + + +Interactive JS widgets for animation +------------------------------------ + +Jake Vanderplas' JSAnimation package has been merged into matplotlib. This +adds to matplotlib the `~matplotlib.animation.HTMLWriter` class for +generating a javascript HTML animation, suitable for the IPython notebook. +This can be activated by default by setting the ``animation.html`` rc +parameter to ``jshtml``. One can also call the +`~matplotlib.animation.Animation.to_jshtml` method to manually convert an +animation. This can be displayed using IPython's ``HTML`` display class:: + + from IPython.display import HTML + HTML(animation.to_jshtml()) + +The `~matplotlib.animation.HTMLWriter` class can also be used to generate +an HTML file by asking for the ``html`` writer. + Enhancements to polar plot -------------------------- @@ -77,22 +117,14 @@ be useful to rotate tick *labels* to match the boundary. Calling labels will be parallel to the circular grid line, and angular tick labels will be perpendicular to the grid line (i.e., parallel to the outer boundary.) -Interactive JS widgets for animation ------------------------------------- -Jake Vanderplas' JSAnimation package has been merged into matplotlib. This -adds to matplotlib the `~matplotlib.animation.HTMLWriter` class for -generating a javascript HTML animation, suitable for the IPython notebook. -This can be activated by default by setting the ``animation.html`` rc -parameter to ``jshtml``. One can also call the -`~matplotlib.animation.Animation.to_jshtml` method to manually convert an -animation. This can be displayed using IPython's ``HTML`` display class:: +``Figure`` class now has ``subplots`` method +-------------------------------------------- - from IPython.display import HTML - HTML(animation.to_jshtml()) +The :class:`~matplotlib.figure.Figure` class now has a +:meth:`~matplotlib.figure.Figure.subplots` method which behaves the same as +:func:`.pyplot.subplots` but on an existing figure. -The `~matplotlib.animation.HTMLWriter` class can also be used to generate -an HTML file by asking for the ``html`` writer. Metadata savefig keyword argument --------------------------------- @@ -115,6 +147,58 @@ Example plt.savefig('test.png', metadata={'Software': 'My awesome software'}) +Busy Cursor +----------- + +The interactive GUI backends will now change the cursor to busy when +Matplotlib is rendering the canvas. + +PolygonSelector +--------------- + +A :class:`~matplotlib.widgets.PolygonSelector` class has been added to +:mod:`matplotlib.widgets`. See +:ref:`sphx_glr_gallery_widgets_polygon_selector_demo.py` for details. + + +Added `matplotlib.ticker.PercentFormatter` +------------------------------------------ + +The new `~matplotlib.ticker.PercentFormatter` formatter has some nice +features like being able to convert from arbitrary data scales to +percents, a customizable percent symbol and either automatic or manual +control over the decimal points. + + +Reproducible PS, PDF and SVG output +----------------------------------- + +The ``SOURCE_DATE_EPOCH`` environment variable can now be used to set +the timestamp value in the PS and PDF outputs. See +https://reproducible-builds.org/specs/source-date-epoch/ + +Alternatively, calling ``savefig`` with ``metadata={'creationDate': None}`` +will omit the timestamp altogether. + +The reproducibility of the output from the PS and PDF backends has so +far been tested using various plot elements but only default values of +options such as ``{ps,pdf}.fonttype`` that can affect the output at a +low level, and not with the mathtext or usetex features. When +matplotlib calls external tools (such as PS distillers or LaTeX) their +versions need to be kept constant for reproducibility, and they may +add sources of nondeterminism outside the control of matplotlib. + +For SVG output, the ``svg.hashsalt`` rc parameter has been added in an +earlier release. This parameter changes some random identifiers in the +SVG file to be deterministic. The downside of this setting is that if +more than one file is generated using deterministic identifiers +and they end up as parts of one larger document, the identifiers can +collide and cause the different parts to affect each other. + +These features are now enabled in the tests for the PDF and SVG +backends, so most test output files (but not all of them) are now +deterministic. + Orthographic projection for mplot3d ----------------------------------- :class:`~mpl_toolkits.mplot3d.axes3d.Axes3D` now accepts ``proj_type`` keyword @@ -163,51 +247,6 @@ volumetric model. Voxel Demo -Added `matplotlib.ticker.PercentFormatter` ------------------------------------------- - -The new `~matplotlib.ticker.PercentFormatter` formatter has some nice -features like being able to convert from arbitrary data scales to -percents, a customizable percent symbol and either automatic or manual -control over the decimal points. - - -Reproducible PS, PDF and SVG output ------------------------------------ - -The ``SOURCE_DATE_EPOCH`` environment variable can now be used to set -the timestamp value in the PS and PDF outputs. See -https://reproducible-builds.org/specs/source-date-epoch/ - -Alternatively, calling ``savefig`` with ``metadata={'creationDate': None}`` -will omit the timestamp altogether. - -The reproducibility of the output from the PS and PDF backends has so -far been tested using various plot elements but only default values of -options such as ``{ps,pdf}.fonttype`` that can affect the output at a -low level, and not with the mathtext or usetex features. When -matplotlib calls external tools (such as PS distillers or LaTeX) their -versions need to be kept constant for reproducibility, and they may -add sources of nondeterminism outside the control of matplotlib. - -For SVG output, the ``svg.hashsalt`` rc parameter has been added in an -earlier release. This parameter changes some random identifiers in the -SVG file to be deterministic. The downside of this setting is that if -more than one file is generated using deterministic identifiers -and they end up as parts of one larger document, the identifiers can -collide and cause the different parts to affect each other. - -These features are now enabled in the tests for the PDF and SVG -backends, so most test output files (but not all of them) are now -deterministic. - - -``Figure`` class now has ``subplots`` method --------------------------------------------- - -TODO WRITE THIS - - Improvements ++++++++++++ @@ -485,15 +524,17 @@ Extend ``MATPLOTLIBRC`` behavior The environmental variable can now specify the full file path or path to find :file:`matplotlibrc` in. -Improvements to Qt plot options -------------------------------- -TODO write +``density`` kwarg to hist +------------------------- + +The :meth:`~matplotlib.axes.Axes.hist` method now prefers ``density`` +to ``normed`` to control if the histogram should be normalized, +following a change upstream to numpy. This will reduce confusion as +the behavior has always been that the integral of the histogram is 1 +(rather than sum or maximum value). -Added style sheets ------------------- -TODO write Internals +++++++++ @@ -587,6 +628,11 @@ set ``path.simplify`` to false and/or ``path.simplify_threshold`` to ``0``. Matplotlib currently defaults to a conservative value of ``1/9``, smaller values are unlikely to cause any visible differences in your plots. +Implement intersects_bbox in c++ +-------------------------------- + +:meth:`~matplotlib.path.Path.intersects_bbox` has been implemented in +c++ which improves the performance of automatically placing the legend. Previous Whats New From 7b583149c19c01d07aef9196f80ac7b8a8dafc23 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Thu, 5 Oct 2017 04:22:30 -0400 Subject: [PATCH 40/49] DOC: Fix minor capitalization issues. --- doc/api/api_changes.rst | 4 ++-- doc/users/whats_new.rst | 18 +++++++++--------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/doc/api/api_changes.rst b/doc/api/api_changes.rst index ae9681e4821e..6ee1fe52ef28 100644 --- a/doc/api/api_changes.rst +++ b/doc/api/api_changes.rst @@ -45,7 +45,7 @@ Passing a string as *num* argument when calling an instance of `matplotlib.ticker.EngFormatter` is deprecated and will be removed in 2.3. -:meth:`matpltolib.cbook.CallbackRegistry.process` suppresses exceptions by default +:meth:`matplotlib.cbook.CallbackRegistry.process` suppresses exceptions by default ---------------------------------------------------------------------------------- Matplotlib uses instances of :obj:`~matplotlib.cbook.CallbackRegistry` @@ -126,7 +126,7 @@ binary file is acceptable, we suggest using one of the following two new files. The ``aapl.npy.gz`` and ``goog.npy`` files have been replaced by ``aapl.npz`` and ``goog.npz``, wherein the first column's type has changed from `datetime.date` to `np.datetime64` for better portability across Python -versions. Note that matplotlib does not fully support `np.datetime64` as yet. +versions. Note that Matplotlib does not fully support `np.datetime64` as yet. Updated qhull to 2015.2 diff --git a/doc/users/whats_new.rst b/doc/users/whats_new.rst index 0c0bfda9bc99..f1f38c41ad45 100644 --- a/doc/users/whats_new.rst +++ b/doc/users/whats_new.rst @@ -1,7 +1,7 @@ .. _whats-new: ========================== - What's new in matplotlib + What's new in Matplotlib ========================== For a list of all of the issues and pull requests since the last @@ -29,7 +29,7 @@ Documentation The examples have been migrated to use sphinx gallery. This allows better mixing of prose and code in the examples, provides links to -download the examples as both a python script and a Jupyter notebook, +download the examples as both a Python script and a Jupyter notebook, and improves the thumbnail galleries. The examples have been re-organized into :ref:`tutorials` and a :ref:`gallery`. @@ -57,9 +57,9 @@ For example: Interactive JS widgets for animation ------------------------------------ -Jake Vanderplas' JSAnimation package has been merged into matplotlib. This -adds to matplotlib the `~matplotlib.animation.HTMLWriter` class for -generating a javascript HTML animation, suitable for the IPython notebook. +Jake Vanderplas' JSAnimation package has been merged into Matplotlib. This +adds to Matplotlib the `~matplotlib.animation.HTMLWriter` class for +generating a JavaScript HTML animation, suitable for the IPython notebook. This can be activated by default by setting the ``animation.html`` rc parameter to ``jshtml``. One can also call the `~matplotlib.animation.Animation.to_jshtml` method to manually convert an @@ -184,9 +184,9 @@ The reproducibility of the output from the PS and PDF backends has so far been tested using various plot elements but only default values of options such as ``{ps,pdf}.fonttype`` that can affect the output at a low level, and not with the mathtext or usetex features. When -matplotlib calls external tools (such as PS distillers or LaTeX) their +Matplotlib calls external tools (such as PS distillers or LaTeX) their versions need to be kept constant for reproducibility, and they may -add sources of nondeterminism outside the control of matplotlib. +add sources of nondeterminism outside the control of Matplotlib. For SVG output, the ``svg.hashsalt`` rc parameter has been added in an earlier release. This parameter changes some random identifiers in the @@ -379,7 +379,7 @@ Specify minimum value to format as scalar for ``LogFormatterMathtext`` :class:`~matplotlib.ticker.LogFormatterMathtext` now includes the option to specify a minimum value exponent to format as a scalar -(ie. 0.001 instead of 10\ :sup:`-3`). +(i.e., 0.001 instead of 10\ :sup:`-3`). New quiverkey angle keyword argument @@ -530,7 +530,7 @@ to find :file:`matplotlibrc` in. The :meth:`~matplotlib.axes.Axes.hist` method now prefers ``density`` to ``normed`` to control if the histogram should be normalized, -following a change upstream to numpy. This will reduce confusion as +following a change upstream to NumPy. This will reduce confusion as the behavior has always been that the integral of the histogram is 1 (rather than sum or maximum value). From 6d89c855f3e94a14bc36963bf4cd472d7f256219 Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Fri, 6 Oct 2017 19:44:36 -0400 Subject: [PATCH 41/49] DOC: respond to review comments --- doc/api/api_changes.rst | 18 +++++++++-- doc/users/whats_new.rst | 72 +++++++++++++++++------------------------ 2 files changed, 46 insertions(+), 44 deletions(-) diff --git a/doc/api/api_changes.rst b/doc/api/api_changes.rst index 6ee1fe52ef28..faf7da8ce8dd 100644 --- a/doc/api/api_changes.rst +++ b/doc/api/api_changes.rst @@ -374,8 +374,8 @@ When using :func:`~matplotlib.axes.Axes.set_xlim` and results in a ``ValueError``. The previous behavior resulted in the limits being erroneously reset to ``(-0.001, 0.001)``. -`scatter` and `Collection` offsets are no longer implicitly flattened ---------------------------------------------------------------------- +``scatter`` and ``Collection`` offsets are no longer implicitly flattened +------------------------------------------------------------------------- `~matplotlib.collections.Collection` (and thus both 2D `~matplotlib.axes.Axes.scatter` and 3D @@ -384,6 +384,20 @@ longer implicitly flattens its offsets. As a consequence, ``scatter``'s ``x`` and ``y`` arguments can no longer be 2+-dimensional arrays. +Deprecation of the former validators for ``contour.negative_linestyle`` +----------------------------------------------------------------------- + + +The former public validation functions ``validate_negative_linestyle`` +and ``validate_negative_linestyle_legacy`` will be deprecated in 2.1 and +may be removed in 2.3. There are no public functions to replace them. + +:: + + grid.linestyle : (1, 3) # loosely dotted grid lines + contour.negative_linestyle : dashdot # previously only solid or dashed + + API Changes in 2.0.1 ==================== diff --git a/doc/users/whats_new.rst b/doc/users/whats_new.rst index f1f38c41ad45..ac18486b507e 100644 --- a/doc/users/whats_new.rst +++ b/doc/users/whats_new.rst @@ -27,7 +27,8 @@ New in Matplotlib 2.1 Documentation +++++++++++++ -The examples have been migrated to use sphinx gallery. This allows +The examples have been migrated to use `sphinx gallery +`__. This allows better mixing of prose and code in the examples, provides links to download the examples as both a Python script and a Jupyter notebook, and improves the thumbnail galleries. The examples have been @@ -115,7 +116,7 @@ angular ticks have been modified to be parallel to the grid line. It may also be useful to rotate tick *labels* to match the boundary. Calling ``ax.tick_params(rotation='auto')`` will enable new behavior: radial tick labels will be parallel to the circular grid line, and angular tick labels will -be perpendicular to the grid line (i.e., parallel to the outer boundary.) +be perpendicular to the grid line (i.e., parallel to the outer boundary). ``Figure`` class now has ``subplots`` method @@ -132,16 +133,13 @@ Metadata savefig keyword argument :func:`~matplotlib.pyplot.savefig` now accepts ``metadata`` as a keyword argument. It can be used to store key/value pairs in the image metadata. -Supported formats and backends -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + * 'png' with Agg backend * 'pdf' with PDF backend (see :func:`~matplotlib.backends.backend_pdf.PdfFile.writeInfoDict` for a list of supported keywords) * 'eps' and 'ps' with PS backend (only 'Creator' key is accepted) -Example -~~~~~~~ :: plt.savefig('test.png', metadata={'Software': 'My awesome software'}) @@ -174,8 +172,8 @@ Reproducible PS, PDF and SVG output ----------------------------------- The ``SOURCE_DATE_EPOCH`` environment variable can now be used to set -the timestamp value in the PS and PDF outputs. See -https://reproducible-builds.org/specs/source-date-epoch/ +the timestamp value in the PS and PDF outputs. See `source date epoch +`__. Alternatively, calling ``savefig`` with ``metadata={'creationDate': None}`` will omit the timestamp altogether. @@ -250,8 +248,8 @@ volumetric model. Improvements ++++++++++++ -CheckButtons widget get_status function ---------------------------------------- +CheckButtons widget ``get_status`` function +------------------------------------------- A :func:`~matplotlib.widgets.CheckButtons.get_status` method has been added to the :class:`matplotlib.widgets.CheckButtons` class. This ``get_status`` method @@ -392,8 +390,8 @@ key arrow. Colormap reversed method ------------------------ -The methods :meth:`~matplotlib.colors.LinearSegmentedColormap.reversed` and -:meth:`~matplotlib.colors.ListedColormap.reversed` return a reversed +The methods :meth:`matplotlib.colors.LinearSegmentedColormap.reversed` and +:meth:`matplotlib.colors.ListedColormap.reversed` return a reversed instance of the Colormap. This implements a way for any Colormap to be reversed. @@ -419,7 +417,8 @@ cases. --------------------------------------------------- Bulk setting of tick label rotation is now possible via -:func:`~matplotlib.axis.Axis.set_tick_params` using the ``rotation`` keyword. +:func:`~matplotlib.axis.Axis.set_tick_params` using the ``rotation`` +keyword. Example ~~~~~~~ @@ -466,13 +465,14 @@ Example plt.show() -New which Parameter for ``autofmt_xdate`` ------------------------------------------ +New ``which`` Parameter for ``autofmt_xdate`` +--------------------------------------------- A ``which`` parameter now exists for the method :func:`~matplotlib.figure.Figure.autofmt_xdate`. This allows a user to format -``major``, ``minor`` or ``both`` tick labels selectively. If ``which`` is -``None`` (default) then the method will rotate ``major`` tick labels. +``major``, ``minor`` or ``both`` tick labels selectively. The +default behavior will rotate and align the ``major`` tick labels. + Example ~~~~~~~ @@ -512,11 +512,11 @@ New keyword argument ``sep`` for EngFormatter A new ``sep`` keyword argument has been added to :class:`~matplotlib.ticker.EngFormatter` and provides a means to define the string that will be used between the value and its -unit. The default string is " ", which preserves the former +unit. The default string is ``" "``, which preserves the former behavior. Additionally, the separator is now present between the value and its unit even in the absence of SI prefix. There was formerly a -bug that was causing strings like "3.14V" to be returned instead of -the expected "3.14 V" (with the default behavior). +bug that was causing strings like ``"3.14V"`` to be returned instead of +the expected ``"3.14 V"`` (with the default behavior). Extend ``MATPLOTLIBRC`` behavior -------------------------------- @@ -563,37 +563,25 @@ the API required by a class that is to be used as the ``writer`` in the :class:`~matplotlib.animation.MovieWriter` class now derives from the new abstract base class. -Validation of line style rcParams ---------------------------------- -Stricter validation -~~~~~~~~~~~~~~~~~~~ +Stricter validation of line style rcParams +------------------------------------------ + The validation of rcParams that are related to line styles (``lines.linestyle``, ``boxplot.*.linestyle``, ``grid.linestyle`` and ``contour.negative_linestyle``) now effectively checks that the values -are valid line styles. Strings like ``dashed`` or ``--`` are accepted, -as well as even-length sequences of on-off ink like ``[1, 1.65]``. In -this latter case, the offset value is handled internally and should *not* -be provided by the user. +are valid line styles. Strings like ``'dashed'`` or ``'--'`` are +accepted, as well as even-length sequences of on-off ink like ``[1, +1.65]``. In this latter case, the offset value is handled internally +and should *not* be provided by the user. -The validation is case-insensitive. -Deprecation of the former validators for ``contour.negative_linestyle`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The new validation scheme replaces the former one used for the -``contour.negative_linestyle`` rcParams, that was limited to ``solid`` -and ``dashed`` line styles. +``contour.negative_linestyle`` rcParams, that was limited to +``'solid'`` and ``'dashed'`` line styles. -The former public validation functions ``validate_negative_linestyle`` -and ``validate_negative_linestyle_legacy`` will be deprecated in 2.1 and -may be removed in 2.3. There are no public functions to replace them. - -Examples of use -~~~~~~~~~~~~~~~ -:: +The validation is case-insensitive. - grid.linestyle : (1, 3) # loosely dotted grid lines - contour.negative_linestyle : dashdot # previously only solid or dashed pytest ------ From 8d40a8427ccbc43a4feb73a77ba864c320edfb6b Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Fri, 6 Oct 2017 19:44:49 -0400 Subject: [PATCH 42/49] DOC: remove all whats new 'Example' sub-headings --- doc/users/whats_new.rst | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/doc/users/whats_new.rst b/doc/users/whats_new.rst index ac18486b507e..538b740ec328 100644 --- a/doc/users/whats_new.rst +++ b/doc/users/whats_new.rst @@ -204,9 +204,6 @@ argument and has a method :meth:`~mpl_toolkits.mplot3d.axes3d.Axes3D.set_proj_ty The default option is ``'persp'`` as before, and supplying ``'ortho'`` enables orthographic view. -Example -~~~~~~~ - Compare the z-axis which is vertical in orthographic view, but slightly skewed in the perspective view. @@ -271,8 +268,6 @@ and whether or not the bar will be filled by default depends on the value of ``True`` or ``False`` to unconditionally always or never use a filled patch rectangle for the size bar. -Example -~~~~~~~ .. plot:: :include-source: @@ -420,8 +415,6 @@ Bulk setting of tick label rotation is now possible via :func:`~matplotlib.axis.Axis.set_tick_params` using the ``rotation`` keyword. -Example -~~~~~~~ :: ax.xaxis.set_tick_params(which='both', rotation=90) @@ -436,8 +429,6 @@ remains to shade the bars, but now users have the option of setting ``shade`` to ``False``. -Example -~~~~~~~ .. plot:: :include-source: :align: center @@ -474,8 +465,6 @@ A ``which`` parameter now exists for the method default behavior will rotate and align the ``major`` tick labels. -Example -~~~~~~~ :: fig.autofmt_xdate(bottom=0.2, rotation=30, ha='right', which='minor') @@ -490,8 +479,7 @@ figure where the subplots will be created. If ``fig`` is ``None`` (default) then the method will use the current figure retrieved by :func:`~matplotlib.pyplot.gcf`. -Example -~~~~~~~ + :: subplot2grid(shape, loc, rowspan=1, colspan=1, fig=myfig) From b8234969ea952c401fe296136153a1bb5aa4ea69 Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Fri, 6 Oct 2017 19:45:03 -0400 Subject: [PATCH 43/49] DOC: remove api change entry for reverted change --- doc/api/api_changes.rst | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/doc/api/api_changes.rst b/doc/api/api_changes.rst index faf7da8ce8dd..cae1f0f778fd 100644 --- a/doc/api/api_changes.rst +++ b/doc/api/api_changes.rst @@ -226,18 +226,6 @@ NavigationToolbar2.dynamic_update is deprecated Use `FigureCanvas.draw_idle` instead. -Unique identifier added to `RendererBase` classes -------------------------------------------------- - -Since ``id()`` is not guaranteed to be unique between objects that exist at -different times, a new private property ``_uid`` has been added to -`RendererBase` which is used along with the renderer's ``id()`` to cache -certain expensive operations. - -If a custom renderer does not subclass `RendererBase` or `MixedModeRenderer`, -it is not required to implement this ``_uid`` property, but this may produce -incorrect behavior when the renderers' ``id()`` clashes. - WX no longer calls generates ``IdleEvent`` events or calls ``idle_event`` ------------------------------------------------------------------------- From 2ee903a6c57f68dc4ca9d045305de4943b29f7c6 Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Fri, 6 Oct 2017 21:37:46 -0400 Subject: [PATCH 44/49] DOC: merge up and organize api changes --- doc/api/api_changes.rst | 320 ++++++++++-------- doc/api/api_changes/2017-08-27-TAC.rst | 22 -- .../api_changes/2017-08-29-AL-getset_axes.rst | 4 - ...0-08_AFV_deprecation_of_axes_collision.rst | 16 - 4 files changed, 183 insertions(+), 179 deletions(-) delete mode 100644 doc/api/api_changes/2017-08-27-TAC.rst delete mode 100644 doc/api/api_changes/2017-08-29-AL-getset_axes.rst delete mode 100644 doc/api/api_changes/2017-30-08_AFV_deprecation_of_axes_collision.rst diff --git a/doc/api/api_changes.rst b/doc/api/api_changes.rst index cae1f0f778fd..187efe68cb44 100644 --- a/doc/api/api_changes.rst +++ b/doc/api/api_changes.rst @@ -13,36 +13,14 @@ For new features that were added to Matplotlib, please see API Changes in 2.1.0 ==================== -cbook deprecations ------------------- - -Many unused or near-unused cbook functions and classes have been deprecated: -``converter``, ``tostr``, ``todatetime``, ``todate``, ``tofloat``, ``toint``, -``unique``, ``is_string_like``, ``is_sequence_of_strings``, ``is_scalar``, -``Sorter``, ``Xlator``, ``soundex``, ``Null``, ``dict_delall``, ``RingBuffer``, -``get_split_ind``, ``wrap``, ``get_recursive_filelist``, ``pieces``, -``exception_to_str``, ``allequal``, ``alltrue``, ``onetrue``, ``allpairs``, -``finddir``, ``reverse_dict``, ``restrict_dict``, ``issubclass_safe``, -``recursive_remove``, ``unmasked_index_ranges``. - - -Improved Delaunay triangulations with large offsets ---------------------------------------------------- - -Delaunay triangulations now deal with large x,y offsets in a better -way. This can cause minor changes to any triangulations calculated -using Matplotlib, i.e. any use of `matplotlib.tri.Triangulation` that -requests that a Delaunay triangulation is calculated, which includes -`matplotlib.pyplot.tricontour`, `matplotlib.pyplot.tricontourf`, -`matplotlib.pyplot.tripcolor`, `matplotlib.pyplot.triplot`, -`mlab.griddata` and `mpl_toolkits.mplot3d.plot_trisurf`. - +Default behavior of log scales changed to mask <= 0 values +---------------------------------------------------------- -Deprecation in EngFormatter ---------------------------- +Calling `matplotlib.axes.Axes.set_xscale` or `matplotlib.axes.Axes.set_yscale` +now uses 'mask' as the default method to handle invalid values (as opposed to +'clip'). This means that any values <= 0 on a log scale will not be shown. -Passing a string as *num* argument when calling an instance of -`matplotlib.ticker.EngFormatter` is deprecated and will be removed in 2.3. +Previously they were clipped to a very small number and shown. :meth:`matplotlib.cbook.CallbackRegistry.process` suppresses exceptions by default @@ -78,16 +56,6 @@ A function which take and ``Exception`` as its only argument may also be passed - -`mpl_toolkits.axes_grid` has been deprecated --------------------------------------------- - -All functionallity from `mpl_toolkits.axes_grid` can be found in either -`mpl_toolkits.axes_grid1` or `mpl_toolkits.axisartist`. Axes classes from -`mpl_toolkits.axes_grid` based on `Axis` from `mpl_toolkits.axisartist` can be -found in `mpl_toolkits.axisartist` - - Improved toggling of the axes grids ----------------------------------- @@ -136,23 +104,33 @@ The version of qhull shipped with Matplotlib, which is used for Delaunay triangulation, has been updated from version 2012.1 to 2015.2. +Improved Delaunay triangulations with large offsets +--------------------------------------------------- -Use backports.functools_lru_cache instead of functools32 --------------------------------------------------------- +Delaunay triangulations now deal with large x,y offsets in a better +way. This can cause minor changes to any triangulations calculated +using Matplotlib, i.e. any use of `matplotlib.tri.Triangulation` that +requests that a Delaunay triangulation is calculated, which includes +`matplotlib.pyplot.tricontour`, `matplotlib.pyplot.tricontourf`, +`matplotlib.pyplot.tripcolor`, `matplotlib.pyplot.triplot`, +`mlab.griddata` and `mpl_toolkits.mplot3d.plot_trisurf`. + + + +Use ``backports.functools_lru_cache`` instead of ``functools32`` +---------------------------------------------------------------- It's better maintained and more widely used (by pylint, jaraco, etc). -`cbook.is_numlike` only performs an instance check, `cbook.is_string_like` is deprecated ----------------------------------------------------------------------------------------- -`cbook.is_numlike` now only checks that its argument is an instance of -``(numbers.Number, np.Number)``. In particular, this means that arrays are now -not num-like. +``cbook.is_numlike`` only performs an instance check +---------------------------------------------------- + +:func:`~matplotlib.cbook.is_numlike` now only checks that its argument +is an instance of ``(numbers.Number, np.Number)``. In particular, +this means that arrays are now not num-like. -`cbook.is_string_like` and `cbook.is_sequence_of_strings` have been -deprecated. Use ``isinstance(obj, six.string_types)`` and ``iterable(obj) and -all(isinstance(o, six.string_types) for o in obj)`` instead. Elliptical arcs now drawn between correct angles @@ -165,20 +143,13 @@ Previously a circular arc was drawn and then stretched into an ellipse, so the resulting arc did not lie between *theta1* and *theta2*. -Changes to PDF backend methods ------------------------------- - -The methods `embedTeXFont` and `tex_font_mapping` of -`matplotlib.backend_pdf.PdfFile` have been removed. -It is unlikely that external users would have called -these methods, which are related to the font system -internal to the PDF backend. - ``-d$backend`` no longer sets the backend ----------------------------------------- -It is no longer possible to set the backend by passing ``-d$backend`` at the command line. Use the ``MPLBACKEND`` environment variable instead. +It is no longer possible to set the backend by passing ``-d$backend`` +at the command line. Use the ``MPLBACKEND`` environment variable +instead. Path.intersects_bbox always treats the bounding box as filled @@ -204,27 +175,6 @@ the old behavior is actually desired, the suggested workaround is to call result = path.intersects_path(rect, filled=False) -Removed resolution kwarg from PolarAxes ---------------------------------------- - -The kwarg `resolution` of `matplotlib.projections.polar.PolarAxes` has been -removed. It has triggered a deprecation warning of being with no effect -beyond version `0.98.x`. - - -Deprecation of `GraphicsContextBase`\'s ``linestyle`` property. ---------------------------------------------------------------- - -The ``GraphicsContextBase.get_linestyle`` and -``GraphicsContextBase.set_linestyle`` methods, which effectively had no effect, -have been deprecated. - - -NavigationToolbar2.dynamic_update is deprecated ------------------------------------------------ - -Use `FigureCanvas.draw_idle` instead. - WX no longer calls generates ``IdleEvent`` events or calls ``idle_event`` @@ -236,6 +186,7 @@ The ``IdleEvent`` class and ``FigureCanvasBase.idle_event`` method will be removed in 2.2 + Correct scaling of :func:`magnitude_spectrum()` ----------------------------------------------- @@ -269,36 +220,148 @@ new and old scaling:: -Default behavior of log scales changed to mask <= 0 values ----------------------------------------------------------- -Calling `matplotlib.axes.Axes.set_xscale` or `matplotlib.axes.Axes.set_yscale` -now uses 'mask' as the default method to handle invalid values (as opposed to -'clip'). This means that any values <= 0 on a log scale will not be shown. -Previously they were clipped to a very small number and shown. +Change to signatures of :meth:`~matplotlib.axes.Axes.bar` & :meth:`~matplotlib.axes.Axes.barh` +---------------------------------------------------------------------------------------------- + +For 2.0 the :ref:`default value of *align* ` changed to +``'center'``. However this caused the signature of +:meth:`~matplotlib.axes.Axes.bar` and +:meth:`~matplotlib.axes.Axes.barh` to be misleading as the first parameters were +still *left* and *bottom* respectively:: + + bar(left, height, *, align='center', **kwargs) + barh(bottom, width, *, align='center', **kwargs) + +despite behaving as the center in both cases. The methods now take ``*args, **kwargs`` +is input and are documented to have the primary signatures of:: + + bar(x, height, *, align='center', **kwargs) + barh(y, width, *, align='center', **kwargs) + +Passing *left* and *bottom* as keyword arguments to +:meth:`~matplotlib.axes.Axes.bar` and +:meth:`~matplotlib.axes.Axes.barh` respectively will warn. +Support will be removed in Matplotlib 3.0. + Font cache as json ------------------ The font cache is now saved as json, rather than a pickle. -Code Removal + +Invalid (Non-finite) Axis Limit Error +------------------------------------- + +When using :func:`~matplotlib.axes.Axes.set_xlim` and +:func:`~matplotlib.axes.Axes.set_ylim`, passing non-finite values now +results in a ``ValueError``. The previous behavior resulted in the +limits being erroneously reset to ``(-0.001, 0.001)``. + +``scatter`` and ``Collection`` offsets are no longer implicitly flattened +------------------------------------------------------------------------- + +`~matplotlib.collections.Collection` (and thus both 2D +`~matplotlib.axes.Axes.scatter` and 3D +`~mpl_toolkits.mplot3d.axes3d.Axes3D.scatter`) no +longer implicitly flattens its offsets. As a consequence, ``scatter``'s ``x`` +and ``y`` arguments can no longer be 2+-dimensional arrays. + +Deprecations ------------ -matplotlib.delaunay -~~~~~~~~~~~~~~~~~~~ -Remove the delaunay triangulation code which is now handled by Qhull -via ``matplotlib.tri`` +``GraphicsContextBase``\'s ``linestyle`` property. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The ``GraphicsContextBase.get_linestyle`` and +``GraphicsContextBase.set_linestyle`` methods, which effectively had +no effect, have been deprecated. + + +``NavigationToolbar2.dynamic_update`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Use :meth:`matplotlib.backend_bases.FigureCanvas.draw_idle` instead. +Testing +~~~~~~~ + +`matplotlib.testing.noseclasses` is deprecated and will be removed in 2.3 + + +``EngFormatter`` *num* arg as string +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Passing a string as *num* argument when calling an instance of +`matplotlib.ticker.EngFormatter` is deprecated and will be removed in 2.3. + + +``mpl_toolkits.axes_grid`` module +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +All functionallity from `mpl_toolkits.axes_grid` can be found in +either `mpl_toolkits.axes_grid1` or `mpl_toolkits.axisartist`. Axes +classes from `mpl_toolkits.axes_grid` based on `Axis` from +`mpl_toolkits.axisartist` can be found in `mpl_toolkits.axisartist` + + +``Axes`` collision in ``Figure.add_axes`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Adding an axes instance to a figure by using the same arguments as for +a previous axes instance currently reuses the earlier instance. This +behavior has been deprecated in Matplotlib 2.1. In a future version, a +*new* instance will always be created and returned. Meanwhile, in such +a situation, a deprecation warning is raised by +:class:`~matplotlib.figure.AxesStack`. + +This warning can be suppressed, and the future behavior ensured, by passing +a *unique* label to each axes instance. See the docstring of +:meth:`~matplotlib.figure.Figure.add_axes` for more information. + +Additional details on the rationale behind this deprecation can be found +in :issue:`7377` and :issue:`9024`. + + +Former validators for ``contour.negative_linestyle`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + +The former public validation functions ``validate_negative_linestyle`` +and ``validate_negative_linestyle_legacy`` will be deprecated in 2.1 and +may be removed in 2.3. There are no public functions to replace them. + + + +``cbook`` +~~~~~~~~~ + +Many unused or near-unused :mod:`matplotlib.cbook` functions and +classes have been deprecated: ``converter``, ``tostr``, +``todatetime``, ``todate``, ``tofloat``, ``toint``, ``unique``, +``is_string_like``, ``is_sequence_of_strings``, ``is_scalar``, +``Sorter``, ``Xlator``, ``soundex``, ``Null``, ``dict_delall``, +``RingBuffer``, ``get_split_ind``, ``wrap``, +``get_recursive_filelist``, ``pieces``, ``exception_to_str``, +``allequal``, ``alltrue``, ``onetrue``, ``allpairs``, ``finddir``, +``reverse_dict``, ``restrict_dict``, ``issubclass_safe``, +``recursive_remove``, ``unmasked_index_ranges``. + + +Code Removal +------------ + qt4_compat.py ~~~~~~~~~~~~~ + Moved to ``qt_compat.py``. Renamed because it now handles Qt5 as well. -Deprecated methods -~~~~~~~~~~~~~~~~~~ +Previously Deprecated methods +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The ``GraphicsContextBase.set_graylevel``, ``FigureCanvasBase.onHilite`` and ``mpl_toolkits.axes_grid1.mpl_axes.Axes.toggle_axisline`` methods have been @@ -313,24 +376,10 @@ The deprecated ``point_in_path``, ``get_path_extents``, functions in the ``matplotlib.path`` module have been removed. Their functionality remains exposed as methods on the ``Path`` class. - -`Axes.set_aspect("normal")` -~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Support for setting an ``Axes``' aspect to ``"normal"`` has been removed, in -favor of the synonym ``"auto"``. - - -``shading`` kwarg to ``pcolor`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The ``shading`` kwarg to ``pcolor`` has been removed. Set ``edgecolors`` -appropriately instead. +The deprecated ``Artist.get_axes`` and ``Artist.set_axes`` methods +have been removed -Removed internal functions -~~~~~~~~~~~~~~~~~~~~~~~~~~ - The ``matplotlib.backends.backend_ps.seq_allequal`` function has been removed. Use ``np.array_equal`` instead. @@ -341,50 +390,47 @@ The deprecated ``matplotlib.rcsetup.validate_maskedarray``, removed. -Deprecations ------------- +The kwarg ``resolution`` of +:class:`matplotlib.projections.polar.PolarAxes` has been removed. It +has deprecation with no effect from version `0.98.x`. -- `matplotlib.testing.noseclasses` is deprecated and will be removed in 2.3 +``Axes.set_aspect("normal")`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Functions removed from the `lines` module ------------------------------------------ +Support for setting an ``Axes``\'s aspect to ``"normal"`` has been +removed, in favor of the synonym ``"auto"``. -The `matplotlib.lines` module no longer imports the `pts_to_prestep`, -`pts_to_midstep` and `pts_to_poststep` functions from the `matplotlib.cbook` -module. -Invalid (Non-finite) Axis Limit Error -------------------------------------- +``shading`` kwarg to ``pcolor`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -When using :func:`~matplotlib.axes.Axes.set_xlim` and -:func:`~matplotlib.axes.Axes.set_ylim`, passing non-finite values now -results in a ``ValueError``. The previous behavior resulted in the -limits being erroneously reset to ``(-0.001, 0.001)``. +The ``shading`` kwarg to `~matplotlib.axes.Axes.pcolor` has been +removed. Set ``edgecolors`` appropriately instead. -``scatter`` and ``Collection`` offsets are no longer implicitly flattened -------------------------------------------------------------------------- -`~matplotlib.collections.Collection` (and thus both 2D -`~matplotlib.axes.Axes.scatter` and 3D -`~mpl_toolkits.mplot3d.axes3d.Axes3D.scatter`) no -longer implicitly flattens its offsets. As a consequence, ``scatter``'s ``x`` -and ``y`` arguments can no longer be 2+-dimensional arrays. +Functions removed from the `lines` module +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +The :mod:`matplotlib.lines` module no longer imports the +``pts_to_prestep``, ``pts_to_midstep`` and ``pts_to_poststep`` +functions from :mod:`matplotlib.cbook`. -Deprecation of the former validators for ``contour.negative_linestyle`` ------------------------------------------------------------------------ +PDF backend functions +~~~~~~~~~~~~~~~~~~~~~ -The former public validation functions ``validate_negative_linestyle`` -and ``validate_negative_linestyle_legacy`` will be deprecated in 2.1 and -may be removed in 2.3. There are no public functions to replace them. +The methods ``embedTeXFont`` and ``tex_font_mapping`` of +:class:`matplotlib.backqend_pdf.PdfFile` have been removed. It is +unlikely that external users would have called these methods, which +are related to the font system internal to the PDF backend. -:: - grid.linestyle : (1, 3) # loosely dotted grid lines - contour.negative_linestyle : dashdot # previously only solid or dashed +matplotlib.delaunay +~~~~~~~~~~~~~~~~~~~ +Remove the delaunay triangulation code which is now handled by Qhull +via :mod:`matplotlib.tri`. API Changes in 2.0.1 ==================== diff --git a/doc/api/api_changes/2017-08-27-TAC.rst b/doc/api/api_changes/2017-08-27-TAC.rst deleted file mode 100644 index 82f709169eb8..000000000000 --- a/doc/api/api_changes/2017-08-27-TAC.rst +++ /dev/null @@ -1,22 +0,0 @@ -Change to signatures of :meth:`~matplotlib.axes.Axes.bar` & :meth:`~matplotlib.axes.Axes.barh` ----------------------------------------------------------------------------------------------- - -For 2.0 the :ref:`default value of *align* ` changed to -``'center'``. However this caused the signature of -:meth:`~matplotlib.axes.Axes.bar` and -:meth:`~matplotlib.axes.Axes.barh` to be misleading as the first parameters were -still *left* and *bottom* respectively:: - - bar(left, height, *, align='center', **kwargs) - barh(bottom, width, *, align='center', **kwargs) - -despite behaving as the center in both cases. The methods now take ``*args, **kwargs`` -is input and are documented to have the primary signatures of:: - - bar(x, height, *, align='center', **kwargs) - barh(y, width, *, align='center', **kwargs) - -Passing *left* and *bottom* as keyword arguments to -:meth:`~matplotlib.axes.Axes.bar` and -:meth:`~matplotlib.axes.Axes.barh` respectively will warn. -Support will be removed in Matplotlib 3.0. diff --git a/doc/api/api_changes/2017-08-29-AL-getset_axes.rst b/doc/api/api_changes/2017-08-29-AL-getset_axes.rst deleted file mode 100644 index 3f459de9fed3..000000000000 --- a/doc/api/api_changes/2017-08-29-AL-getset_axes.rst +++ /dev/null @@ -1,4 +0,0 @@ -Removal of deprecated methods -````````````````````````````` -The deprecated `Artist.get_axes` and `Artist.set_axes` methods have been -removed diff --git a/doc/api/api_changes/2017-30-08_AFV_deprecation_of_axes_collision.rst b/doc/api/api_changes/2017-30-08_AFV_deprecation_of_axes_collision.rst deleted file mode 100644 index e7f8d4fe1407..000000000000 --- a/doc/api/api_changes/2017-30-08_AFV_deprecation_of_axes_collision.rst +++ /dev/null @@ -1,16 +0,0 @@ -Deprecation of axes collision ------------------------------ - -Adding an axes instance to a figure by using the same arguments as for -a previous axes instance currently reuses the earlier instance. This -behavior has been deprecated in Matplotlib 2.1. In a future version, a -*new* instance will always be created and returned. Meanwhile, in such -a situation, a deprecation warning is raised by -:class:`~matplotlib.figure.AxesStack`. - -This warning can be suppressed, and the future behavior ensured, by passing -a *unique* label to each axes instance. See the docstring of -:meth:`~matplotlib.figure.Figure.add_axes` for more information. - -Additional details on the rationale behind this deprecation can be found -in :issue:`7377` and :issue:`9024`. From d8454ad5fba4ef91bca71de4dcd631c38eba4efd Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Fri, 6 Oct 2017 21:38:47 -0400 Subject: [PATCH 45/49] DOC: tweak whats new a bit --- doc/users/whats_new.rst | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/doc/users/whats_new.rst b/doc/users/whats_new.rst index 538b740ec328..d43e5b5160a1 100644 --- a/doc/users/whats_new.rst +++ b/doc/users/whats_new.rst @@ -568,7 +568,12 @@ The new validation scheme replaces the former one used for the ``contour.negative_linestyle`` rcParams, that was limited to ``'solid'`` and ``'dashed'`` line styles. -The validation is case-insensitive. +The validation is case-insensitive. The following are now valid: + +:: + + grid.linestyle : (1, 3) # loosely dotted grid lines + contour.negative_linestyle : dashdot # previously only solid or dashed pytest From 1214252fbcc964260b984db3261b7c09111d9aef Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Fri, 6 Oct 2017 22:02:05 -0400 Subject: [PATCH 46/49] DOC: fix ghissue markup --- doc/api/api_changes.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/api_changes.rst b/doc/api/api_changes.rst index 187efe68cb44..d437a95faf0d 100644 --- a/doc/api/api_changes.rst +++ b/doc/api/api_changes.rst @@ -323,7 +323,7 @@ a *unique* label to each axes instance. See the docstring of :meth:`~matplotlib.figure.Figure.add_axes` for more information. Additional details on the rationale behind this deprecation can be found -in :issue:`7377` and :issue:`9024`. +in :ghissue:`7377` and :ghissue:`9024`. Former validators for ``contour.negative_linestyle`` From d4f2540fe7655373121cd6e0a89733d67dca6bac Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Sat, 7 Oct 2017 14:50:47 -0400 Subject: [PATCH 47/49] DOC: minor review comments --- doc/api/api_changes.rst | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/doc/api/api_changes.rst b/doc/api/api_changes.rst index d437a95faf0d..d797f99c679f 100644 --- a/doc/api/api_changes.rst +++ b/doc/api/api_changes.rst @@ -113,7 +113,8 @@ using Matplotlib, i.e. any use of `matplotlib.tri.Triangulation` that requests that a Delaunay triangulation is calculated, which includes `matplotlib.pyplot.tricontour`, `matplotlib.pyplot.tricontourf`, `matplotlib.pyplot.tripcolor`, `matplotlib.pyplot.triplot`, -`mlab.griddata` and `mpl_toolkits.mplot3d.plot_trisurf`. +`matplotlib.mlab.griddata` and +`mpl_toolkits.mplot3d.axes3d.Axes3D.plot_trisurf`. @@ -234,8 +235,9 @@ still *left* and *bottom* respectively:: bar(left, height, *, align='center', **kwargs) barh(bottom, width, *, align='center', **kwargs) -despite behaving as the center in both cases. The methods now take ``*args, **kwargs`` -is input and are documented to have the primary signatures of:: +despite behaving as the center in both cases. The methods now take +``*args, **kwargs`` as input and are documented to have the primary +signatures of:: bar(x, height, *, align='center', **kwargs) barh(y, width, *, align='center', **kwargs) @@ -276,14 +278,17 @@ Deprecations ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The ``GraphicsContextBase.get_linestyle`` and -``GraphicsContextBase.set_linestyle`` methods, which effectively had -no effect, have been deprecated. +``GraphicsContextBase.set_linestyle`` methods, which had no effect, +have been deprecated. All of the backends Matplotlib ships use +``GraphicsContextBase.get_dashes`` and +``GraphicsContextBase.set_dashes`` which are more general. +Third-party backends should also migrate to the ``*_dashes`` methods. ``NavigationToolbar2.dynamic_update`` ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Use :meth:`matplotlib.backend_bases.FigureCanvas.draw_idle` instead. +Use :meth:`draw_idle` method on the ``Canvas`` instance instead. Testing @@ -302,10 +307,10 @@ Passing a string as *num* argument when calling an instance of ``mpl_toolkits.axes_grid`` module ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -All functionallity from `mpl_toolkits.axes_grid` can be found in -either `mpl_toolkits.axes_grid1` or `mpl_toolkits.axisartist`. Axes -classes from `mpl_toolkits.axes_grid` based on `Axis` from -`mpl_toolkits.axisartist` can be found in `mpl_toolkits.axisartist` +All functionally from `mpl_toolkits.axes_grid` can be found in either +`mpl_toolkits.axes_grid1` or `mpl_toolkits.axisartist`. Axes classes +from `mpl_toolkits.axes_grid` based on `Axis` from +`mpl_toolkits.axisartist` can be found in `mpl_toolkits.axisartist`. ``Axes`` collision in ``Figure.add_axes`` From 182430d88d923322ce3aa2429f55ca128afcdaff Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Sat, 7 Oct 2017 16:17:03 -0400 Subject: [PATCH 48/49] DOC: minor edits --- doc/api/api_changes.rst | 2 +- doc/users/whats_new.rst | 25 +++++++++++++------------ 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/doc/api/api_changes.rst b/doc/api/api_changes.rst index d797f99c679f..790a56cb63a6 100644 --- a/doc/api/api_changes.rst +++ b/doc/api/api_changes.rst @@ -33,7 +33,7 @@ of of the ``process`` method, which is typically in the GUI event loop. Most GUI frameworks simple print the traceback to the screen and continue as there is not always a clear method of getting the exception back to the user. However PyQt5 now exits the process when -it receives and un-handled python exception in the event loop. Thus, +it receives an un-handled python exception in the event loop. Thus, :meth:`~matplotlib.cbook.CallbackRegistry.process` now suppresses and prints tracebacks to stderr by default. diff --git a/doc/users/whats_new.rst b/doc/users/whats_new.rst index d43e5b5160a1..d421ae7e6092 100644 --- a/doc/users/whats_new.rst +++ b/doc/users/whats_new.rst @@ -50,7 +50,7 @@ For example: :include-source: :align: center - data = {'apples':10, 'oranges':15, 'lemons':5, 'limes':20} + data = {'apples': 10, 'oranges': 15, 'lemons': 5, 'limes': 20} fig, ax = plt.subplots() ax.bar(data.keys(), data.values(), color='lightgray') @@ -111,12 +111,13 @@ negative values are simply used as labels, and the real radius is shifted by the configured minimum. This release also allows negative radii to be used for grids and ticks, which were previously silently ignored. -Radial ticks have been modified to be parallel to the circular grid line, and -angular ticks have been modified to be parallel to the grid line. It may also -be useful to rotate tick *labels* to match the boundary. Calling -``ax.tick_params(rotation='auto')`` will enable new behavior: radial tick -labels will be parallel to the circular grid line, and angular tick labels will -be perpendicular to the grid line (i.e., parallel to the outer boundary). +Radial ticks have been modified to be parallel to the circular grid +line, and angular ticks have been modified to be parallel to the grid +line. It may also be useful to rotate tick *labels* to match the +boundary. Calling ``ax.tick_params(rotation='auto')`` will enable the +new behavior: radial tick labels will be parallel to the circular grid +line, and angular tick labels will be perpendicular to the grid line +(i.e., parallel to the outer boundary). ``Figure`` class now has ``subplots`` method @@ -176,7 +177,7 @@ the timestamp value in the PS and PDF outputs. See `source date epoch `__. Alternatively, calling ``savefig`` with ``metadata={'creationDate': None}`` -will omit the timestamp altogether. +will omit the timestamp altogether for the PDF backend. The reproducibility of the output from the PS and PDF backends has so far been tested using various plot elements but only default values of @@ -420,8 +421,8 @@ keyword. ax.xaxis.set_tick_params(which='both', rotation=90) -Users can now toggle shading in 3D bar plots --------------------------------------------- +Shading in 3D bar plots +----------------------- A new ``shade`` parameter has been added the 3D `~mpl_toolkits.mplot3d.axes3d.Axes3D.bar` plotting method. The default behavior @@ -509,8 +510,8 @@ the expected ``"3.14 V"`` (with the default behavior). Extend ``MATPLOTLIBRC`` behavior -------------------------------- -The environmental variable can now specify the full file path or path -to find :file:`matplotlibrc` in. +The environmental variable can now specify the full file path or the +path to a directory containing a :file:`matplotlibrc` file. ``density`` kwarg to hist From 2ba2bab73b2bcd0d026005db74839eb82e2d4e1d Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Sat, 7 Oct 2017 16:25:16 -0400 Subject: [PATCH 49/49] DOC: one last double backquote --- doc/users/whats_new.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/users/whats_new.rst b/doc/users/whats_new.rst index d421ae7e6092..d6e3ba2dabf0 100644 --- a/doc/users/whats_new.rst +++ b/doc/users/whats_new.rst @@ -471,8 +471,8 @@ default behavior will rotate and align the ``major`` tick labels. fig.autofmt_xdate(bottom=0.2, rotation=30, ha='right', which='minor') -New Figure Parameter for subplot2grid -------------------------------------- +New Figure Parameter for ``subplot2grid`` +----------------------------------------- A ``fig`` parameter now exists for the function :func:`~matplotlib.pyplot.subplot2grid`. This allows a user to specify the