diff --git a/.flake8 b/.flake8 index 73163d7c0e4c..6a7ecfda6d0f 100644 --- a/.flake8 +++ b/.flake8 @@ -236,7 +236,7 @@ per-file-ignores = examples/subplots_axes_and_figures/zoom_inset_axes.py: E402 examples/tests/backend_driver_sgskip.py: E402, E501 examples/text_labels_and_annotations/annotation_demo.py: E501 - examples/text_labels_and_annotations/demo_text_rotation_mode.py: E402 + examples/text_labels_and_annotations/demo_text_rotation_mode.py: E402 examples/text_labels_and_annotations/custom_legends.py: E402 examples/text_labels_and_annotations/font_family_rc_sgskip.py: E402 examples/text_labels_and_annotations/font_file.py: E402 @@ -246,7 +246,7 @@ per-file-ignores = examples/text_labels_and_annotations/tex_demo.py: E402 examples/text_labels_and_annotations/watermark_text.py: E402 examples/ticks_and_spines/auto_ticks.py: E501 - examples/ticks_and_spines/date_concise_formatter.py: E402 + examples/ticks_and_spines/date_concise_formatter.py: E402 examples/user_interfaces/canvasagg.py: E402 examples/user_interfaces/embedding_in_gtk3_panzoom_sgskip.py: E402 examples/user_interfaces/embedding_in_gtk3_sgskip.py: E402 diff --git a/doc/api/api_changes/171014-AL-tickprops.rst b/doc/api/api_changes/171014-AL-tickprops.rst deleted file mode 100644 index f8aab393e6d8..000000000000 --- a/doc/api/api_changes/171014-AL-tickprops.rst +++ /dev/null @@ -1,13 +0,0 @@ -Deprecation of redundant `Tick` attributes -`````````````````````````````````````````` - -The ``gridOn``, ``tick1On``, ``tick2On``, ``label1On``, and ``label2On`` -`~.Tick` attributes have been deprecated. Directly get and set the visibility -on the underlying artists, available as the ``gridline``, ``tick1line``, -``tick2line``, ``label1``, and ``label2`` attributes. - -The ``label`` attribute, which was an alias for ``label1``, has been -deprecated. - -Subclasses that relied on setting the above visibility attributes needs to be -updated; see e.g. :file:`examples/api/skewt.py`. diff --git a/doc/api/api_changes/2018-08-17-AL-deprecations.rst b/doc/api/api_changes/2018-08-17-AL-deprecations.rst deleted file mode 100644 index 05270577cf84..000000000000 --- a/doc/api/api_changes/2018-08-17-AL-deprecations.rst +++ /dev/null @@ -1,9 +0,0 @@ -API deprecations -```````````````` - -The following API elements are deprecated: - -- ``backend_gtk3cairo.FigureCanvasGTK3Cairo``, -- ``backend_wx.debug_on_error``, ``backend_wx.fake_stderr``, - ``backend_wx.raise_msg_to_str``, ``backend_wx.MenuButtonWx``, - ``backend_wx.PrintoutWx``, diff --git a/doc/api/api_changes/2018-10-08-AL-deprecations.rst b/doc/api/api_changes/2018-10-08-AL-deprecations.rst deleted file mode 100644 index b990fb7c341a..000000000000 --- a/doc/api/api_changes/2018-10-08-AL-deprecations.rst +++ /dev/null @@ -1,5 +0,0 @@ -Passing a Line2D's drawstyle together with the linestyle is deprecated -`````````````````````````````````````````````````````````````````````` - -Instead of ``plt.plot(..., linestyle="steps--")``, use ``plt.plot(..., -linestyle="--", drawstyle="steps")``. ``ds`` is now an alias for ``drawstyle``. diff --git a/doc/api/api_changes/2018-10-09-AL-deprecations.rst b/doc/api/api_changes/2018-10-09-AL-deprecations.rst deleted file mode 100644 index a4023a2ae82b..000000000000 --- a/doc/api/api_changes/2018-10-09-AL-deprecations.rst +++ /dev/null @@ -1,5 +0,0 @@ -Deprecations -```````````` - -The ``backend_bases.RendererBase.strip_math`` method is deprecated. Use -`.cbook.strip_math` instead. diff --git a/doc/api/api_changes/2018-10-10-AL.rst b/doc/api/api_changes/2018-10-10-AL.rst deleted file mode 100644 index e60e7d6680c9..000000000000 --- a/doc/api/api_changes/2018-10-10-AL.rst +++ /dev/null @@ -1,9 +0,0 @@ -`Axes.streamplot` now raises ValueError when an irregular grid is passed in -``````````````````````````````````````````````````````````````````````````` - -`Axes.streamplot` does not support irregularly gridded ``x`` and ``y`` values. -So far, it used to silently plot an incorrect result. This has been changed to -raise a ValueError instead. - -The `.streamplot.Grid` class, which is internally used by streamplot code, also -throws a ValueError when irregularly gridded values are passed in. diff --git a/doc/api/api_changes/2018-12-20-AL-deprecations.rst b/doc/api/api_changes/2018-12-20-AL-deprecations.rst deleted file mode 100644 index 56bd23bc85dd..000000000000 --- a/doc/api/api_changes/2018-12-20-AL-deprecations.rst +++ /dev/null @@ -1,30 +0,0 @@ -Deprecations -```````````` - -Multiple internal functions that were exposed as part of the public API -of ``mpl_toolkits.mplot3d`` are deprecated, - -**mpl_toolkits.mplot3d.art3d** - -- :func:`mpl_toolkits.mplot3d.art3d.norm_angle` -- :func:`mpl_toolkits.mplot3d.art3d.norm_text_angle` -- :func:`mpl_toolkits.mplot3d.art3d.path_to_3d_segment` -- :func:`mpl_toolkits.mplot3d.art3d.paths_to_3d_segments` -- :func:`mpl_toolkits.mplot3d.art3d.path_to_3d_segment_with_codes` -- :func:`mpl_toolkits.mplot3d.art3d.paths_to_3d_segments_with_codes` -- :func:`mpl_toolkits.mplot3d.art3d.get_patch_verts` -- :func:`mpl_toolkits.mplot3d.art3d.get_colors` -- :func:`mpl_toolkits.mplot3d.art3d.zalpha` - -**mpl_toolkits.mplot3d.proj3d** - -- :func:`mpl_toolkits.mplot3d.proj3d.line2d` -- :func:`mpl_toolkits.mplot3d.proj3d.line2d_dist` -- :func:`mpl_toolkits.mplot3d.proj3d.line2d_seg_dist` -- :func:`mpl_toolkits.mplot3d.proj3d.mod` -- :func:`mpl_toolkits.mplot3d.proj3d.proj_transform_vec` -- :func:`mpl_toolkits.mplot3d.proj3d.proj_transform_vec_clip` -- :func:`mpl_toolkits.mplot3d.proj3d.vec_pad_ones` -- :func:`mpl_toolkits.mplot3d.proj3d.proj_trans_clip_points` - -If your project relies on these functions, consider vendoring them. diff --git a/doc/api/prev_api_changes/api_changes_3.1.0.rst b/doc/api/prev_api_changes/api_changes_3.1.0.rst index 60ec3439dcd3..e8da17922626 100644 --- a/doc/api/prev_api_changes/api_changes_3.1.0.rst +++ b/doc/api/prev_api_changes/api_changes_3.1.0.rst @@ -41,6 +41,13 @@ with nonfinite values are plotted using the bad color of the `.collections.PathCollection`\ 's colormap (as set by :meth:`.colors.Colormap.set_bad`). +Alpha blending in imshow of RBGA input +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The alpha-channel of RBGA images is now re-sampled independently of +RGB channels. While this is a bug fix, it does change the output and +may result in some down-stream image comparison tests to fail. + Autoscaling ~~~~~~~~~~~ On log-axes where a single value is plotted at a "full" decade (1, 10, 100, @@ -404,6 +411,26 @@ non-callable), the exception would be silently ignored and the default formatter be used instead. This is no longer the case; the exception is now propagated out. +Deprecation of redundant `Tick` attributes +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The ``gridOn``, ``tick1On``, ``tick2On``, ``label1On``, and ``label2On`` +`~.Tick` attributes have been deprecated. Directly get and set the visibility +on the underlying artists, available as the ``gridline``, ``tick1line``, +``tick2line``, ``label1``, and ``label2`` attributes. + +The ``label`` attribute, which was an alias for ``label1``, has been +deprecated. + +Subclasses that relied on setting the above visibility attributes needs to be +updated; see e.g. :file:`examples/api/skewt.py`. + +Passing a Line2D's drawstyle together with the linestyle is deprecated +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Instead of ``plt.plot(..., linestyle="steps--")``, use ``plt.plot(..., +linestyle="--", drawstyle="steps")``. ``ds`` is now an alias for ``drawstyle``. + ``pgi`` support dropped ----------------------- @@ -454,6 +481,12 @@ Exception changes a `RuntimeError` if they were called with a ``data`` kwarg and otherwise mismatched arguments. They now raise a `TypeError` instead. +- `.Axes.streamplot` does not support irregularly gridded ``x`` and ``y`` values. + So far, it used to silently plot an incorrect result. This has been changed to + raise a `ValueError` instead. +- The `.streamplot.Grid` class, which is internally used by streamplot + code, also throws a `ValueError` when irregularly gridded values are + passed in. Removals -------- @@ -842,6 +875,37 @@ future version. - `.cbook.is_hashable` Use ``isinstance(..., collections.abc.Hashable)`` instead. +- The `.backend_bases.RendererBase.strip_math`. Use + `.cbook.strip_math` instead. + +Multiple internal functions that were exposed as part of the public API +of `.mpl_toolkits.mplot3d` are deprecated, + +**mpl_toolkits.mplot3d.art3d** + +- :func:`mpl_toolkits.mplot3d.art3d.norm_angle` +- :func:`mpl_toolkits.mplot3d.art3d.norm_text_angle` +- :func:`mpl_toolkits.mplot3d.art3d.path_to_3d_segment` +- :func:`mpl_toolkits.mplot3d.art3d.paths_to_3d_segments` +- :func:`mpl_toolkits.mplot3d.art3d.path_to_3d_segment_with_codes` +- :func:`mpl_toolkits.mplot3d.art3d.paths_to_3d_segments_with_codes` +- :func:`mpl_toolkits.mplot3d.art3d.get_patch_verts` +- :func:`mpl_toolkits.mplot3d.art3d.get_colors` +- :func:`mpl_toolkits.mplot3d.art3d.zalpha` + +**mpl_toolkits.mplot3d.proj3d** + +- :func:`mpl_toolkits.mplot3d.proj3d.line2d` +- :func:`mpl_toolkits.mplot3d.proj3d.line2d_dist` +- :func:`mpl_toolkits.mplot3d.proj3d.line2d_seg_dist` +- :func:`mpl_toolkits.mplot3d.proj3d.mod` +- :func:`mpl_toolkits.mplot3d.proj3d.proj_transform_vec` +- :func:`mpl_toolkits.mplot3d.proj3d.proj_transform_vec_clip` +- :func:`mpl_toolkits.mplot3d.proj3d.vec_pad_ones` +- :func:`mpl_toolkits.mplot3d.proj3d.proj_trans_clip_points` + +If your project relies on these functions, consider vendoring them. + Font Handling ~~~~~~~~~~~~~ @@ -907,8 +971,10 @@ GUI / backend details as it is a module-level global, no deprecation warning is emitted when accessing it). - `.mlab.demean` - - +- ``backend_gtk3cairo.FigureCanvasGTK3Cairo``, +- ``backend_wx.debug_on_error``, ``backend_wx.fake_stderr``, + ``backend_wx.raise_msg_to_str``, ``backend_wx.MenuButtonWx``, + ``backend_wx.PrintoutWx``, - ``matplotlib.backends.qt_editor.formlayout`` module This module is a vendored, modified version of the official formlayout_ module @@ -1067,6 +1133,14 @@ updated to use `~.Formatter.format_ticks`. subclasses for which the formatting of a tick value depends on other tick values, such as `.ConciseDateFormatter`. +Added support for RGB(A) images in pcolorfast +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +pcolorfast now accepts 3D images (RGB or RGBA) arrays if the X and Y +specifications allow image or pcolorimage rendering; they remain unsupported by +the more general quadmesh rendering + + Invalid inputs --------------