diff --git a/doc/api/api_changes.rst b/doc/api/api_changes.rst index db4155131947..790a56cb63a6 100644 --- a/doc/api/api_changes.rst +++ b/doc/api/api_changes.rst @@ -13,39 +13,17 @@ 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:`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` @@ -55,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. @@ -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 ----------------------------------- @@ -126,7 +94,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 @@ -136,23 +104,34 @@ 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 +--------------------------------------------------- + +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`, +`matplotlib.mlab.griddata` and +`mpl_toolkits.mplot3d.axes3d.Axes3D.plot_trisurf`. + -Use backports.functools_lru_cache instead of functools32 --------------------------------------------------------- + +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 +144,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,39 +176,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. - - -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`` @@ -248,6 +187,7 @@ The ``IdleEvent`` class and ``FigureCanvasBase.idle_event`` method will be removed in 2.2 + Correct scaling of :func:`magnitude_spectrum()` ----------------------------------------------- @@ -281,32 +221,152 @@ 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:: -Code Removal + 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`` as 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. + + +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 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:`draw_idle` method on the ``Canvas`` instance 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 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`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +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 :ghissue:`7377` and :ghissue:`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 @@ -321,24 +381,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"``. +The deprecated ``Artist.get_axes`` and ``Artist.set_axes`` methods +have been removed -``shading`` kwarg to ``pcolor`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The ``shading`` kwarg to ``pcolor`` has been removed. Set ``edgecolors`` -appropriately instead. - - -Removed internal functions -~~~~~~~~~~~~~~~~~~~~~~~~~~ - The ``matplotlib.backends.backend_ps.seq_allequal`` function has been removed. Use ``np.array_equal`` instead. @@ -349,20 +395,48 @@ 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")`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Support for setting an ``Axes``\'s aspect to ``"normal"`` has been +removed, in favor of the synonym ``"auto"``. + + +``shading`` kwarg to ``pcolor`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The ``shading`` kwarg to `~matplotlib.axes.Axes.pcolor` has been +removed. Set ``edgecolors`` appropriately instead. Functions removed from the `lines` module ------------------------------------------ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The `matplotlib.lines` module no longer imports the `pts_to_prestep`, -`pts_to_midstep` and `pts_to_poststep` functions from the `matplotlib.cbook` -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`. +PDF backend functions +~~~~~~~~~~~~~~~~~~~~~ + +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. + + +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`. diff --git a/doc/users/whats_new.rst b/doc/users/whats_new.rst index 7d69e9037d9f..d6e3ba2dabf0 100644 --- a/doc/users/whats_new.rst +++ b/doc/users/whats_new.rst @@ -1,14 +1,14 @@ .. _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 revision, see the :ref:`github-stats`. .. contents:: Table of Contents - :depth: 3 + :depth: 4 .. @@ -24,6 +24,55 @@ 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 +------------------------- + +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 -------------------------- @@ -42,7 +91,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 +102,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 @@ -62,88 +111,92 @@ 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). -Merge JSAnimation ------------------ +``Figure`` class now has ``subplots`` method +-------------------------------------------- -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:: +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. - 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. +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. -New TransformedPatchPath caching object ---------------------------------------- +* '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) -A newly added :class:`~matplotlib.transforms.TransformedPatchPath` provides a -means to transform a :class:`~matplotlib.patches.Patch` into a -:class:`~matplotlib.path.Path` via a :class:`~matplotlib.transforms.Transform` -while caching the resulting path. If neither the patch nor the transform have -changed, a cached copy of the path is returned. +:: -This class differs from the older -:class:`~matplotlib.transforms.TransformedPath` in that it is able to refresh -itself based on the underlying patch while the older class uses an immutable -path. + plt.savefig('test.png', metadata={'Software': 'My awesome software'}) -CheckButtons widget get_status function ---------------------------------------- +Busy Cursor +----------- -A :func:`~matplotlib.widgets.CheckButtons.get_status` method has been added 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. +The interactive GUI backends will now change the cursor to busy when +Matplotlib is rendering the canvas. +PolygonSelector +--------------- -Abstract base class for movie writers -------------------------------------- +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. -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. +Added `matplotlib.ticker.PercentFormatter` +------------------------------------------ -Add fill_bar argument to ``AnchoredSizeBar`` --------------------------------------------- +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. -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. +Reproducible PS, PDF and SVG output +----------------------------------- -Annotation can use a default arrow style ----------------------------------------- +The ``SOURCE_DATE_EPOCH`` environment variable can now be used to set +the timestamp value in the PS and PDF outputs. See `source date epoch +`__. -Annotations now use the default arrow style when setting ``arrowprops={}``, -rather than no arrow (the new behavior actually matches the documentation). +Alternatively, calling ``savefig`` with ``metadata={'creationDate': None}`` +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 +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 ----------------------------------- @@ -152,14 +205,94 @@ 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. +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 +`~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 +++++++++++++ + +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. + + +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. + + +.. 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 +---------------------------------------- + +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 ------------------------------ @@ -178,13 +311,27 @@ 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 ``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. + +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 New parameter `clear` for :func:`~matplotlib.pyplot.figure` @@ -220,186 +367,62 @@ from :func:`~matplotlib.pyplot.figure`, it can also be used there:: # fig0 is fig2: True # fig2.texts: [] -AVConv writer is back ---------------------- -Correct a bug that prevented detection of AVconv for `matplotlib.animation`. - - -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 ---------------------------------- - -: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`` ---------------------------------------------------------------------- -: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). - - -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: 50 - - Multiple Legend Keys - - -Path simplification updates ---------------------------- - -Line simplification controlled by the ``path.simplify`` and -``path.simplify_threshold`` parameters has been improved. You should -notice better rendering performance when plotting large amounts of -data (as long as the above parameters are set accordingly). Only the -line segment portion of paths will be simplified -- if you are also -drawing markers and experiencing problems with rendering speed, you -should consider using the ``markevery`` option to `~matplotlib.axes.Axes.plot`. -See the :ref:`performance` section in the usage tutorial for more -information. - -The simplification works by iteratively merging line segments -into a single vector until the next line segment's perpendicular -distance to the vector (measured in display-coordinate space) -is greater than the ``path.simplify_threshold`` parameter. Thus, higher -values of ``path.simplify_threshold`` result in quicker rendering times. -If you are plotting just to explore data and not for publication quality, -pixel perfect plots, then a value of ``1.0`` can be safely used. If you -want to make sure your plot reflects your data *exactly*, then you should -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. - - -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. +:class:`~matplotlib.ticker.LogFormatterMathtext` now includes the +option to specify a minimum value exponent to format as a scalar +(i.e., 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. - - -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. - +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 +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. -`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 ----------------------------------------------------------- +`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`. +``streamplot`` streamline generation more configurable +------------------------------------------------------ -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. +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. -`Axis.set_tick_params` now responds to 'rotation' -------------------------------------------------- +`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. +: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 --------------------------------------------- + +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 @@ -407,45 +430,49 @@ 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 - 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 - ax2 = fig.add_subplot(122, projection='3d') - ax2.bar3d(x2d, y2d, x2d * 0, 1, 1, z, shade=False) - fig.canvas.draw() + 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 -------------------------------------- + +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 -~~~~~~~ :: 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 @@ -453,65 +480,141 @@ 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 ------------------------------- +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`. +: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 ---------------------------------- +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). + +Extend ``MATPLOTLIBRC`` behavior +-------------------------------- + +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 +------------------------- + +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). + + + +Internals ++++++++++ + +New TransformedPatchPath caching object +--------------------------------------- + +A newly added :class:`~matplotlib.transforms.TransformedPatchPath` provides a +means to transform a :class:`~matplotlib.patches.Patch` into a +:class:`~matplotlib.path.Path` via a :class:`~matplotlib.transforms.Transform` +while caching the resulting path. If neither the patch nor the transform have +changed, a cached copy of the path is returned. + +This class differs from the older +:class:`~matplotlib.transforms.TransformedPath` in that it is able to refresh +itself based on the underlying patch while the older class uses an immutable +path. + + +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 +:meth:`matplotlib.animation.Animation.save` method. The existing +:class:`~matplotlib.animation.MovieWriter` class now derives from the new +abstract base class. + + +Stricter 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. +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. +The validation is case-insensitive. The following are now valid: -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 -------------------------------------------- +pytest +------ + +The automated tests have been switched from `nose` to `pytest`. + +Performance ++++++++++++ + +Path simplification updates +--------------------------- + +Line simplification controlled by the ``path.simplify`` and +``path.simplify_threshold`` parameters has been improved. You should +notice better rendering performance when plotting large amounts of +data (as long as the above parameters are set accordingly). Only the +line segment portion of paths will be simplified -- if you are also +drawing markers and experiencing problems with rendering speed, you +should consider using the ``markevery`` option to `~matplotlib.axes.Axes.plot`. +See the :ref:`performance` section in the usage tutorial for more +information. + +The simplification works by iteratively merging line segments +into a single vector until the next line segment's perpendicular +distance to the vector (measured in display-coordinate space) +is greater than the ``path.simplify_threshold`` parameter. Thus, higher +values of ``path.simplify_threshold`` result in quicker rendering times. +If you are plotting just to explore data and not for publication quality, +pixel perfect plots, then a value of ``1.0`` can be safely used. If you +want to make sure your plot reflects your data *exactly*, then you should +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++ +-------------------------------- -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). +:meth:`~matplotlib.path.Path.intersects_bbox` has been implemented in +c++ which improves the performance of automatically placing the legend. Previous Whats New