diff --git a/doc/api/_enums_api.rst b/doc/api/_enums_api.rst
index c9e283305967..c38d535f3573 100644
--- a/doc/api/_enums_api.rst
+++ b/doc/api/_enums_api.rst
@@ -12,4 +12,3 @@
.. autoclass:: CapStyle
:members: demo
:exclude-members: butt, round, projecting, input_description
-
diff --git a/doc/api/afm_api.rst b/doc/api/afm_api.rst
index 7e6d307cca33..bcae04150909 100644
--- a/doc/api/afm_api.rst
+++ b/doc/api/afm_api.rst
@@ -2,7 +2,12 @@
``matplotlib.afm``
******************
-.. automodule:: matplotlib.afm
+.. attention::
+ This module is considered internal.
+
+ Its use is deprecated and it will be removed in a future version.
+
+.. automodule:: matplotlib._afm
:members:
:undoc-members:
:show-inheritance:
diff --git a/doc/api/animation_api.rst b/doc/api/animation_api.rst
index c47416a3a424..d1b81e20b5c8 100644
--- a/doc/api/animation_api.rst
+++ b/doc/api/animation_api.rst
@@ -12,23 +12,15 @@
:backlinks: entry
-Inheritance Diagrams
-====================
-
-.. inheritance-diagram:: matplotlib.animation.FuncAnimation matplotlib.animation.ArtistAnimation
- :private-bases:
- :parts: 1
-
-.. inheritance-diagram:: matplotlib.animation.FFMpegFileWriter matplotlib.animation.FFMpegWriter matplotlib.animation.ImageMagickFileWriter matplotlib.animation.ImageMagickWriter
- :private-bases:
- :parts: 1
-
Animation
=========
The easiest way to make a live animation in Matplotlib is to use one of the
`Animation` classes.
+.. inheritance-diagram:: matplotlib.animation.FuncAnimation matplotlib.animation.ArtistAnimation
+ :parts: 1
+
.. autosummary::
:toctree: _as_gen
:nosignatures:
@@ -105,13 +97,18 @@ this hopefully minimalist example gives a sense of how ``init_func``
and ``func`` are used inside of `FuncAnimation` and the theory of how
'blitting' works.
+.. note::
+
+ The zorder of artists is not taken into account when 'blitting'
+ because the 'blitted' artists are always drawn on top.
+
The expected signature on ``func`` and ``init_func`` is very simple to
keep `FuncAnimation` out of your book keeping and plotting logic, but
this means that the callable objects you pass in must know what
artists they should be working on. There are several approaches to
handling this, of varying complexity and encapsulation. The simplest
approach, which works quite well in the case of a script, is to define the
-artist at a global scope and let Python sort things out. For example ::
+artist at a global scope and let Python sort things out. For example::
import numpy as np
import matplotlib.pyplot as plt
@@ -119,7 +116,7 @@ artist at a global scope and let Python sort things out. For example ::
fig, ax = plt.subplots()
xdata, ydata = [], []
- ln, = plt.plot([], [], 'ro')
+ ln, = ax.plot([], [], 'ro')
def init():
ax.set_xlim(0, 2*np.pi)
@@ -136,8 +133,36 @@ artist at a global scope and let Python sort things out. For example ::
init_func=init, blit=True)
plt.show()
-The second method is to use `functools.partial` to 'bind' artists to
-function. A third method is to use closures to build up the required
+The second method is to use `functools.partial` to pass arguments to the
+function::
+
+ import numpy as np
+ import matplotlib.pyplot as plt
+ from matplotlib.animation import FuncAnimation
+ from functools import partial
+
+ fig, ax = plt.subplots()
+ line1, = ax.plot([], [], 'ro')
+
+ def init():
+ ax.set_xlim(0, 2*np.pi)
+ ax.set_ylim(-1, 1)
+ return line1,
+
+ def update(frame, ln, x, y):
+ x.append(frame)
+ y.append(np.sin(frame))
+ ln.set_data(x, y)
+ return ln,
+
+ ani = FuncAnimation(
+ fig, partial(update, ln=line1, x=[], y=[]),
+ frames=np.linspace(0, 2*np.pi, 128),
+ init_func=init, blit=True)
+
+ plt.show()
+
+A third method is to use closures to build up the required
artists and functions. A fourth method is to create a class.
Examples
@@ -170,6 +195,10 @@ Examples
Writer Classes
==============
+.. inheritance-diagram:: matplotlib.animation.FFMpegFileWriter matplotlib.animation.FFMpegWriter matplotlib.animation.ImageMagickFileWriter matplotlib.animation.ImageMagickWriter matplotlib.animation.PillowWriter matplotlib.animation.HTMLWriter
+ :top-classes: matplotlib.animation.AbstractMovieWriter
+ :parts: 1
+
The provided writers fall into a few broad categories.
The Pillow writer relies on the Pillow library to write the animation, keeping
diff --git a/doc/api/artist_api.rst b/doc/api/artist_api.rst
index 119d5fa3464c..3903bbd5924d 100644
--- a/doc/api/artist_api.rst
+++ b/doc/api/artist_api.rst
@@ -11,7 +11,7 @@
Inheritance Diagrams
====================
-.. inheritance-diagram:: matplotlib.axes._axes.Axes matplotlib.axes._base._AxesBase matplotlib.axis.Axis matplotlib.axis.Tick matplotlib.axis.XAxis matplotlib.axis.XTick matplotlib.axis.YAxis matplotlib.axis.YTick matplotlib.collections.AsteriskPolygonCollection matplotlib.collections.BrokenBarHCollection matplotlib.collections.CircleCollection matplotlib.collections.Collection matplotlib.collections.EllipseCollection matplotlib.collections.EventCollection matplotlib.collections.LineCollection matplotlib.collections.PatchCollection matplotlib.collections.PathCollection matplotlib.collections.PolyCollection matplotlib.collections.QuadMesh matplotlib.collections.RegularPolyCollection matplotlib.collections.StarPolygonCollection matplotlib.collections.TriMesh matplotlib.collections._CollectionWithSizes matplotlib.contour.ClabelText matplotlib.figure.Figure matplotlib.image.AxesImage matplotlib.image.BboxImage matplotlib.image.FigureImage matplotlib.image.NonUniformImage matplotlib.image.PcolorImage matplotlib.image._ImageBase matplotlib.legend.Legend matplotlib.lines.Line2D matplotlib.offsetbox.AnchoredOffsetbox matplotlib.offsetbox.AnchoredText matplotlib.offsetbox.AnnotationBbox matplotlib.offsetbox.AuxTransformBox matplotlib.offsetbox.DrawingArea matplotlib.offsetbox.HPacker matplotlib.offsetbox.OffsetBox matplotlib.offsetbox.OffsetImage matplotlib.offsetbox.PackerBase matplotlib.offsetbox.PaddedBox matplotlib.offsetbox.TextArea matplotlib.offsetbox.VPacker matplotlib.patches.Arc matplotlib.patches.Arrow matplotlib.patches.Circle matplotlib.patches.CirclePolygon matplotlib.patches.ConnectionPatch matplotlib.patches.Ellipse matplotlib.patches.FancyArrow matplotlib.patches.FancyArrowPatch matplotlib.patches.FancyBboxPatch matplotlib.patches.Patch matplotlib.patches.PathPatch matplotlib.patches.StepPatch matplotlib.patches.Polygon matplotlib.patches.Rectangle matplotlib.patches.RegularPolygon matplotlib.patches.Shadow matplotlib.patches.Wedge matplotlib.projections.geo.AitoffAxes matplotlib.projections.geo.GeoAxes matplotlib.projections.geo.HammerAxes matplotlib.projections.geo.LambertAxes matplotlib.projections.geo.MollweideAxes matplotlib.projections.polar.PolarAxes matplotlib.quiver.Barbs matplotlib.quiver.Quiver matplotlib.quiver.QuiverKey matplotlib.spines.Spine matplotlib.table.Cell matplotlib.table.CustomCell matplotlib.table.Table matplotlib.text.Annotation matplotlib.text.Text
+.. inheritance-diagram:: matplotlib.axes._axes.Axes matplotlib.axes._base._AxesBase matplotlib.axis.Axis matplotlib.axis.Tick matplotlib.axis.XAxis matplotlib.axis.XTick matplotlib.axis.YAxis matplotlib.axis.YTick matplotlib.collections.AsteriskPolygonCollection matplotlib.collections.BrokenBarHCollection matplotlib.collections.CircleCollection matplotlib.collections.Collection matplotlib.collections.EllipseCollection matplotlib.collections.EventCollection matplotlib.collections.LineCollection matplotlib.collections.PatchCollection matplotlib.collections.PathCollection matplotlib.collections.PolyCollection matplotlib.collections.QuadMesh matplotlib.collections.RegularPolyCollection matplotlib.collections.StarPolygonCollection matplotlib.collections.TriMesh matplotlib.collections._CollectionWithSizes matplotlib.contour.ClabelText matplotlib.contour.ContourSet matplotlib.contour.QuadContourSet matplotlib.figure.FigureBase matplotlib.figure.Figure matplotlib.figure.SubFigure matplotlib.image.AxesImage matplotlib.image.BboxImage matplotlib.image.FigureImage matplotlib.image.NonUniformImage matplotlib.image.PcolorImage matplotlib.image._ImageBase matplotlib.legend.Legend matplotlib.lines.Line2D matplotlib.offsetbox.AnchoredOffsetbox matplotlib.offsetbox.AnchoredText matplotlib.offsetbox.AnnotationBbox matplotlib.offsetbox.AuxTransformBox matplotlib.offsetbox.DrawingArea matplotlib.offsetbox.HPacker matplotlib.offsetbox.OffsetBox matplotlib.offsetbox.OffsetImage matplotlib.offsetbox.PackerBase matplotlib.offsetbox.PaddedBox matplotlib.offsetbox.TextArea matplotlib.offsetbox.VPacker matplotlib.patches.Annulus matplotlib.patches.Arc matplotlib.patches.Arrow matplotlib.patches.Circle matplotlib.patches.CirclePolygon matplotlib.patches.ConnectionPatch matplotlib.patches.Ellipse matplotlib.patches.FancyArrow matplotlib.patches.FancyArrowPatch matplotlib.patches.FancyBboxPatch matplotlib.patches.Patch matplotlib.patches.PathPatch matplotlib.patches.Polygon matplotlib.patches.Rectangle matplotlib.patches.RegularPolygon matplotlib.patches.Shadow matplotlib.patches.StepPatch matplotlib.patches.Wedge matplotlib.projections.geo.AitoffAxes matplotlib.projections.geo.GeoAxes matplotlib.projections.geo.HammerAxes matplotlib.projections.geo.LambertAxes matplotlib.projections.geo.MollweideAxes matplotlib.projections.polar.PolarAxes matplotlib.projections.polar.RadialAxis matplotlib.projections.polar.RadialTick matplotlib.projections.polar.ThetaAxis matplotlib.projections.polar.ThetaTick matplotlib.quiver.Barbs matplotlib.quiver.Quiver matplotlib.quiver.QuiverKey matplotlib.spines.Spine matplotlib.table.Cell matplotlib.table.Table matplotlib.text.Annotation matplotlib.text.Text matplotlib.tri.TriContourSet
:parts: 1
:private-bases:
@@ -27,6 +27,7 @@ Interactive
-----------
.. autosummary::
+ :template: autosummary.rst
:toctree: _as_gen
:nosignatures:
@@ -35,6 +36,8 @@ Interactive
Artist.pchanged
Artist.get_cursor_data
Artist.format_cursor_data
+ Artist.set_mouseover
+ Artist.get_mouseover
Artist.mouseover
Artist.contains
Artist.pick
@@ -46,6 +49,7 @@ Clipping
--------
.. autosummary::
+ :template: autosummary.rst
:toctree: _as_gen
:nosignatures:
@@ -60,6 +64,7 @@ Bulk Properties
---------------
.. autosummary::
+ :template: autosummary.rst
:toctree: _as_gen
:nosignatures:
@@ -72,6 +77,7 @@ Drawing
-------
.. autosummary::
+ :template: autosummary.rst
:toctree: _as_gen
:nosignatures:
@@ -99,12 +105,14 @@ Drawing
Artist.get_agg_filter
Artist.get_window_extent
+ Artist.get_tightbbox
Artist.get_transformed_clip_path_and_affine
Figure and Axes
---------------
.. autosummary::
+ :template: autosummary.rst
:toctree: _as_gen
:nosignatures:
@@ -119,6 +127,7 @@ Children
--------
.. autosummary::
+ :template: autosummary.rst
:toctree: _as_gen
:nosignatures:
@@ -129,6 +138,7 @@ Transform
---------
.. autosummary::
+ :template: autosummary.rst
:toctree: _as_gen
:nosignatures:
@@ -140,6 +150,7 @@ Units
-----
.. autosummary::
+ :template: autosummary.rst
:toctree: _as_gen
:nosignatures:
@@ -151,6 +162,7 @@ Metadata
--------
.. autosummary::
+ :template: autosummary.rst
:toctree: _as_gen
:nosignatures:
@@ -165,6 +177,7 @@ Miscellaneous
-------------
.. autosummary::
+ :template: autosummary.rst
:toctree: _as_gen
:nosignatures:
@@ -177,6 +190,7 @@ Functions
=========
.. autosummary::
+ :template: autosummary.rst
:toctree: _as_gen
:nosignatures:
diff --git a/doc/api/axes_api.rst b/doc/api/axes_api.rst
index 231e5be98ddf..8d0951626f72 100644
--- a/doc/api/axes_api.rst
+++ b/doc/api/axes_api.rst
@@ -2,6 +2,10 @@
``matplotlib.axes``
*******************
+The `~.axes.Axes` class represents one (sub-)plot in a figure. It contains the
+plotted data, axis ticks, labels, title, legend, etc. Its methods are the main
+interface for manipulating the plot.
+
.. currentmodule:: matplotlib.axes
.. contents:: Table of Contents
@@ -14,30 +18,15 @@
:no-members:
:no-undoc-members:
-Inheritance
-===========
-.. inheritance-diagram:: matplotlib.axes.Axes
- :private-bases:
-
The Axes class
==============
-.. autoclass:: Axes
- :no-members:
- :no-undoc-members:
- :show-inheritance:
-
-
-Subplots
-========
-
.. autosummary::
:toctree: _as_gen
- :template: autosummary.rst
+ :template: autosummary_class_only.rst
:nosignatures:
- SubplotBase
- subplot_class_factory
+ Axes
Plotting
========
@@ -313,6 +302,7 @@ Axis labels, title, and legend
Axes.get_xlabel
Axes.set_ylabel
Axes.get_ylabel
+ Axes.label_outer
Axes.set_title
Axes.get_title
@@ -484,6 +474,9 @@ Axes position
Axes.get_axes_locator
Axes.set_axes_locator
+ Axes.get_subplotspec
+ Axes.set_subplotspec
+
Axes.reset_position
Axes.get_position
diff --git a/doc/api/axis_api.rst b/doc/api/axis_api.rst
index 7161671f2ab6..e7da26a11706 100644
--- a/doc/api/axis_api.rst
+++ b/doc/api/axis_api.rst
@@ -41,7 +41,6 @@ Inheritance
:nosignatures:
Axis.clear
- Axis.cla
Axis.get_scale
@@ -101,6 +100,7 @@ Ticks, tick labels and Offset text
Axis.get_offset_text
Axis.get_tick_padding
+ Axis.get_tick_params
Axis.get_ticklabels
Axis.get_ticklines
Axis.get_ticklocs
@@ -151,6 +151,7 @@ Interactive
:nosignatures:
Axis.contains
+ Axis.pickradius
Axis.get_pickradius
Axis.set_pickradius
diff --git a/doc/api/backend_agg_api.rst b/doc/api/backend_agg_api.rst
index 134a0d83cde0..752f348f8747 100644
--- a/doc/api/backend_agg_api.rst
+++ b/doc/api/backend_agg_api.rst
@@ -1,5 +1,6 @@
-:mod:`.backend_agg`
-===================
+***********************************
+``matplotlib.backends.backend_agg``
+***********************************
.. automodule:: matplotlib.backends.backend_agg
:members:
diff --git a/doc/api/backend_bases_api.rst b/doc/api/backend_bases_api.rst
index 990a1a091f81..c98a6af3e05e 100644
--- a/doc/api/backend_bases_api.rst
+++ b/doc/api/backend_bases_api.rst
@@ -1,6 +1,6 @@
-
-:mod:`matplotlib.backend_bases`
-================================
+****************************
+``matplotlib.backend_bases``
+****************************
.. automodule:: matplotlib.backend_bases
:members:
diff --git a/doc/api/backend_cairo_api.rst b/doc/api/backend_cairo_api.rst
index 0ef9d6903007..66371ec6895c 100644
--- a/doc/api/backend_cairo_api.rst
+++ b/doc/api/backend_cairo_api.rst
@@ -1,5 +1,6 @@
-:mod:`.backend_cairo`
-=====================
+*************************************
+``matplotlib.backends.backend_cairo``
+*************************************
.. automodule:: matplotlib.backends.backend_cairo
:members:
diff --git a/doc/api/backend_gtk3_api.rst b/doc/api/backend_gtk3_api.rst
index 7340ba003ee7..66c247555df4 100644
--- a/doc/api/backend_gtk3_api.rst
+++ b/doc/api/backend_gtk3_api.rst
@@ -1,8 +1,9 @@
-:mod:`.backend_gtk3agg`, :mod:`.backend_gtk3cairo`
-==================================================
+**********************************************************************************
+``matplotlib.backends.backend_gtk3agg``, ``matplotlib.backends.backend_gtk3cairo``
+**********************************************************************************
-**NOTE** These backends are not documented here, to avoid adding a dependency
-to building the docs.
+**NOTE** These :ref:`backends` are not documented here, to avoid adding a
+dependency to building the docs.
.. redirect-from:: /api/backend_gtk3agg_api
.. redirect-from:: /api/backend_gtk3cairo_api
diff --git a/doc/api/backend_gtk4_api.rst b/doc/api/backend_gtk4_api.rst
index 81c33c9a6ffd..8f2e38d885a8 100644
--- a/doc/api/backend_gtk4_api.rst
+++ b/doc/api/backend_gtk4_api.rst
@@ -1,8 +1,9 @@
-:mod:`.backend_gtk4agg`, :mod:`.backend_gtk4cairo`
-==================================================
+**********************************************************************************
+``matplotlib.backends.backend_gtk4agg``, ``matplotlib.backends.backend_gtk4cairo``
+**********************************************************************************
-**NOTE** These backends are not documented here, to avoid adding a dependency
-to building the docs.
+**NOTE** These :ref:`backends` are not documented here, to avoid adding a
+dependency to building the docs.
.. redirect-from:: /api/backend_gtk4agg_api
.. redirect-from:: /api/backend_gtk4cairo_api
diff --git a/doc/api/backend_managers_api.rst b/doc/api/backend_managers_api.rst
index faf4eda18de3..3e77e89dbbce 100644
--- a/doc/api/backend_managers_api.rst
+++ b/doc/api/backend_managers_api.rst
@@ -1,6 +1,6 @@
-
-:mod:`matplotlib.backend_managers`
-==================================
+*******************************
+``matplotlib.backend_managers``
+*******************************
.. automodule:: matplotlib.backend_managers
:members:
diff --git a/doc/api/backend_mixed_api.rst b/doc/api/backend_mixed_api.rst
index 35f7a49a08c4..61d770e56ccf 100644
--- a/doc/api/backend_mixed_api.rst
+++ b/doc/api/backend_mixed_api.rst
@@ -1,5 +1,6 @@
-:mod:`.backend_mixed`
-=====================
+*************************************
+``matplotlib.backends.backend_mixed``
+*************************************
.. automodule:: matplotlib.backends.backend_mixed
:members:
diff --git a/doc/api/backend_nbagg_api.rst b/doc/api/backend_nbagg_api.rst
index dddeb7ac3c74..6596f461bbf0 100644
--- a/doc/api/backend_nbagg_api.rst
+++ b/doc/api/backend_nbagg_api.rst
@@ -1,5 +1,6 @@
-:mod:`.backend_nbagg`
-=====================
+*************************************
+``matplotlib.backends.backend_nbagg``
+*************************************
.. automodule:: matplotlib.backends.backend_nbagg
:members:
diff --git a/doc/api/backend_pdf_api.rst b/doc/api/backend_pdf_api.rst
index 1743083b4de8..014c3e6e5017 100644
--- a/doc/api/backend_pdf_api.rst
+++ b/doc/api/backend_pdf_api.rst
@@ -1,5 +1,6 @@
-:mod:`.backend_pdf`
-===================
+***********************************
+``matplotlib.backends.backend_pdf``
+***********************************
.. automodule:: matplotlib.backends.backend_pdf
:members:
diff --git a/doc/api/backend_pgf_api.rst b/doc/api/backend_pgf_api.rst
index 2902742c744b..9f90beb72a1b 100644
--- a/doc/api/backend_pgf_api.rst
+++ b/doc/api/backend_pgf_api.rst
@@ -1,5 +1,6 @@
-:mod:`.backend_pgf`
-===================
+***********************************
+``matplotlib.backends.backend_pgf``
+***********************************
.. automodule:: matplotlib.backends.backend_pgf
:members:
diff --git a/doc/api/backend_ps_api.rst b/doc/api/backend_ps_api.rst
index d97e024b9d5c..d9b07d961b4b 100644
--- a/doc/api/backend_ps_api.rst
+++ b/doc/api/backend_ps_api.rst
@@ -1,5 +1,6 @@
-:mod:`.backend_ps`
-==================
+**********************************
+``matplotlib.backends.backend_ps``
+**********************************
.. automodule:: matplotlib.backends.backend_ps
:members:
diff --git a/doc/api/backend_qt_api.rst b/doc/api/backend_qt_api.rst
index 622889c10e5c..ebfeedceb6e1 100644
--- a/doc/api/backend_qt_api.rst
+++ b/doc/api/backend_qt_api.rst
@@ -1,8 +1,9 @@
-:mod:`.backend_qtagg`, :mod:`.backend_qtcairo`
-==============================================
+******************************************************************************
+``matplotlib.backends.backend_qtagg``, ``matplotlib.backends.backend_qtcairo``
+******************************************************************************
-**NOTE** These backends are not (auto) documented here, to avoid adding a
-dependency to building the docs.
+**NOTE** These :ref:`backends` are not (auto) documented here, to avoid adding
+a dependency to building the docs.
.. redirect-from:: /api/backend_qt4agg_api
.. redirect-from:: /api/backend_qt4cairo_api
@@ -26,7 +27,32 @@ supported Python bindings per version -- `PyQt5
`_ and `PySide2
`_ for Qt5 and `PyQt6
`_ and `PySide6
-`_ for Qt6 [#]_. While both PyQt
+`_ for Qt6 [#]_. Matplotlib's
+qtagg and qtcairo backends (``matplotlib.backends.backend_qtagg`` and
+``matplotlib.backend.backend_qtcairo``) support all these bindings, with common
+parts factored out in the ``matplotlib.backends.backend_qt`` module.
+
+At runtime, these backends select the actual binding used as follows:
+
+1. If a binding's ``QtCore`` subpackage is already imported, that binding is
+ selected (the order for the check is ``PyQt6``, ``PySide6``, ``PyQt5``,
+ ``PySide2``).
+2. If the :envvar:`QT_API` environment variable is set to one of "PyQt6",
+ "PySide6", "PyQt5", "PySide2" (case-insensitive), that binding is selected.
+ (See also the documentation on :ref:`environment-variables`.)
+3. Otherwise, the first available backend in the order ``PyQt6``, ``PySide6``,
+ ``PyQt5``, ``PySide2`` is selected.
+
+In the past, Matplotlib used to have separate backends for each version of Qt
+(e.g. qt4agg/``matplotlib.backends.backend_qt4agg`` and
+qt5agg/``matplotlib.backends.backend_qt5agg``). This scheme was dropped when
+support for Qt6 was added. For back-compatibility, qt5agg/``backend_qt5agg``
+and qt5cairo/``backend_qt5cairo`` remain available; selecting one of these
+backends forces the use of a Qt5 binding. Their use is discouraged and
+``backend_qtagg`` or ``backend_qtcairo`` should be preferred instead. However,
+these modules will not be deprecated until we drop support for Qt5.
+
+While both PyQt
and Qt for Python (aka PySide) closely mirror the underlying C++ API they are
wrapping, they are not drop-in replacements for each other [#]_. To account
for this, Matplotlib has an internal API compatibility layer in
@@ -34,31 +60,6 @@ for this, Matplotlib has an internal API compatibility layer in
module, we do not consider this to be a stable user-facing API and it may
change without warning [#]_.
-Previously Matplotlib's Qt backends had the Qt version number in the name, both
-in the module and the :rc:`backend` value
-(e.g. ``matplotlib.backends.backend_qt4agg`` and
-``matplotlib.backends.backend_qt5agg``). However as part of adding support for
-Qt6 we were able to support both Qt5 and Qt6 with a single implementation with
-all of the Qt version and binding support handled in
-`~matplotlib.backends.qt_compat`. A majority of the renderer agnostic Qt code
-is now in `matplotlib.backends.backend_qt` with specialization for AGG in
-``backend_qtagg`` and cairo in ``backend_qtcairo``.
-
-The binding is selected at run time based on what bindings are already imported
-(by checking for the ``QtCore`` sub-package), then by the :envvar:`QT_API`
-environment variable, and finally by the :rc:`backend`. In all cases when we
-need to search, the order is ``PyQt6``, ``PySide6``, ``PyQt5``, ``PySide2``.
-See :ref:`QT_API-usage` for usage instructions.
-
-The ``backend_qt5``, ``backend_qt5agg``, and ``backend_qt5cairo`` are provided
-and force the use of a Qt5 binding for backwards compatibility. Their use is
-discouraged (but not deprecated) and ``backend_qt``, ``backend_qtagg``, or
-``backend_qtcairo`` should be preferred instead. However, these modules will
-not be deprecated until we drop support for Qt5.
-
-
-
-
.. [#] There is also `PyQt4
`_ and `PySide
`_ for Qt4 but these are no
diff --git a/doc/api/backend_svg_api.rst b/doc/api/backend_svg_api.rst
index a6208a897431..2e7c1c9f5db1 100644
--- a/doc/api/backend_svg_api.rst
+++ b/doc/api/backend_svg_api.rst
@@ -1,5 +1,6 @@
-:mod:`.backend_svg`
-===================
+***********************************
+``matplotlib.backends.backend_svg``
+***********************************
.. automodule:: matplotlib.backends.backend_svg
:members:
diff --git a/doc/api/backend_template_api.rst b/doc/api/backend_template_api.rst
index 0f7bffee4b74..8198eeae121e 100644
--- a/doc/api/backend_template_api.rst
+++ b/doc/api/backend_template_api.rst
@@ -1,5 +1,6 @@
-:mod:`.backend_template`
-========================
+****************************************
+``matplotlib.backends.backend_template``
+****************************************
.. automodule:: matplotlib.backends.backend_template
:members:
diff --git a/doc/api/backend_tk_api.rst b/doc/api/backend_tk_api.rst
index 5eaa1873cebe..08abf603fd91 100644
--- a/doc/api/backend_tk_api.rst
+++ b/doc/api/backend_tk_api.rst
@@ -1,5 +1,6 @@
-:mod:`.backend_tkagg`, :mod:`.backend_tkcairo`
-==============================================
+******************************************************************************
+``matplotlib.backends.backend_tkagg``, ``matplotlib.backends.backend_tkcairo``
+******************************************************************************
.. automodule:: matplotlib.backends.backend_tkagg
:members:
diff --git a/doc/api/backend_tools_api.rst b/doc/api/backend_tools_api.rst
index 7e3d5619cc35..994f32ac854e 100644
--- a/doc/api/backend_tools_api.rst
+++ b/doc/api/backend_tools_api.rst
@@ -1,6 +1,6 @@
-
-:mod:`matplotlib.backend_tools`
-===============================
+****************************
+``matplotlib.backend_tools``
+****************************
.. automodule:: matplotlib.backend_tools
:members:
diff --git a/doc/api/backend_webagg_api.rst b/doc/api/backend_webagg_api.rst
index a4089473c903..ced3533da249 100644
--- a/doc/api/backend_webagg_api.rst
+++ b/doc/api/backend_webagg_api.rst
@@ -1,5 +1,6 @@
-:mod:`.backend_webagg`
-======================
+**************************************
+``matplotlib.backends.backend_webagg``
+**************************************
.. automodule:: matplotlib.backends.backend_webagg
:members:
diff --git a/doc/api/backend_wx_api.rst b/doc/api/backend_wx_api.rst
index a3b6d4155c11..abf506a161be 100644
--- a/doc/api/backend_wx_api.rst
+++ b/doc/api/backend_wx_api.rst
@@ -1,8 +1,9 @@
-:mod:`.backend_wxagg`, :mod:`.backend_wxcairo`
-==============================================
+******************************************************************************
+``matplotlib.backends.backend_wxagg``, ``matplotlib.backends.backend_wxcairo``
+******************************************************************************
-**NOTE** These backends are not documented here, to avoid adding a dependency
-to building the docs.
+**NOTE** These :ref:`backends` are not documented here, to avoid adding a
+dependency to building the docs.
.. redirect-from:: /api/backend_wxagg_api
diff --git a/doc/api/blocking_input_api.rst b/doc/api/blocking_input_api.rst
deleted file mode 100644
index 6ba612682ac4..000000000000
--- a/doc/api/blocking_input_api.rst
+++ /dev/null
@@ -1,8 +0,0 @@
-*****************************
-``matplotlib.blocking_input``
-*****************************
-
-.. automodule:: matplotlib.blocking_input
- :members:
- :undoc-members:
- :show-inheritance:
diff --git a/doc/api/colors_api.rst b/doc/api/colors_api.rst
index e7b6da70f641..970986ff4438 100644
--- a/doc/api/colors_api.rst
+++ b/doc/api/colors_api.rst
@@ -14,26 +14,44 @@
:no-members:
:no-inherited-members:
-Classes
--------
+Color norms
+-----------
.. autosummary::
:toctree: _as_gen/
:template: autosummary.rst
+ Normalize
+ NoNorm
+ AsinhNorm
BoundaryNorm
- Colormap
CenteredNorm
- LightSource
- LinearSegmentedColormap
- ListedColormap
+ FuncNorm
LogNorm
- NoNorm
- Normalize
PowerNorm
SymLogNorm
TwoSlopeNorm
- FuncNorm
+
+Colormaps
+---------
+
+.. autosummary::
+ :toctree: _as_gen/
+ :template: autosummary.rst
+
+ Colormap
+ LinearSegmentedColormap
+ ListedColormap
+
+Other classes
+-------------
+
+.. autosummary::
+ :toctree: _as_gen/
+ :template: autosummary.rst
+
+ ColorSequenceRegistry
+ LightSource
Functions
---------
diff --git a/doc/api/dates_api.rst b/doc/api/dates_api.rst
index 1150094aed1a..7a3e3bcf4a95 100644
--- a/doc/api/dates_api.rst
+++ b/doc/api/dates_api.rst
@@ -9,4 +9,5 @@
.. automodule:: matplotlib.dates
:members:
:undoc-members:
+ :exclude-members: rrule
:show-inheritance:
diff --git a/doc/api/docstring_api.rst b/doc/api/docstring_api.rst
index 853ff93494cf..38a73a2e83d1 100644
--- a/doc/api/docstring_api.rst
+++ b/doc/api/docstring_api.rst
@@ -2,7 +2,12 @@
``matplotlib.docstring``
************************
-.. automodule:: matplotlib.docstring
+.. attention::
+ This module is considered internal.
+
+ Its use is deprecated and it will be removed in a future version.
+
+.. automodule:: matplotlib._docstring
:members:
:undoc-members:
:show-inheritance:
diff --git a/doc/api/font_manager_api.rst b/doc/api/font_manager_api.rst
index 8b698bacf0fe..3e043112380b 100644
--- a/doc/api/font_manager_api.rst
+++ b/doc/api/font_manager_api.rst
@@ -7,5 +7,9 @@
:undoc-members:
:show-inheritance:
+ .. data:: fontManager
+
+ The global instance of `FontManager`.
+
.. autoclass:: FontEntry
:no-undoc-members:
diff --git a/doc/api/fontconfig_pattern_api.rst b/doc/api/fontconfig_pattern_api.rst
deleted file mode 100644
index 772900035df7..000000000000
--- a/doc/api/fontconfig_pattern_api.rst
+++ /dev/null
@@ -1,8 +0,0 @@
-*********************************
-``matplotlib.fontconfig_pattern``
-*********************************
-
-.. automodule:: matplotlib.fontconfig_pattern
- :members:
- :undoc-members:
- :show-inheritance:
diff --git a/doc/api/ft2font.rst b/doc/api/ft2font.rst
new file mode 100644
index 000000000000..a1f984abdda5
--- /dev/null
+++ b/doc/api/ft2font.rst
@@ -0,0 +1,8 @@
+**********************
+``matplotlib.ft2font``
+**********************
+
+.. automodule:: matplotlib.ft2font
+ :members:
+ :undoc-members:
+ :show-inheritance:
diff --git a/doc/api/hatch_api.rst b/doc/api/hatch_api.rst
new file mode 100644
index 000000000000..b706be379a15
--- /dev/null
+++ b/doc/api/hatch_api.rst
@@ -0,0 +1,8 @@
+********************
+``matplotlib.hatch``
+********************
+
+.. automodule:: matplotlib.hatch
+ :members:
+ :undoc-members:
+ :show-inheritance:
diff --git a/doc/api/index.rst b/doc/api/index.rst
index 1f9048787e69..2e8c33fa05e5 100644
--- a/doc/api/index.rst
+++ b/doc/api/index.rst
@@ -30,6 +30,62 @@ methods on them to plot data, add axis labels and a figure title.
fig.set_facecolor('lightsteelblue')
+
+.. _usage_patterns:
+
+Usage patterns
+--------------
+
+Below we describe several common approaches to plotting with Matplotlib. See
+:ref:`api_interfaces` for an explanation of the trade-offs between the supported user
+APIs.
+
+
+The explicit API
+^^^^^^^^^^^^^^^^
+
+At its core, Matplotlib is an object-oriented library. We recommend directly
+working with the objects if you need more control and customization of your
+plots.
+
+In many cases you will create a `.Figure` and one or more
+`~matplotlib.axes.Axes` using `.pyplot.subplots` and from then on only work
+on these objects. However, it's also possible to create `.Figure`\ s
+explicitly (e.g. when including them in GUI applications).
+
+Further reading:
+
+- `matplotlib.axes.Axes` and `matplotlib.figure.Figure` for an overview of
+ plotting functions.
+- Most of the :ref:`examples ` use the object-oriented approach
+ (except for the pyplot section)
+
+
+The implicit API
+^^^^^^^^^^^^^^^^
+
+`matplotlib.pyplot` is a collection of functions that make
+Matplotlib work like MATLAB. Each pyplot function makes some change to a
+figure: e.g., creates a figure, creates a plotting area in a figure, plots
+some lines in a plotting area, decorates the plot with labels, etc.
+
+`.pyplot` is mainly intended for interactive plots and simple cases of
+programmatic plot generation.
+
+Further reading:
+
+- The `matplotlib.pyplot` function reference
+- :doc:`/tutorials/introductory/pyplot`
+- :ref:`Pyplot examples `
+
+.. _api-index:
+
+The pylab API (discouraged)
+^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+.. automodule:: pylab
+ :no-members:
+
Modules
-------
@@ -49,7 +105,6 @@ Alphabetical list of modules:
backend_tools_api.rst
index_backend_api.rst
bezier_api.rst
- blocking_input_api.rst
category_api.rst
cbook_api.rst
cm_api.rst
@@ -63,9 +118,11 @@ Alphabetical list of modules:
dviread.rst
figure_api.rst
font_manager_api.rst
- fontconfig_pattern_api.rst
+ ft2font.rst
gridspec_api.rst
+ hatch_api.rst
image_api.rst
+ layout_engine_api.rst
legend_api.rst
legend_handler_api.rst
lines_api.rst
@@ -90,7 +147,6 @@ Alphabetical list of modules:
testing_api.rst
text_api.rst
texmanager_api.rst
- textpath_api.rst
ticker_api.rst
tight_bbox_api.rst
tight_layout_api.rst
@@ -104,55 +160,3 @@ Alphabetical list of modules:
toolkits/mplot3d.rst
toolkits/axes_grid1.rst
toolkits/axisartist.rst
- toolkits/axes_grid.rst
-
-
-.. _usage_patterns:
-
-Usage patterns
---------------
-
-Below we describe several common approaches to plotting with Matplotlib.
-
-The pyplot API
-^^^^^^^^^^^^^^
-
-`matplotlib.pyplot` is a collection of functions that make
-Matplotlib work like MATLAB. Each pyplot function makes some change to a
-figure: e.g., creates a figure, creates a plotting area in a figure, plots
-some lines in a plotting area, decorates the plot with labels, etc.
-
-`.pyplot` is mainly intended for interactive plots and simple cases of
-programmatic plot generation.
-
-Further reading:
-
-- The `matplotlib.pyplot` function reference
-- :doc:`/tutorials/introductory/pyplot`
-- :ref:`Pyplot examples `
-
-.. _api-index:
-
-The object-oriented API
-^^^^^^^^^^^^^^^^^^^^^^^
-
-At its core, Matplotlib is object-oriented. We recommend directly working
-with the objects, if you need more control and customization of your plots.
-
-In many cases you will create a `.Figure` and one or more
-`~matplotlib.axes.Axes` using `.pyplot.subplots` and from then on only work
-on these objects. However, it's also possible to create `.Figure`\ s
-explicitly (e.g. when including them in GUI applications).
-
-Further reading:
-
-- `matplotlib.axes.Axes` and `matplotlib.figure.Figure` for an overview of
- plotting functions.
-- Most of the :ref:`examples ` use the object-oriented approach
- (except for the pyplot section)
-
-The pylab API (discouraged)
-^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-.. automodule:: pylab
- :no-members:
diff --git a/doc/api/index_backend_api.rst b/doc/api/index_backend_api.rst
index 25c06820c9da..639d96a9a0dd 100644
--- a/doc/api/index_backend_api.rst
+++ b/doc/api/index_backend_api.rst
@@ -2,6 +2,8 @@
``matplotlib.backends``
***********************
+.. module:: matplotlib.backends
+
.. toctree::
:maxdepth: 1
diff --git a/doc/api/layout_engine_api.rst b/doc/api/layout_engine_api.rst
new file mode 100644
index 000000000000..8890061e0979
--- /dev/null
+++ b/doc/api/layout_engine_api.rst
@@ -0,0 +1,9 @@
+****************************
+``matplotlib.layout_engine``
+****************************
+
+.. currentmodule:: matplotlib.layout_engine
+
+.. automodule:: matplotlib.layout_engine
+ :members:
+ :inherited-members:
diff --git a/doc/api/lines_api.rst b/doc/api/lines_api.rst
index 808df726d118..4cde67c7e656 100644
--- a/doc/api/lines_api.rst
+++ b/doc/api/lines_api.rst
@@ -26,4 +26,3 @@ Functions
:template: autosummary.rst
segment_hits
-
\ No newline at end of file
diff --git a/doc/api/mathtext_api.rst b/doc/api/mathtext_api.rst
index c0f4941414ed..295ed0382c61 100644
--- a/doc/api/mathtext_api.rst
+++ b/doc/api/mathtext_api.rst
@@ -9,4 +9,3 @@
:members:
:undoc-members:
:show-inheritance:
- :exclude-members: Box, Char, ComputerModernFontConstants, DejaVuSansFontConstants, DejaVuSerifFontConstants, FontConstantsBase, Fonts, Glue, Kern, Node, Parser, STIXFontConstants, STIXSansFontConstants, Ship, StandardPsFonts, TruetypeFonts
diff --git a/doc/api/matplotlib_configuration_api.rst b/doc/api/matplotlib_configuration_api.rst
index 3636c45d0c71..d5dc60c80613 100644
--- a/doc/api/matplotlib_configuration_api.rst
+++ b/doc/api/matplotlib_configuration_api.rst
@@ -4,6 +4,11 @@
.. py:currentmodule:: matplotlib
+.. automodule:: matplotlib
+ :no-members:
+ :no-undoc-members:
+ :noindex:
+
Backend management
==================
@@ -26,6 +31,7 @@ Default values and styling
:no-members:
.. automethod:: find_all
+ .. automethod:: copy
.. autofunction:: rc_context
@@ -52,13 +58,18 @@ Logging
.. autofunction:: set_loglevel
-Colormaps
-=========
+Colormaps and color sequences
+=============================
.. autodata:: colormaps
:no-value:
+.. autodata:: color_sequences
+ :no-value:
+
Miscellaneous
=============
+.. autoclass:: MatplotlibDeprecationWarning
+
.. autofunction:: get_cachedir
diff --git a/doc/api/next_api_changes/behavior/00001-ABC.rst b/doc/api/next_api_changes/behavior/00001-ABC.rst
index 236f672c1123..f6d8c1d8b351 100644
--- a/doc/api/next_api_changes/behavior/00001-ABC.rst
+++ b/doc/api/next_api_changes/behavior/00001-ABC.rst
@@ -1,7 +1,7 @@
-Behavior Change template
+Behavior change template
~~~~~~~~~~~~~~~~~~~~~~~~
Enter description here....
Please rename file with PR number and your initials i.e. "99999-ABC.rst"
-and ``git add`` the new file.
+and ``git add`` the new file.
diff --git a/doc/api/next_api_changes/development/00001-ABC.rst b/doc/api/next_api_changes/development/00001-ABC.rst
index 4c60d3db185b..6db90a13e44c 100644
--- a/doc/api/next_api_changes/development/00001-ABC.rst
+++ b/doc/api/next_api_changes/development/00001-ABC.rst
@@ -1,7 +1,7 @@
-Development Change template
+Development change template
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Enter description here....
Please rename file with PR number and your initials i.e. "99999-ABC.rst"
-and ``git add`` the new file.
+and ``git add`` the new file.
diff --git a/doc/api/next_api_changes/removals/00001-ABC.rst b/doc/api/next_api_changes/removals/00001-ABC.rst
index 5c68eda9698a..3cc5b6344f7f 100644
--- a/doc/api/next_api_changes/removals/00001-ABC.rst
+++ b/doc/api/next_api_changes/removals/00001-ABC.rst
@@ -1,7 +1,7 @@
-Removal Change template
+Removal change template
~~~~~~~~~~~~~~~~~~~~~~~
Enter description of methods/classes removed here....
Please rename file with PR number and your initials i.e. "99999-ABC.rst"
-and ``git add`` the new file.
+and ``git add`` the new file.
diff --git a/doc/api/patches_api.rst b/doc/api/patches_api.rst
index 2c016f659cba..5b1eefa91971 100644
--- a/doc/api/patches_api.rst
+++ b/doc/api/patches_api.rst
@@ -48,4 +48,3 @@ Functions
bbox_artist
draw_bbox
-
diff --git a/doc/api/prev_api_changes/api_changes_0.65.rst b/doc/api/prev_api_changes/api_changes_0.65.rst
index 43fffb1bcf4e..f9b9af732010 100644
--- a/doc/api/prev_api_changes/api_changes_0.65.rst
+++ b/doc/api/prev_api_changes/api_changes_0.65.rst
@@ -8,5 +8,5 @@ Changes for 0.65
connect and disconnect
Did away with the text methods for angle since they were ambiguous.
- fontangle could mean fontstyle (obligue, etc) or the rotation of the
+ fontangle could mean fontstyle (oblique, etc) or the rotation of the
text. Use style and rotation instead.
diff --git a/doc/api/prev_api_changes/api_changes_0.70.rst b/doc/api/prev_api_changes/api_changes_0.70.rst
index b8094658b249..e30dfbb64954 100644
--- a/doc/api/prev_api_changes/api_changes_0.70.rst
+++ b/doc/api/prev_api_changes/api_changes_0.70.rst
@@ -6,4 +6,4 @@ Changes for 0.70
MplEvent factored into a base class Event and derived classes
MouseEvent and KeyEvent
- Removed definct set_measurement in wx toolbar
+ Removed defunct set_measurement in wx toolbar
diff --git a/doc/api/prev_api_changes/api_changes_0.72.rst b/doc/api/prev_api_changes/api_changes_0.72.rst
index 9529e396f356..bfb6fc124658 100644
--- a/doc/api/prev_api_changes/api_changes_0.72.rst
+++ b/doc/api/prev_api_changes/api_changes_0.72.rst
@@ -6,7 +6,7 @@ Changes for 0.72
- Line2D, Text, and Patch copy_properties renamed update_from and
moved into artist base class
- - LineCollecitons.color renamed to LineCollections.set_color for
+ - LineCollections.color renamed to LineCollections.set_color for
consistency with set/get introspection mechanism,
- pylab figure now defaults to num=None, which creates a new figure
diff --git a/doc/api/prev_api_changes/api_changes_0.91.0.rst b/doc/api/prev_api_changes/api_changes_0.91.0.rst
index b33fcb50f0ad..32760554522a 100644
--- a/doc/api/prev_api_changes/api_changes_0.91.0.rst
+++ b/doc/api/prev_api_changes/api_changes_0.91.0.rst
@@ -25,18 +25,18 @@ Changes for 0.91.0
* The :mod:`matplotlib.dviread` file now has a parser for files like
psfonts.map and pdftex.map, to map TeX font names to external files.
-* The file :mod:`matplotlib.type1font` contains a new class for Type 1
+* The file ``matplotlib.type1font`` contains a new class for Type 1
fonts. Currently it simply reads pfa and pfb format files and
stores the data in a way that is suitable for embedding in pdf
files. In the future the class might actually parse the font to
allow e.g., subsetting.
-* :mod:`matplotlib.ft2font` now supports ``FT_Attach_File``. In
+* ``matplotlib.ft2font`` now supports ``FT_Attach_File``. In
practice this can be used to read an afm file in addition to a
pfa/pfb file, to get metrics and kerning information for a Type 1
font.
-* The :class:`.AFM` class now supports querying CapHeight and stem
+* The ``AFM`` class now supports querying CapHeight and stem
widths. The get_name_char method now has an isord kwarg like
get_width_char.
diff --git a/doc/api/prev_api_changes/api_changes_0.98.0.rst b/doc/api/prev_api_changes/api_changes_0.98.0.rst
index c50b98cbab16..bb9f3e6585af 100644
--- a/doc/api/prev_api_changes/api_changes_0.98.0.rst
+++ b/doc/api/prev_api_changes/api_changes_0.98.0.rst
@@ -12,7 +12,7 @@ Changes for 0.98.0
rather than custom callback handling. Any users of
``matplotlib.cm.ScalarMappable.add_observer`` of the
:class:`~matplotlib.cm.ScalarMappable` should use the
- :attr:`matplotlib.cm.ScalarMappable.callbacksSM`
+ ``matplotlib.cm.ScalarMappable.callbacksSM``
:class:`~matplotlib.cbook.CallbackRegistry` instead.
* New axes function and Axes method provide control over the plot
@@ -181,7 +181,7 @@ The ``Polar`` class has moved to :mod:`matplotlib.projections.polar`.
.. [3] :meth:`matplotlib.axes.Axes.set_position` now accepts either
four scalars or a :class:`matplotlib.transforms.Bbox` instance.
-.. [4] Since the recfactoring allows for more than two scale types
+.. [4] Since the refactoring allows for more than two scale types
('log' or 'linear'), it no longer makes sense to have a toggle.
``Axes.toggle_log_lineary()`` has been removed.
diff --git a/doc/api/prev_api_changes/api_changes_0.98.x.rst b/doc/api/prev_api_changes/api_changes_0.98.x.rst
index 41ee63502254..053fd908a03e 100644
--- a/doc/api/prev_api_changes/api_changes_0.98.x.rst
+++ b/doc/api/prev_api_changes/api_changes_0.98.x.rst
@@ -63,8 +63,8 @@ Changes for 0.98.x
:meth:`matplotlib.axes.Axes.set_ylim` now return a copy of the
``viewlim`` array to avoid modify-in-place surprises.
-* :meth:`matplotlib.afm.AFM.get_fullname` and
- :meth:`matplotlib.afm.AFM.get_familyname` no longer raise an
+* ``matplotlib.afm.AFM.get_fullname`` and
+ ``matplotlib.afm.AFM.get_familyname`` no longer raise an
exception if the AFM file does not specify these optional
attributes, but returns a guess based on the required FontName
attribute.
@@ -87,13 +87,13 @@ Changes for 0.98.x
:class:`~matplotlib.collections.Collection` base class.
* ``matplotlib.figure.Figure.figurePatch`` renamed
- :attr:`matplotlib.figure.Figure.patch`;
+ ``matplotlib.figure.Figure.patch``;
``matplotlib.axes.Axes.axesPatch`` renamed
- :attr:`matplotlib.axes.Axes.patch`;
+ ``matplotlib.axes.Axes.patch``;
``matplotlib.axes.Axes.axesFrame`` renamed
- :attr:`matplotlib.axes.Axes.frame`.
+ ``matplotlib.axes.Axes.frame``.
``matplotlib.axes.Axes.get_frame``, which returns
- :attr:`matplotlib.axes.Axes.patch`, is deprecated.
+ ``matplotlib.axes.Axes.patch``, is deprecated.
* Changes in the :class:`matplotlib.contour.ContourLabeler` attributes
(:func:`matplotlib.pyplot.clabel` function) so that they all have a
diff --git a/doc/api/prev_api_changes/api_changes_0.99.x.rst b/doc/api/prev_api_changes/api_changes_0.99.x.rst
index 03596e93dac3..4736d066d43e 100644
--- a/doc/api/prev_api_changes/api_changes_0.99.x.rst
+++ b/doc/api/prev_api_changes/api_changes_0.99.x.rst
@@ -21,8 +21,8 @@ Changes beyond 0.99.x
on or off, and applies it.
+ :meth:`matplotlib.axes.Axes.margins` sets margins used to
- autoscale the :attr:`matplotlib.axes.Axes.viewLim` based on
- the :attr:`matplotlib.axes.Axes.dataLim`.
+ autoscale the ``matplotlib.axes.Axes.viewLim`` based on
+ the ``matplotlib.axes.Axes.dataLim``.
+ :meth:`matplotlib.axes.Axes.locator_params` allows one to
adjust axes locator parameters such as *nbins*.
diff --git a/doc/api/prev_api_changes/api_changes_1.3.x.rst b/doc/api/prev_api_changes/api_changes_1.3.x.rst
index 1cfba079bb5e..553f4d7118c7 100644
--- a/doc/api/prev_api_changes/api_changes_1.3.x.rst
+++ b/doc/api/prev_api_changes/api_changes_1.3.x.rst
@@ -33,7 +33,7 @@ Code removal
functionality on `matplotlib.path.Path.contains_point` and
friends instead.
- - Instead of ``axes.Axes.get_frame``, use `.axes.Axes.patch`.
+ - Instead of ``axes.Axes.get_frame``, use ``axes.Axes.patch``.
- The following keyword arguments to the `~.axes.Axes.legend` function have
been renamed:
@@ -102,7 +102,7 @@ Code deprecation
be used. In previous Matplotlib versions this attribute was an undocumented
tuple of ``(colorbar_instance, colorbar_axes)`` but is now just
``colorbar_instance``. To get the colorbar axes it is possible to just use
- the :attr:`~matplotlib.colorbar.ColorbarBase.ax` attribute on a colorbar
+ the ``matplotlib.colorbar.ColorbarBase.ax`` attribute on a colorbar
instance.
* The ``matplotlib.mpl`` module is now deprecated. Those who relied on this
@@ -192,7 +192,7 @@ Code changes
by ``self.vline`` for vertical cursors lines and ``self.hline`` is added
for the horizontal cursors lines.
-* On POSIX platforms, the :func:`~matplotlib.cbook.report_memory` function
+* On POSIX platforms, the ``matplotlib.cbook.report_memory`` function
raises :class:`NotImplementedError` instead of :class:`OSError` if the
:command:`ps` command cannot be run.
diff --git a/doc/api/prev_api_changes/api_changes_1.4.x.rst b/doc/api/prev_api_changes/api_changes_1.4.x.rst
index d0952784677c..c12d40a67991 100644
--- a/doc/api/prev_api_changes/api_changes_1.4.x.rst
+++ b/doc/api/prev_api_changes/api_changes_1.4.x.rst
@@ -82,7 +82,7 @@ original location:
* The artist used to draw the outline of a `.Figure.colorbar` has been changed
from a `matplotlib.lines.Line2D` to `matplotlib.patches.Polygon`, thus
- `.colorbar.ColorbarBase.outline` is now a `matplotlib.patches.Polygon`
+ ``colorbar.ColorbarBase.outline`` is now a `matplotlib.patches.Polygon`
object.
* The legend handler interface has changed from a callable, to any object
@@ -149,9 +149,9 @@ original location:
``drawRect`` from ``FigureCanvasQTAgg``; they were always an
implementation detail of the (preserved) ``drawRectangle()`` function.
-* The function signatures of `.tight_bbox.adjust_bbox` and
- `.tight_bbox.process_figure_for_rasterizing` have been changed. A new
- *fixed_dpi* parameter allows for overriding the ``figure.dpi`` setting
+* The function signatures of ``matplotlib.tight_bbox.adjust_bbox`` and
+ ``matplotlib.tight_bbox.process_figure_for_rasterizing`` have been changed.
+ A new *fixed_dpi* parameter allows for overriding the ``figure.dpi`` setting
instead of trying to deduce the intended behaviour from the file format.
* Added support for horizontal/vertical axes padding to
diff --git a/doc/api/prev_api_changes/api_changes_1.5.0.rst b/doc/api/prev_api_changes/api_changes_1.5.0.rst
index b51f311d8836..1248b1dfd394 100644
--- a/doc/api/prev_api_changes/api_changes_1.5.0.rst
+++ b/doc/api/prev_api_changes/api_changes_1.5.0.rst
@@ -41,7 +41,7 @@ fully delegate to `.Quiver`). Previously any input matching 'mid.*' would be
interpreted as 'middle', 'tip.*' as 'tip' and any string not matching one of
those patterns as 'tail'.
-The value of `.Quiver.pivot` is normalized to be in the set {'tip', 'tail',
+The value of ``Quiver.pivot`` is normalized to be in the set {'tip', 'tail',
'middle'} in `.Quiver`.
Reordered ``Axes.get_children``
@@ -116,10 +116,10 @@ In either case to update the data in the `.Line2D` object you must update
both the ``x`` and ``y`` data.
-Removed *args* and *kwargs* from `.MicrosecondLocator.__call__`
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Removed *args* and *kwargs* from ``MicrosecondLocator.__call__``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-The call signature of :meth:`~matplotlib.dates.MicrosecondLocator.__call__`
+The call signature of ``matplotlib.dates.MicrosecondLocator.__call__``
has changed from ``__call__(self, *args, **kwargs)`` to ``__call__(self)``.
This is consistent with the superclass :class:`~matplotlib.ticker.Locator`
and also all the other Locators derived from this superclass.
@@ -374,7 +374,7 @@ directly.
patheffects.svg
~~~~~~~~~~~~~~~
- - remove ``get_proxy_renderer`` method from ``AbstarctPathEffect`` class
+ - remove ``get_proxy_renderer`` method from ``AbstractPathEffect`` class
- remove ``patch_alpha`` and ``offset_xy`` from ``SimplePatchShadow``
diff --git a/doc/api/prev_api_changes/api_changes_2.1.0.rst b/doc/api/prev_api_changes/api_changes_2.1.0.rst
index 9673d24c719f..39ea78bdf587 100644
--- a/doc/api/prev_api_changes/api_changes_2.1.0.rst
+++ b/doc/api/prev_api_changes/api_changes_2.1.0.rst
@@ -422,8 +422,8 @@ The ``shading`` kwarg to `~matplotlib.axes.Axes.pcolor` has been
removed. Set ``edgecolors`` appropriately instead.
-Functions removed from the `.lines` module
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+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``
diff --git a/doc/api/prev_api_changes/api_changes_2.2.0.rst b/doc/api/prev_api_changes/api_changes_2.2.0.rst
index 29ed03649fd8..f13fe2a246f0 100644
--- a/doc/api/prev_api_changes/api_changes_2.2.0.rst
+++ b/doc/api/prev_api_changes/api_changes_2.2.0.rst
@@ -74,7 +74,7 @@ rcParam.
Deprecated ``Axis.unit_data``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Use `.Axis.units` (which has long existed) instead.
+Use ``Axis.units`` (which has long existed) instead.
Removals
@@ -159,7 +159,7 @@ If `.MovieWriterRegistry` can't find the requested `.MovieWriter`, a
more helpful `RuntimeError` message is now raised instead of the
previously raised `KeyError`.
-`~.tight_layout.auto_adjust_subplotpars` now raises `ValueError`
+``matplotlib.tight_layout.auto_adjust_subplotpars`` now raises `ValueError`
instead of `RuntimeError` when sizes of input lists don't match
@@ -169,7 +169,7 @@ instead of `RuntimeError` when sizes of input lists don't match
`matplotlib.figure.Figure.set_figwidth` and
`matplotlib.figure.Figure.set_figheight` had the keyword argument
``forward=False`` by default, but `.figure.Figure.set_size_inches` now defaults
-to ``forward=True``. This makes these functions conistent.
+to ``forward=True``. This makes these functions consistent.
Do not truncate svg sizes to nearest point
@@ -198,11 +198,11 @@ Changes to Qt backend class MRO
To support both Agg and cairo rendering for Qt backends all of the non-Agg
specific code previously in ``backend_qt5agg.FigureCanvasQTAggBase`` has been
-moved to :class:`.backend_qt5.FigureCanvasQT` so it can be shared with the
+moved to ``backend_qt5.FigureCanvasQT`` so it can be shared with the
cairo implementation. The ``FigureCanvasQTAggBase.paintEvent``,
``FigureCanvasQTAggBase.blit``, and ``FigureCanvasQTAggBase.print_figure``
-methods have moved to :meth:`.FigureCanvasQTAgg.paintEvent`,
-:meth:`.FigureCanvasQTAgg.blit`, and :meth:`.FigureCanvasQTAgg.print_figure`.
+methods have moved to ``FigureCanvasQTAgg.paintEvent``,
+``FigureCanvasQTAgg.blit``, and ``FigureCanvasQTAgg.print_figure``.
The first two methods assume that the instance is also a ``QWidget`` so to use
``FigureCanvasQTAggBase`` it was required to multiple inherit from a
``QWidget`` sub-class.
@@ -210,9 +210,9 @@ The first two methods assume that the instance is also a ``QWidget`` so to use
Having moved all of its methods either up or down the class hierarchy
``FigureCanvasQTAggBase`` has been deprecated. To do this without warning and
to preserve as much API as possible, ``.backend_qt5agg.FigureCanvasQTAggBase``
-now inherits from :class:`.backend_qt5.FigureCanvasQTAgg`.
+now inherits from ``backend_qt5.FigureCanvasQTAgg``.
-The MRO for :class:`.FigureCanvasQTAgg` and ``FigureCanvasQTAggBase`` used to
+The MRO for ``FigureCanvasQTAgg`` and ``FigureCanvasQTAggBase`` used to
be ::
diff --git a/doc/api/prev_api_changes/api_changes_3.0.0.rst b/doc/api/prev_api_changes/api_changes_3.0.0.rst
index 93efda636e3d..89a588d8f9e3 100644
--- a/doc/api/prev_api_changes/api_changes_3.0.0.rst
+++ b/doc/api/prev_api_changes/api_changes_3.0.0.rst
@@ -106,7 +106,7 @@ Different exception types for undocumented options
- Passing the undocumented ``xmin`` or ``xmax`` arguments to
:meth:`~matplotlib.axes.Axes.set_xlim` would silently override the ``left``
and ``right`` arguments. :meth:`~matplotlib.axes.Axes.set_ylim` and the
- 3D equivalents (e.g. `~.Axes3D.set_zlim3d`) had a
+ 3D equivalents (e.g. `~.Axes3D.set_zlim`) had a
corresponding problem.
A ``TypeError`` will be raised if they would override the earlier
limit arguments. In 3.0 these were kwargs were deprecated, but in 3.1
@@ -197,7 +197,7 @@ Contour color autoscaling improvements
Selection of contour levels is now the same for contour and
contourf; previously, for contour, levels outside the data range were
deleted. (Exception: if no contour levels are found within the
-data range, the `levels` attribute is replaced with a list holding
+data range, the ``levels`` attribute is replaced with a list holding
only the minimum of the data range.)
When contour is called with levels specified as a target number rather
@@ -297,7 +297,7 @@ Blacklisted rcparams no longer updated by `~matplotlib.rcdefaults`, `~matplotlib
The rc modifier functions `~matplotlib.rcdefaults`,
`~matplotlib.rc_file_defaults` and `~matplotlib.rc_file`
-now ignore rcParams in the `matplotlib.style.core.STYLE_BLACKLIST` set. In
+now ignore rcParams in the ``matplotlib.style.core.STYLE_BLACKLIST`` set. In
particular, this prevents the ``backend`` and ``interactive`` rcParams from
being incorrectly modified by these functions.
@@ -324,12 +324,12 @@ instead of ``\usepackage{ucs}\usepackage[utf8x]{inputenc}``.
Return type of ArtistInspector.get_aliases changed
--------------------------------------------------
-`ArtistInspector.get_aliases` previously returned the set of aliases as
+``ArtistInspector.get_aliases`` previously returned the set of aliases as
``{fullname: {alias1: None, alias2: None, ...}}``. The dict-to-None mapping
was used to simulate a set in earlier versions of Python. It has now been
replaced by a set, i.e. ``{fullname: {alias1, alias2, ...}}``.
-This value is also stored in `.ArtistInspector.aliasd`, which has likewise
+This value is also stored in ``ArtistInspector.aliasd``, which has likewise
changed.
diff --git a/doc/api/prev_api_changes/api_changes_3.0.1.rst b/doc/api/prev_api_changes/api_changes_3.0.1.rst
index d214ae9e6652..4b203cd04596 100644
--- a/doc/api/prev_api_changes/api_changes_3.0.1.rst
+++ b/doc/api/prev_api_changes/api_changes_3.0.1.rst
@@ -1,10 +1,10 @@
API Changes for 3.0.1
=====================
-`.tight_layout.auto_adjust_subplotpars` can return ``None`` now if the new
-subplotparams will collapse axes to zero width or height. This prevents
-``tight_layout`` from being executed. Similarly
-`.tight_layout.get_tight_layout_figure` will return None.
+``matplotlib.tight_layout.auto_adjust_subplotpars`` can return ``None`` now if
+the new subplotparams will collapse axes to zero width or height.
+This prevents ``tight_layout`` from being executed. Similarly
+``matplotlib.tight_layout.get_tight_layout_figure`` will return None.
To improve import (startup) time, private modules are now imported lazily.
These modules are no longer available at these locations:
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 b300d0d4c469..3e67af8f64cf 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
@@ -293,9 +293,9 @@ where the `.cm.ScalarMappable` passed to `matplotlib.colorbar.Colorbar`
(`~.Figure.colorbar`) had a ``set_norm`` method, as did the colorbar.
The colorbar is now purely a follower to the `.ScalarMappable` norm and
colormap, and the old inherited methods
-`~matplotlib.colorbar.ColorbarBase.set_norm`,
-`~matplotlib.colorbar.ColorbarBase.set_cmap`,
-`~matplotlib.colorbar.ColorbarBase.set_clim` are deprecated, as are
+``matplotlib.colorbar.ColorbarBase.set_norm``,
+``matplotlib.colorbar.ColorbarBase.set_cmap``,
+``matplotlib.colorbar.ColorbarBase.set_clim`` are deprecated, as are
the getter versions of those calls. To set the norm associated with a
colorbar do ``colorbar.mappable.set_norm()`` etc.
@@ -337,7 +337,7 @@ match the array value type of the ``Path.codes`` array.
LaTeX code in matplotlibrc file
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Previously, the rc file keys ``pgf.preamble`` and ``text.latex.preamble`` were
-parsed using commmas as separators. This would break valid LaTeX code, such as::
+parsed using commas as separators. This would break valid LaTeX code, such as::
\usepackage[protrusion=true, expansion=false]{microtype}
@@ -389,16 +389,16 @@ consistent with the behavior on Py2, where a buffer object was
returned.
-`matplotlib.font_manager.win32InstalledFonts` return type
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-`matplotlib.font_manager.win32InstalledFonts` returns an empty list instead
+``matplotlib.font_manager.win32InstalledFonts`` return type
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+``matplotlib.font_manager.win32InstalledFonts`` returns an empty list instead
of None if no fonts are found.
-`.Axes.fmt_xdata` and `.Axes.fmt_ydata` error handling
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+``Axes.fmt_xdata`` and ``Axes.fmt_ydata`` error handling
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Previously, if the user provided a `.Axes.fmt_xdata` or
-`.Axes.fmt_ydata` function that raised a `TypeError` (or set them to a
+Previously, if the user provided a ``Axes.fmt_xdata`` or
+``Axes.fmt_ydata`` function that raised a `TypeError` (or set them to a
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.
@@ -476,7 +476,7 @@ Exception changes
- `.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
+- The ``streamplot.Grid`` class, which is internally used by streamplot
code, also throws a `ValueError` when irregularly gridded values are
passed in.
@@ -496,7 +496,7 @@ Classes and methods
- ``backend_wx.Toolbar`` (use ``backend_wx.NavigationToolbar2Wx`` instead)
- ``cbook.align_iterators`` (no replacement)
- ``contour.ContourLabeler.get_real_label_width`` (no replacement)
-- ``legend.Legend.draggable`` (use `legend.Legend.set_draggable()` instead)
+- ``legend.Legend.draggable`` (use `.legend.Legend.set_draggable()` instead)
- ``texmanager.TexManager.postscriptd``, ``texmanager.TexManager.pscnt``,
``texmanager.TexManager.make_ps``, ``texmanager.TexManager.get_ps_bbox``
(no replacements)
@@ -566,7 +566,7 @@ in Matplotlib 2.2 has been removed. See below for a list:
- ``mlab.safe_isnan`` (use `numpy.isnan` instead)
- ``mlab.cohere_pairs`` (use `scipy.signal.coherence` instead)
- ``mlab.entropy`` (use `scipy.stats.entropy` instead)
-- ``mlab.normpdf`` (use `scipy.stats.norm.pdf` instead)
+- ``mlab.normpdf`` (use ``scipy.stats.norm.pdf`` instead)
- ``mlab.find`` (use ``np.nonzero(np.ravel(condition))`` instead)
- ``mlab.longest_contiguous_ones``
- ``mlab.longest_ones``
@@ -652,7 +652,7 @@ no longer available in the `pylab` module:
- ``longest_ones``
- ``movavg``
- ``norm_flat`` (use ``numpy.linalg.norm(a.flat, ord=2)`` instead)
-- ``normpdf`` (use `scipy.stats.norm.pdf` instead)
+- ``normpdf`` (use ``scipy.stats.norm.pdf`` instead)
- ``path_length``
- ``poly_below``
- ``poly_between``
@@ -705,7 +705,7 @@ now a no-op).
The image comparison test decorators now skip (rather than xfail) the test for
uncomparable formats. The affected decorators are `~.image_comparison` and
-`~.check_figures_equal`. The deprecated `~.ImageComparisonTest` class is
+`~.check_figures_equal`. The deprecated ``ImageComparisonTest`` class is
likewise changed.
Dependency changes
@@ -825,7 +825,7 @@ This has not been used in the codebase since its addition in 2009.
This has never been used internally, there is no equivalent method exists on
the 2D Axis classes, and despite the similar name, it has a completely
- different behavior from the 2D Axis' `axis.Axis.get_ticks_position` method.
+ different behavior from the 2D Axis' ``axis.Axis.get_ticks_position`` method.
- ``.backend_pgf.LatexManagerFactory``
- ``mpl_toolkits.axisartist.axislines.SimpleChainedObjects``
@@ -936,8 +936,8 @@ Axes3D
- `.axes3d.Axes3D.w_yaxis`
- `.axes3d.Axes3D.w_zaxis`
-Use `.axes3d.Axes3D.xaxis`, `.axes3d.Axes3D.yaxis` and `.axes3d.Axes3D.zaxis`
-instead.
+Use ``axes3d.Axes3D.xaxis``, ``axes3d.Axes3D.yaxis`` and
+``axes3d.Axes3D.zaxis`` instead.
Testing
~~~~~~~
@@ -945,7 +945,7 @@ Testing
- ``matplotlib.testing.decorators.switch_backend`` decorator
Test functions should use ``pytest.mark.backend``, and the mark will be
-picked up by the `matplotlib.testing.conftest.mpl_test_settings` fixture.
+picked up by the ``matplotlib.testing.conftest.mpl_test_settings`` fixture.
Quiver
~~~~~~
@@ -1069,7 +1069,7 @@ Axis
- ``Axis.iter_ticks``
-This only served as a helper to the private `.Axis._update_ticks`
+This only served as a helper to the private ``Axis._update_ticks``
Undeprecations
@@ -1123,10 +1123,10 @@ The `.Formatter` class gained a new `~.Formatter.format_ticks` method, which
takes the list of all tick locations as a single argument and returns the list
of all formatted values. It is called by the axis tick handling code and, by
default, first calls `~.Formatter.set_locs` with all locations, then repeatedly
-calls `~.Formatter.__call__` for each location.
+calls ``Formatter.__call__`` for each location.
Tick-handling code in the codebase that previously performed this sequence
-(`~.Formatter.set_locs` followed by repeated `~.Formatter.__call__`) have been
+(`~.Formatter.set_locs` followed by repeated ``Formatter.__call__``) have been
updated to use `~.Formatter.format_ticks`.
`~.Formatter.format_ticks` is intended to be overridden by `.Formatter`
diff --git a/doc/api/prev_api_changes/api_changes_3.2.0/behavior.rst b/doc/api/prev_api_changes/api_changes_3.2.0/behavior.rst
index 8e76a047e348..dc47740890be 100644
--- a/doc/api/prev_api_changes/api_changes_3.2.0/behavior.rst
+++ b/doc/api/prev_api_changes/api_changes_3.2.0/behavior.rst
@@ -46,9 +46,9 @@ highest.
Code that worked around the normalization between 0 and 1 will need to be
modified.
-`MovieWriterRegistry`
-~~~~~~~~~~~~~~~~~~~~~
-`MovieWriterRegistry` now always checks the availability of the writer classes
+``MovieWriterRegistry``
+~~~~~~~~~~~~~~~~~~~~~~~
+`.MovieWriterRegistry` now always checks the availability of the writer classes
before returning them. If one wishes, for example, to get the first available
writer, without performing the availability check on subsequent writers, it is
now possible to iterate over the registry, which will yield the names of the
@@ -88,13 +88,13 @@ enough to be accommodated by the default data limit margins.
While the new behavior is algorithmically simpler, it is conditional on
properties of the `.Collection` object:
- 1. ``offsets = None``, ``transform`` is a child of `.Axes.transData`: use the paths
+ 1. ``offsets = None``, ``transform`` is a child of ``Axes.transData``: use the paths
for the automatic limits (i.e. for `.LineCollection` in `.Axes.streamplot`).
- 2. ``offsets != None``, and ``offset_transform`` is child of `.Axes.transData`:
+ 2. ``offsets != None``, and ``offset_transform`` is child of ``Axes.transData``:
- a) ``transform`` is child of `.Axes.transData`: use the ``path + offset`` for
+ a) ``transform`` is child of ``Axes.transData``: use the ``path + offset`` for
limits (i.e., for `.Axes.bar`).
- b) ``transform`` is not a child of `.Axes.transData`: just use the offsets
+ b) ``transform`` is not a child of ``Axes.transData``: just use the offsets
for the limits (i.e. for scatter)
3. otherwise return a null `.Bbox`.
@@ -294,7 +294,7 @@ Exception changes
~~~~~~~~~~~~~~~~~
Various APIs that raised a `ValueError` for incorrectly typed inputs now raise
`TypeError` instead: `.backend_bases.GraphicsContextBase.set_clip_path`,
-`.blocking_input.BlockingInput.__call__`, `.cm.register_cmap`, `.dviread.DviFont`,
+``blocking_input.BlockingInput.__call__``, `.cm.register_cmap`, `.dviread.DviFont`,
`.rcsetup.validate_hatch`, ``.rcsetup.validate_animation_writer_path``, `.spines.Spine`,
many classes in the :mod:`matplotlib.transforms` module and :mod:`matplotlib.tri`
package, and Axes methods that take a ``norm`` parameter.
diff --git a/doc/api/prev_api_changes/api_changes_3.2.0/deprecations.rst b/doc/api/prev_api_changes/api_changes_3.2.0/deprecations.rst
index 42de9ffccd77..65b72c7e0558 100644
--- a/doc/api/prev_api_changes/api_changes_3.2.0/deprecations.rst
+++ b/doc/api/prev_api_changes/api_changes_3.2.0/deprecations.rst
@@ -118,7 +118,7 @@ The unused ``Locator.autoscale`` method is deprecated (pass the axis limits to
Animation
~~~~~~~~~
-The following methods and attributes of the `MovieWriterRegistry` class are
+The following methods and attributes of the `.MovieWriterRegistry` class are
deprecated: ``set_dirty``, ``ensure_not_dirty``, ``reset_available_writers``,
``avail``.
diff --git a/doc/api/prev_api_changes/api_changes_3.2.0/development.rst b/doc/api/prev_api_changes/api_changes_3.2.0/development.rst
index 470b594d522c..9af7fb8fb561 100644
--- a/doc/api/prev_api_changes/api_changes_3.2.0/development.rst
+++ b/doc/api/prev_api_changes/api_changes_3.2.0/development.rst
@@ -22,7 +22,7 @@ is desired.
Packaging DLLs
~~~~~~~~~~~~~~
-Previously, it was possible to package Windows DLLs into the Maptlotlib
+Previously, it was possible to package Windows DLLs into the Matplotlib
wheel (or sdist) by copying them into the source tree and setting the
``package_data.dlls`` entry in ``setup.cfg``.
diff --git a/doc/api/prev_api_changes/api_changes_3.3.0/deprecations.rst b/doc/api/prev_api_changes/api_changes_3.3.0/deprecations.rst
index 22aa93f89931..322f6df40d42 100644
--- a/doc/api/prev_api_changes/api_changes_3.3.0/deprecations.rst
+++ b/doc/api/prev_api_changes/api_changes_3.3.0/deprecations.rst
@@ -273,13 +273,13 @@ mathtext glues
The *copy* parameter of ``mathtext.Glue`` is deprecated (the underlying glue
spec is now immutable). ``mathtext.GlueSpec`` is deprecated.
-Signatures of `.Artist.draw` and `.Axes.draw`
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-The *inframe* parameter to `.Axes.draw` is deprecated. Use
+Signatures of `.Artist.draw` and `matplotlib.axes.Axes.draw`
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+The *inframe* parameter to `matplotlib.axes.Axes.draw` is deprecated. Use
`.Axes.redraw_in_frame` instead.
-Not passing the *renderer* parameter to `.Axes.draw` is deprecated. Use
-``axes.draw_artist(axes)`` instead.
+Not passing the *renderer* parameter to `matplotlib.axes.Axes.draw` is
+deprecated. Use ``axes.draw_artist(axes)`` instead.
These changes make the signature of the ``draw`` (``artist.draw(renderer)``)
method consistent across all artists; thus, additional parameters to
@@ -328,7 +328,7 @@ are deprecated. Panning and zooming are now implemented using the
Passing None to various Axes subclass factories
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Support for passing ``None`` as base class to `.axes.subplot_class_factory`,
+Support for passing ``None`` as base class to ``axes.subplot_class_factory``,
``axes_grid1.parasite_axes.host_axes_class_factory``,
``axes_grid1.parasite_axes.host_subplot_class_factory``,
``axes_grid1.parasite_axes.parasite_axes_class_factory``, and
@@ -545,8 +545,8 @@ experimental and may change in the future.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
... is deprecated.
-`.epoch2num` and `.num2epoch` are deprecated
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+``epoch2num`` and ``num2epoch`` are deprecated
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
These are unused and can be easily reproduced by other date tools.
`.get_epoch` will return Matplotlib's epoch.
diff --git a/doc/api/prev_api_changes/api_changes_3.3.0/removals.rst b/doc/api/prev_api_changes/api_changes_3.3.0/removals.rst
index 3f7c232e9800..36b63c6dcfc8 100644
--- a/doc/api/prev_api_changes/api_changes_3.3.0/removals.rst
+++ b/doc/api/prev_api_changes/api_changes_3.3.0/removals.rst
@@ -202,7 +202,7 @@ Arguments
renamed to ``manage_ticks``.
- The ``normed`` parameter of `~.Axes.hist2d` has been renamed to ``density``.
- The ``s`` parameter of `.Annotation` has been renamed to ``text``.
-- For all functions in `.bezier` that supported a ``tolerence`` parameter, this
+- For all functions in `.bezier` that supported a ``tolerance`` parameter, this
parameter has been renamed to ``tolerance``.
- ``axis("normal")`` is not supported anymore. Use the equivalent
``axis("auto")`` instead.
diff --git a/doc/api/prev_api_changes/api_changes_3.3.1.rst b/doc/api/prev_api_changes/api_changes_3.3.1.rst
index b3383a4e5fd2..3eda8a9a3a1a 100644
--- a/doc/api/prev_api_changes/api_changes_3.3.1.rst
+++ b/doc/api/prev_api_changes/api_changes_3.3.1.rst
@@ -15,7 +15,7 @@ reverts the deprecation.
Functions ``epoch2num`` and ``dates.julian2num`` use ``date.epoch`` rcParam
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Now `~.dates.epoch2num` and (undocumented) ``julian2num`` return floating point
+Now ``epoch2num`` and (undocumented) ``julian2num`` return floating point
days since `~.dates.get_epoch` as set by :rc:`date.epoch`, instead of
floating point days since the old epoch of "0000-12-31T00:00:00". If
needed, you can translate from the new to old values as
diff --git a/doc/api/prev_api_changes/api_changes_3.4.0/deprecations.rst b/doc/api/prev_api_changes/api_changes_3.4.0/deprecations.rst
index 3de8959bb3ef..9e09f3febe64 100644
--- a/doc/api/prev_api_changes/api_changes_3.4.0/deprecations.rst
+++ b/doc/api/prev_api_changes/api_changes_3.4.0/deprecations.rst
@@ -38,8 +38,8 @@ Subplot-related attributes and methods
Some ``SubplotBase`` methods and attributes have been deprecated and/or moved
to `.SubplotSpec`:
-- ``get_geometry`` (use `.SubplotBase.get_subplotspec` instead),
-- ``change_geometry`` (use `.SubplotBase.set_subplotspec` instead),
+- ``get_geometry`` (use ``SubplotBase.get_subplotspec`` instead),
+- ``change_geometry`` (use ``SubplotBase.set_subplotspec`` instead),
- ``is_first_row``, ``is_last_row``, ``is_first_col``, ``is_last_col`` (use the
corresponding methods on the `.SubplotSpec` instance instead),
- ``update_params`` (now a no-op),
diff --git a/doc/api/prev_api_changes/api_changes_3.4.0/development.rst b/doc/api/prev_api_changes/api_changes_3.4.0/development.rst
index ab5e118de9e8..982046c3869e 100644
--- a/doc/api/prev_api_changes/api_changes_3.4.0/development.rst
+++ b/doc/api/prev_api_changes/api_changes_3.4.0/development.rst
@@ -4,7 +4,7 @@ Development changes
Increase to minimum supported versions of Python and dependencies
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-For Maptlotlib 3.4, the :ref:`minimum supported versions ` are
+For Matplotlib 3.4, the :ref:`minimum supported versions ` are
being bumped:
+------------+-----------------+---------------+
diff --git a/doc/api/prev_api_changes/api_changes_3.5.0/behaviour.rst b/doc/api/prev_api_changes/api_changes_3.5.0/behaviour.rst
index 62cdb0a32854..69e38270ca76 100644
--- a/doc/api/prev_api_changes/api_changes_3.5.0/behaviour.rst
+++ b/doc/api/prev_api_changes/api_changes_3.5.0/behaviour.rst
@@ -47,16 +47,16 @@ corresponding ``Axes.add_*`` method.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Historically, it has not been possible to filter
-`.MatplotlibDeprecationWarning`\s by checking for `DeprecationWarning`, since we
-subclass `UserWarning` directly.
+`~matplotlib.MatplotlibDeprecationWarning`\s by checking for
+`DeprecationWarning`, since we subclass `UserWarning` directly.
The decision to not subclass `DeprecationWarning` has to do with a decision
from core Python in the 2.x days to not show `DeprecationWarning`\s to users.
However, there is now a more sophisticated filter in place (see
https://www.python.org/dev/peps/pep-0565/).
-Users will now see `.MatplotlibDeprecationWarning` only during interactive
-sessions, and these can be silenced by the standard mechanism:
+Users will now see `~matplotlib.MatplotlibDeprecationWarning` only during
+interactive sessions, and these can be silenced by the standard mechanism:
.. code:: python
@@ -198,8 +198,8 @@ This affects `.ContourSet` itself and its subclasses, `.QuadContourSet`
``hatch.SmallFilledCircles`` inherits from ``hatch.Circles``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-The ``hatch.SmallFilledCircles`` class now inherits from ``hatch.Circles``
-rather than from ``hatch.SmallCircles``.
+The `.hatch.SmallFilledCircles` class now inherits from `.hatch.Circles` rather
+than from `.hatch.SmallCircles`.
hexbin with a log norm
~~~~~~~~~~~~~~~~~~~~~~
@@ -229,19 +229,19 @@ defaults to *False*.
Type 1 fonts have a large part of their code encrypted as an obsolete
copy-protection measure. This part is now available decrypted as the
-``decrypted`` attribute of `~.type1font.Type1Font`. This decrypted data is not
-yet parsed, but this is a prerequisite for implementing subsetting.
+``decrypted`` attribute of ``matplotlib.type1font.Type1Font``. This decrypted
+data is not yet parsed, but this is a prerequisite for implementing subsetting.
3D contourf polygons placed between levels
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-The polygons used in a 3D `~mpl_toolkits.mplot3d.Axes3D.contourf` plot are now
+The polygons used in a 3D `~.Axes3D.contourf` plot are now
placed halfway between the contour levels, as each polygon represents the
location of values that lie between two levels.
``AxesDivider`` now defaults to rcParams-specified pads
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-`.AxesDivider.append_axes`, `.AxesDivider.new_horizontal`, and
-`.AxesDivider.new_vertical` now default to paddings specified by
+`.AxesDivider.append_axes`, ``AxesDivider.new_horizontal``, and
+``AxesDivider.new_vertical`` now default to paddings specified by
:rc:`figure.subplot.wspace` and :rc:`figure.subplot.hspace` rather than zero.
diff --git a/doc/api/prev_api_changes/api_changes_3.5.0/deprecations.rst b/doc/api/prev_api_changes/api_changes_3.5.0/deprecations.rst
index 2132e0faf9db..7bb9009fbe77 100644
--- a/doc/api/prev_api_changes/api_changes_3.5.0/deprecations.rst
+++ b/doc/api/prev_api_changes/api_changes_3.5.0/deprecations.rst
@@ -62,7 +62,7 @@ These methods convert from unix timestamps to matplotlib floats, but are not
used internally to matplotlib, and should not be needed by end users. To
convert a unix timestamp to datetime, simply use
`datetime.datetime.utcfromtimestamp`, or to use NumPy `~numpy.datetime64`
-``dt = np.datetim64(e*1e6, 'us')``.
+``dt = np.datetime64(e*1e6, 'us')``.
Auto-removal of grids by `~.Axes.pcolor` and `~.Axes.pcolormesh`
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -162,7 +162,7 @@ implement a ``convert`` method that not only accepted instances of the unit,
but also unitless values (which are passed through as is). This is no longer
the case (``convert`` is never called with a unitless value), and such support
in `.StrCategoryConverter` is deprecated. Likewise, the
-`.ConversionInterface.is_numlike` helper is deprecated.
+``.ConversionInterface.is_numlike`` helper is deprecated.
Consider calling `.Axis.convert_units` instead, which still supports unitless
values.
diff --git a/doc/api/prev_api_changes/api_changes_3.5.0/removals.rst b/doc/api/prev_api_changes/api_changes_3.5.0/removals.rst
index cc81bd702918..45b574e04cf5 100644
--- a/doc/api/prev_api_changes/api_changes_3.5.0/removals.rst
+++ b/doc/api/prev_api_changes/api_changes_3.5.0/removals.rst
@@ -214,7 +214,7 @@ The following class methods have been removed:
- ``Colorbar.on_mappable_changed`` and ``Colorbar.update_bruteforce``; use
``Colorbar.update_normal()`` instead
- ``docstring.Substitution.from_params`` has been removed; directly assign to
- ``params`` of `.Substitution` instead
+ ``params`` of ``docstring.Substitution`` instead
- ``DraggableBase.artist_picker``; set the artist's picker instead
- ``DraggableBase.on_motion_blit``; use `.DraggableBase.on_motion` instead
- ``FigureCanvasGTK3._renderer_init``
@@ -260,7 +260,7 @@ Arguments
- The *s* parameter to `.Axes.annotate` and `.pyplot.annotate` is no longer
supported; use the new name *text*.
-- The *inframe* parameter to `.Axes.draw` has been removed; use
+- The *inframe* parameter to `matplotlib.axes.Axes.draw` has been removed; use
`.Axes.redraw_in_frame` instead.
- The *required*, *forbidden* and *allowed* parameters of
`.cbook.normalize_kwargs` have been removed.
@@ -282,7 +282,7 @@ Arguments
- The *dummy* parameter of `.RendererPgf` has been removed.
- The *props* parameter of `.Shadow` has been removed; use keyword arguments
instead.
-- The *recursionlimit* parameter of `matplotlib.test` has been removed.
+- The *recursionlimit* parameter of ``matplotlib.test`` has been removed.
- The *label* parameter of `.Tick` has no effect and has been removed.
- `~.ticker.MaxNLocator` no longer accepts a positional parameter and the
keyword argument *nbins* simultaneously because they specify the same
@@ -312,13 +312,13 @@ Arguments
warning for keyword arguments that were overridden by the mappable is now
removed.
-- Omitting the *renderer* parameter to `.Axes.draw` is no longer supported; use
- ``axes.draw_artist(axes)`` instead.
+- Omitting the *renderer* parameter to `matplotlib.axes.Axes.draw` is no longer
+ supported; use ``axes.draw_artist(axes)`` instead.
- Passing ``ismath="TeX!"`` to `.RendererAgg.get_text_width_height_descent` is
no longer supported; pass ``ismath="TeX"`` instead,
-- Changes to the signature of the `.Axes.draw` method make it consistent with
- all other artists; thus additional parameters to `.Artist.draw` have also
- been removed.
+- Changes to the signature of the `matplotlib.axes.Axes.draw` method make it
+ consistent with all other artists; thus additional parameters to
+ `.Artist.draw` have also been removed.
rcParams
~~~~~~~~
diff --git a/doc/api/prev_api_changes/api_changes_3.5.3.rst b/doc/api/prev_api_changes/api_changes_3.5.3.rst
new file mode 100644
index 000000000000..03d1f476513e
--- /dev/null
+++ b/doc/api/prev_api_changes/api_changes_3.5.3.rst
@@ -0,0 +1,13 @@
+API Changes for 3.5.3
+=====================
+
+.. contents::
+ :local:
+ :depth: 1
+
+Passing *linefmt* positionally is undeprecated
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Positional use of all formatting parameters in `~.Axes.stem` has been
+deprecated since Matplotlib 3.5. This deprecation is relaxed so that one can
+still pass *linefmt* positionally, i.e. ``stem(x, y, 'r')``.
diff --git a/doc/api/prev_api_changes/api_changes_3.6.0.rst b/doc/api/prev_api_changes/api_changes_3.6.0.rst
new file mode 100644
index 000000000000..1bba4506fd7d
--- /dev/null
+++ b/doc/api/prev_api_changes/api_changes_3.6.0.rst
@@ -0,0 +1,14 @@
+API Changes for 3.6.0
+=====================
+
+.. contents::
+ :local:
+ :depth: 1
+
+.. include:: /api/prev_api_changes/api_changes_3.6.0/behaviour.rst
+
+.. include:: /api/prev_api_changes/api_changes_3.6.0/deprecations.rst
+
+.. include:: /api/prev_api_changes/api_changes_3.6.0/removals.rst
+
+.. include:: /api/prev_api_changes/api_changes_3.6.0/development.rst
diff --git a/doc/api/prev_api_changes/api_changes_3.6.0/behaviour.rst b/doc/api/prev_api_changes/api_changes_3.6.0/behaviour.rst
new file mode 100644
index 000000000000..a35584b04961
--- /dev/null
+++ b/doc/api/prev_api_changes/api_changes_3.6.0/behaviour.rst
@@ -0,0 +1,248 @@
+Behaviour changes
+-----------------
+
+``plt.get_cmap`` and ``matplotlib.cm.get_cmap`` return a copy
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Formerly, `~.pyplot.get_cmap` and `.cm.get_cmap` returned a global version of a
+`.Colormap`. This was prone to errors as modification of the colormap would
+propagate from one location to another without warning. Now, a new copy of the
+colormap is returned.
+
+Large ``imshow`` images are now downsampled
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+When showing an image using `~matplotlib.axes.Axes.imshow` that has more than
+:math:`2^{24}` columns or :math:`2^{23}` rows, the image will now be
+downsampled to below this resolution before being resampled for display by the
+AGG renderer. Previously such a large image would be shown incorrectly. To
+prevent this downsampling and the warning it raises, manually downsample your
+data before handing it to `~matplotlib.axes.Axes.imshow`.
+
+Default date limits changed to 1970-01-01 – 1970-01-02
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Previously the default limits for an empty axis set up for dates
+(`.Axis.axis_date`) was 2000-01-01 to 2010-01-01. This has been changed to
+1970-01-01 to 1970-01-02. With the default epoch, this makes the numeric limit
+for date axes the same as for other axes (0.0-1.0), and users are less likely
+to set a locator with far too many ticks.
+
+*markerfmt* argument to ``stem``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The behavior of the *markerfmt* parameter of `~.Axes.stem` has changed:
+
+- If *markerfmt* does not contain a color, the color is taken from *linefmt*.
+- If *markerfmt* does not contain a marker, the default is 'o'.
+
+Before, *markerfmt* was passed unmodified to ``plot(..., fmt)``, which had a
+number of unintended side-effects; e.g. only giving a color switched to a solid
+line without markers.
+
+For a simple call ``stem(x, y)`` without parameters, the new rules still
+reproduce the old behavior.
+
+``get_ticklabels`` now always populates labels
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Previously `.Axis.get_ticklabels` (and `.Axes.get_xticklabels`,
+`.Axes.get_yticklabels`) would only return empty strings unless a draw had
+already been performed. Now the ticks and their labels are updated when the
+labels are requested.
+
+Warning when scatter plot color settings discarded
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+When making an animation of a scatter plot, if you don't set *c* (the color
+value parameter) when initializing the artist, the color settings are ignored.
+`.Axes.scatter` now raises a warning if color-related settings are changed
+without setting *c*.
+
+3D ``contourf`` polygons placed between levels
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The polygons used in a 3D `~.Axes3D.contourf` plot are now placed halfway
+between the contour levels, as each polygon represents the location of values
+that lie between two levels.
+
+Axes title now avoids y-axis offset
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Previously, Axes titles could overlap the y-axis offset text, which is often in
+the upper left corner of the axes. Now titles are moved above the offset text
+if overlapping when automatic title positioning is in effect (i.e. if *y* in
+`.Axes.set_title` is *None* and :rc:`axes.titley` is also *None*).
+
+Dotted operators gain extra space in mathtext
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+In mathtext, ``\doteq \doteqdot \dotminus \dotplus \dots`` are now surrounded
+by extra space because they are correctly treated as relational or binary
+operators.
+
+*math* parameter of ``mathtext.get_unicode_index`` defaults to False
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+In math mode, ASCII hyphens (U+002D) are now replaced by Unicode minus signs
+(U+2212) at the parsing stage.
+
+``ArtistList`` proxies copy contents on iteration
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+When iterating over the contents of the dynamically generated proxy lists for
+the Artist-type accessors (see :ref:`Behavioural API Changes 3.5 - Axes
+children combined`), a copy of the contents is made. This ensure that artists
+can safely be added or removed from the Axes while iterating over their
+children.
+
+This is a departure from the expected behavior of mutable iterable data types
+in Python — iterating over a list while mutating it has surprising consequences
+and dictionaries will error if they change size during iteration. Because all
+of the accessors are filtered views of the same underlying list, it is possible
+for seemingly unrelated changes, such as removing a Line, to affect the
+iteration over any of the other accessors. In this case, we have opted to make
+a copy of the relevant children before yielding them to the user.
+
+This change is also consistent with our plan to make these accessors immutable
+in Matplotlib 3.7.
+
+``AxesImage`` string representation
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The string representation of `.AxesImage` changes from stating the position in
+the figure ``"AxesImage(80,52.8;496x369.6)"`` to giving the number of pixels
+``"AxesImage(size=(300, 200))"``.
+
+Improved autoscaling for Bézier curves
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Bézier curves are now autoscaled to their extents - previously they were
+autoscaled to their ends and control points, which in some cases led to
+unnecessarily large limits.
+
+``QuadMesh`` mouseover defaults to False
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+New in 3.5, `.QuadMesh.get_cursor_data` allows display of data values under the
+cursor. However, this can be very slow for large meshes, so mouseover now
+defaults to *False*.
+
+Changed pgf backend document class
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The pgf backend now uses the ``article`` document class as basis for
+compilation.
+
+``MathtextBackendAgg.get_results`` no longer returns ``used_characters``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The last item (``used_characters``) in the tuple returned by
+``MathtextBackendAgg.get_results`` has been removed. In order to unpack this
+tuple in a backward and forward-compatible way, use e.g. ``ox, oy, width,
+height, descent, image, *_ = parse(...)``, which will ignore
+``used_characters`` if it was present.
+
+``Type1Font`` objects include more properties
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The ``matplotlib._type1font.Type1Font.prop`` dictionary now includes more keys,
+such as ``CharStrings`` and ``Subrs``. The value of the ``Encoding`` key is now
+a dictionary mapping codes to glyph names. The
+``matplotlib._type1font.Type1Font.transform`` method now correctly removes
+``UniqueID`` properties from the font.
+
+``rcParams.copy()`` returns ``RcParams`` rather than ``dict``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Returning an `.RcParams` instance from `.RcParams.copy` makes the copy still
+validate inputs, and additionally avoids emitting deprecation warnings when
+using a previously copied instance to update the global instance (even if some
+entries are deprecated).
+
+``rc_context`` no longer resets the value of ``'backend'``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+`matplotlib.rc_context` incorrectly reset the value of :rc:`backend` if backend
+resolution was triggered in the context. This affected only the value. The
+actual backend was not changed. Now, `matplotlib.rc_context` does not reset
+:rc:`backend` anymore.
+
+Default ``rcParams["animation.convert_args"]`` changed
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+It now defaults to ``["-layers", "OptimizePlus"]`` to try to generate smaller
+GIFs. Set it back to an empty list to recover the previous behavior.
+
+Style file encoding now specified to be UTF-8
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+It has been impossible to import Matplotlib with a non UTF-8 compatible locale
+encoding because we read the style library at import time. This change is
+formalizing and documenting the status quo so there is no deprecation period.
+
+MacOSX backend uses sRGB instead of GenericRGB color space
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+MacOSX backend now display sRGB tagged image instead of GenericRGB which is an
+older (now deprecated) Apple color space. This is the source color space used
+by ColorSync to convert to the current display profile.
+
+Renderer optional for ``get_tightbbox`` and ``get_window_extent``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The `.Artist.get_tightbbox` and `.Artist.get_window_extent` methods no longer
+require the *renderer* keyword argument, saving users from having to query it
+from ``fig.canvas.get_renderer``. If the *renderer* keyword argument is not
+supplied, these methods first check if there is a cached renderer from a
+previous draw and use that. If there is no cached renderer, then the methods
+will use ``fig.canvas.get_renderer()`` as a fallback.
+
+``FigureFrameWx`` constructor, subclasses, and ``get_canvas``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The ``FigureCanvasWx`` constructor gained a *canvas_class* keyword-only
+parameter which specifies the canvas class that should be used. This parameter
+will become required in the future. The ``get_canvas`` method, which was
+previously used to customize canvas creation, is deprecated. The
+``FigureFrameWxAgg`` and ``FigureFrameWxCairo`` subclasses, which overrode
+``get_canvas``, are deprecated.
+
+``FigureFrameWx.sizer``
+~~~~~~~~~~~~~~~~~~~~~~~
+
+... has been removed. The frame layout is no longer based on a sizer, as the
+canvas is now the sole child widget; the toolbar is now a regular toolbar added
+using ``SetToolBar``.
+
+Incompatible layout engines raise
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+You cannot switch between ``tight_layout`` and ``constrained_layout`` if a
+colorbar has already been added to a figure. Invoking the incompatible layout
+engine used to warn, but now raises with a `RuntimeError`.
+
+``CallbackRegistry`` raises on unknown signals
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+When Matplotlib instantiates a `.CallbackRegistry`, it now limits callbacks to
+the signals that the registry knows about. In practice, this means that calling
+`~.FigureCanvasBase.mpl_connect` with an invalid signal name now raises a
+`ValueError`.
+
+Changed exception type for incorrect SVG date metadata
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Providing date metadata with incorrect type to the SVG backend earlier resulted
+in a `ValueError`. Now, a `TypeError` is raised instead.
+
+Specified exception types in ``Grid``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+In a few cases an `Exception` was thrown when an incorrect argument value was
+set in the `mpl_toolkits.axes_grid1.axes_grid.Grid` (=
+`mpl_toolkits.axisartist.axes_grid.Grid`) constructor. These are replaced as
+follows:
+
+* Providing an incorrect value for *ngrids* now raises a `ValueError`
+* Providing an incorrect type for *rect* now raises a `TypeError`
diff --git a/doc/api/prev_api_changes/api_changes_3.6.0/deprecations.rst b/doc/api/prev_api_changes/api_changes_3.6.0/deprecations.rst
new file mode 100644
index 000000000000..3a9e91e12289
--- /dev/null
+++ b/doc/api/prev_api_changes/api_changes_3.6.0/deprecations.rst
@@ -0,0 +1,414 @@
+Deprecations
+------------
+
+Parameters to ``plt.figure()`` and the ``Figure`` constructor
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+All parameters to `.pyplot.figure` and the `.Figure` constructor, other than
+*num*, *figsize*, and *dpi*, will become keyword-only after a deprecation
+period.
+
+Deprecation aliases in cbook
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The module ``matplotlib.cbook.deprecation`` was previously deprecated in
+Matplotlib 3.4, along with deprecation-related API in ``matplotlib.cbook``. Due
+to technical issues, ``matplotlib.cbook.MatplotlibDeprecationWarning`` and
+``matplotlib.cbook.mplDeprecation`` did not raise deprecation warnings on use.
+Changes in Python have now made it possible to warn when these aliases are
+being used.
+
+In order to avoid downstream breakage, these aliases will now warn, and their
+removal has been pushed from 3.6 to 3.8 to give time to notice said warnings.
+As replacement, please use `matplotlib.MatplotlibDeprecationWarning`.
+
+``Axes`` subclasses should override ``clear`` instead of ``cla``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+For clarity, `.axes.Axes.clear` is now preferred over `.Axes.cla`. However, for
+backwards compatibility, the latter will remain as an alias for the former.
+
+For additional compatibility with third-party libraries, Matplotlib will
+continue to call the ``cla`` method of any `~.axes.Axes` subclasses if they
+define it. In the future, this will no longer occur, and Matplotlib will only
+call the ``clear`` method in `~.axes.Axes` subclasses.
+
+It is recommended to define only the ``clear`` method when on Matplotlib 3.6,
+and only ``cla`` for older versions.
+
+Pending deprecation top-level cmap registration and access functions in ``mpl.cm``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+As part of a `multi-step process
+`_ we are refactoring
+the global state for managing the registered colormaps.
+
+In Matplotlib 3.5 we added a `.ColormapRegistry` class and exposed an instance
+at the top level as ``matplotlib.colormaps``. The existing top level functions
+in `matplotlib.cm` (``get_cmap``, ``register_cmap``, ``unregister_cmap``) were
+changed to be aliases around the same instance.
+
+In Matplotlib 3.6 we have marked those top level functions as pending
+deprecation with the intention of deprecation in Matplotlib 3.7. The following
+functions have been marked for pending deprecation:
+
+- ``matplotlib.cm.get_cmap``; use ``matplotlib.colormaps[name]`` instead if you
+ have a `str`.
+
+ **Added 3.6.1** Use `matplotlib.cm.ColormapRegistry.get_cmap` if you
+ have a string, `None` or a `matplotlib.colors.Colormap` object that you want
+ to convert to a `matplotlib.colors.Colormap` instance.
+- ``matplotlib.cm.register_cmap``; use `matplotlib.colormaps.register
+ <.ColormapRegistry.register>` instead
+- ``matplotlib.cm.unregister_cmap``; use `matplotlib.colormaps.unregister
+ <.ColormapRegistry.unregister>` instead
+- ``matplotlib.pyplot.register_cmap``; use `matplotlib.colormaps.register
+ <.ColormapRegistry.register>` instead
+
+The `matplotlib.pyplot.get_cmap` function will stay available for backward
+compatibility.
+
+Pending deprecation of layout methods
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The methods `~.Figure.set_tight_layout`, `~.Figure.set_constrained_layout`, are
+discouraged, and now emit a `PendingDeprecationWarning` in favor of explicitly
+referencing the layout engine via ``figure.set_layout_engine('tight')`` and
+``figure.set_layout_engine('constrained')``. End users should not see the
+warning, but library authors should adjust.
+
+The methods `~.Figure.set_constrained_layout_pads` and
+`~.Figure.get_constrained_layout_pads` are will be deprecated in favor of
+``figure.get_layout_engine().set()`` and ``figure.get_layout_engine().get()``,
+and currently emit a `PendingDeprecationWarning`.
+
+seaborn styles renamed
+~~~~~~~~~~~~~~~~~~~~~~
+
+Matplotlib currently ships many style files inspired from the seaborn library
+("seaborn", "seaborn-bright", "seaborn-colorblind", etc.) but they have gone
+out of sync with the library itself since the release of seaborn 0.9. To
+prevent confusion, the style files have been renamed "seaborn-v0_8",
+"seaborn-v0_8-bright", "seaborn-v0_8-colorblind", etc. Users are encouraged to
+directly use seaborn to access the up-to-date styles.
+
+Auto-removal of overlapping Axes by ``plt.subplot`` and ``plt.subplot2grid``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Previously, `.pyplot.subplot` and `.pyplot.subplot2grid` would automatically
+remove preexisting Axes that overlap with the newly added Axes. This behavior
+was deemed confusing, and is now deprecated. Explicitly call ``ax.remove()`` on
+Axes that need to be removed.
+
+Passing *linefmt* positionally to ``stem`` is undeprecated
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Positional use of all formatting parameters in `~.Axes.stem` has been
+deprecated since Matplotlib 3.5. This deprecation is relaxed so that one can
+still pass *linefmt* positionally, i.e. ``stem(x, y, 'r')``.
+
+``stem(..., use_line_collection=False)``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+... is deprecated with no replacement. This was a compatibility fallback to a
+former more inefficient representation of the stem lines.
+
+Positional / keyword arguments
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Passing all but the very few first arguments positionally in the constructors
+of Artists is deprecated. Most arguments will become keyword-only in a future
+version.
+
+Passing too many positional arguments to ``tripcolor`` is now deprecated (extra
+arguments were previously silently ignored).
+
+Passing *emit* and *auto* parameters of ``set_xlim``, ``set_ylim``,
+``set_zlim``, ``set_rlim`` positionally is deprecated; they will become
+keyword-only in a future release.
+
+The *transOffset* parameter of `.Collection.set_offset_transform` and the
+various ``create_collection`` methods of legend handlers has been renamed to
+*offset_transform* (consistently with the property name).
+
+Calling ``MarkerStyle()`` with no arguments or ``MarkerStyle(None)`` is
+deprecated; use ``MarkerStyle("")`` to construct an empty marker style.
+
+``Axes.get_window_extent`` / ``Figure.get_window_extent`` accept only
+*renderer*. This aligns the API with the general `.Artist.get_window_extent`
+API. All other parameters were ignored anyway.
+
+The *cleared* parameter of ``get_renderer``, which only existed for AGG-based
+backends, has been deprecated. Use ``renderer.clear()`` instead to explicitly
+clear the renderer buffer.
+
+Methods to set parameters in ``LogLocator`` and ``LogFormatter*``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+In `~.LogFormatter` and derived subclasses, the methods ``base`` and
+``label_minor`` for setting the respective parameter are deprecated and
+replaced by ``set_base`` and ``set_label_minor``, respectively.
+
+In `~.LogLocator`, the methods ``base`` and ``subs`` for setting the respective
+parameter are deprecated. Instead, use ``set_params(base=..., subs=...)``.
+
+``Axes.get_renderer_cache``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The canvas now takes care of the renderer and whether to cache it or not. The
+alternative is to call ``axes.figure.canvas.get_renderer()``.
+
+Groupers from ``get_shared_x_axes`` / ``get_shared_y_axes`` will be immutable
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Modifications to the Groupers returned by ``get_shared_x_axes`` and
+``get_shared_y_axes`` are deprecated. In the future, these methods will return
+immutable views on the grouper structures. Note that previously, calling e.g.
+``join()`` would already fail to set up the correct structures for sharing
+axes; use `.Axes.sharex` or `.Axes.sharey` instead.
+
+Unused methods in ``Axis``, ``Tick``, ``XAxis``, and ``YAxis``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+``Tick.label`` has been pending deprecation since 3.1 and is now deprecated.
+Use ``Tick.label1`` instead.
+
+The following methods are no longer used and deprecated without a replacement:
+
+- ``Axis.get_ticklabel_extents``
+- ``Tick.get_pad_pixels``
+- ``XAxis.get_text_heights``
+- ``YAxis.get_text_widths``
+
+``mlab.stride_windows``
+~~~~~~~~~~~~~~~~~~~~~~~
+
+... is deprecated. Use ``np.lib.stride_tricks.sliding_window_view`` instead (or
+``np.lib.stride_tricks.as_strided`` on NumPy < 1.20).
+
+Event handlers
+~~~~~~~~~~~~~~
+
+The ``draw_event``, ``resize_event``, ``close_event``, ``key_press_event``,
+``key_release_event``, ``pick_event``, ``scroll_event``,
+``button_press_event``, ``button_release_event``, ``motion_notify_event``,
+``enter_notify_event`` and ``leave_notify_event`` methods of
+`.FigureCanvasBase` are deprecated. They had inconsistent signatures across
+backends, and made it difficult to improve event metadata.
+
+In order to trigger an event on a canvas, directly construct an `.Event` object
+of the correct class and call ``canvas.callbacks.process(event.name, event)``.
+
+Widgets
+~~~~~~~
+
+All parameters to ``MultiCursor`` starting from *useblit* are becoming
+keyword-only (passing them positionally is deprecated).
+
+The ``canvas`` and ``background`` attributes of ``MultiCursor`` are deprecated
+with no replacement.
+
+The *visible* attribute of Selector widgets has been deprecated; use
+``set_visible`` or ``get_visible`` instead.
+
+The *state_modifier_keys* attribute of Selector widgets has been privatized and
+the modifier keys must be set when creating the widget.
+
+``Axes3D.dist``
+~~~~~~~~~~~~~~~
+
+... has been privatized. Use the *zoom* keyword argument in
+`.Axes3D.set_box_aspect` instead.
+
+3D Axis
+~~~~~~~
+
+The previous constructor of `.axis3d.Axis`, with signature ``(self, adir,
+v_intervalx, d_intervalx, axes, *args, rotate_label=None, **kwargs)`` is
+deprecated in favor of a new signature closer to the one of 2D Axis; it is now
+``(self, axes, *, rotate_label=None, **kwargs)`` where ``kwargs`` are forwarded
+to the 2D Axis constructor. The axis direction is now inferred from the axis
+class' ``axis_name`` attribute (as in the 2D case); the ``adir`` attribute is
+deprecated.
+
+The ``init3d`` method of 3D Axis is also deprecated; all the relevant
+initialization is done as part of the constructor.
+
+The ``d_interval`` and ``v_interval`` attributes of 3D Axis are deprecated; use
+``get_data_interval`` and ``get_view_interval`` instead.
+
+The ``w_xaxis``, ``w_yaxis``, and ``w_zaxis`` attributes of ``Axis3D`` have
+been pending deprecation since 3.1. They are now deprecated. Instead use
+``xaxis``, ``yaxis``, and ``zaxis``.
+
+``mplot3d.axis3d.Axis.set_pane_pos`` is deprecated. This is an internal method
+where the provided values are overwritten during drawing. Hence, it does not
+serve any purpose to be directly accessible.
+
+The two helper functions ``mplot3d.axis3d.move_from_center`` and
+``mplot3d.axis3d.tick_update_position`` are considered internal and deprecated.
+If these are required, please vendor the code from the corresponding private
+methods ``_move_from_center`` and ``_tick_update_position``.
+
+``Figure.callbacks`` is deprecated
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The Figure ``callbacks`` property is deprecated. The only signal was
+"dpi_changed", which can be replaced by connecting to the "resize_event" on the
+canvas ``figure.canvas.mpl_connect("resize_event", func)`` instead.
+
+``FigureCanvas`` without a ``required_interactive_framework`` attribute
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Support for such canvas classes is deprecated. Note that canvas classes which
+inherit from ``FigureCanvasBase`` always have such an attribute.
+
+Backend-specific deprecations
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+- ``backend_gtk3.FigureManagerGTK3Agg`` and
+ ``backend_gtk4.FigureManagerGTK4Agg``; directly use
+ ``backend_gtk3.FigureManagerGTK3`` and ``backend_gtk4.FigureManagerGTK4``
+ instead.
+- The *window* parameter to ``backend_gtk3.NavigationToolbar2GTK3`` had no
+ effect, and is now deprecated.
+- ``backend_gtk3.NavigationToolbar2GTK3.win``
+- ``backend_gtk3.RendererGTK3Cairo`` and ``backend_gtk4.RendererGTK4Cairo``;
+ use `.RendererCairo` instead, which has gained the ``set_context`` method,
+ which also auto-infers the size of the underlying surface.
+- ``backend_cairo.RendererCairo.set_ctx_from_surface`` and
+ ``backend_cairo.RendererCairo.set_width_height`` in favor of
+ `.RendererCairo.set_context`.
+- ``backend_gtk3.error_msg_gtk``
+- ``backend_gtk3.icon_filename`` and ``backend_gtk3.window_icon``
+- ``backend_macosx.NavigationToolbar2Mac.prepare_configure_subplots`` has been
+ replaced by ``configure_subplots()``.
+- ``backend_pdf.Name.hexify``
+- ``backend_pdf.Operator`` and ``backend_pdf.Op.op`` are deprecated in favor of
+ a single standard `enum.Enum` interface on `.backend_pdf.Op`.
+- ``backend_pdf.fill``; vendor the code of the similarly named private
+ functions if you rely on these functions.
+- ``backend_pgf.LatexManager.texcommand`` and
+ ``backend_pgf.LatexManager.latex_header``
+- ``backend_pgf.NO_ESCAPE``
+- ``backend_pgf.common_texification``
+- ``backend_pgf.get_fontspec``
+- ``backend_pgf.get_preamble``
+- ``backend_pgf.re_mathsep``
+- ``backend_pgf.writeln``
+- ``backend_ps.convert_psfrags``
+- ``backend_ps.quote_ps_string``; vendor the code of the similarly named
+ private functions if you rely on it.
+- ``backend_qt.qApp``; use ``QtWidgets.QApplication.instance()`` instead.
+- ``backend_svg.escape_attrib``; vendor the code of the similarly named private
+ functions if you rely on it.
+- ``backend_svg.escape_cdata``; vendor the code of the similarly named private
+ functions if you rely on it.
+- ``backend_svg.escape_comment``; vendor the code of the similarly named
+ private functions if you rely on it.
+- ``backend_svg.short_float_fmt``; vendor the code of the similarly named
+ private functions if you rely on it.
+- ``backend_svg.generate_transform`` and ``backend_svg.generate_css``
+- ``backend_tk.NavigationToolbar2Tk.lastrect`` and
+ ``backend_tk.RubberbandTk.lastrect``
+- ``backend_tk.NavigationToolbar2Tk.window``; use ``toolbar.master`` instead.
+- ``backend_tools.ToolBase.destroy``; To run code upon tool removal, connect to
+ the ``tool_removed_event`` event.
+- ``backend_wx.RendererWx.offset_text_height``
+- ``backend_wx.error_msg_wx``
+
+- ``FigureCanvasBase.pick``; directly call `.Figure.pick`, which has taken over
+ the responsibility of checking the canvas widget lock as well.
+- ``FigureCanvasBase.resize``, which has no effect; use
+ ``FigureManagerBase.resize`` instead.
+
+- ``FigureManagerMac.close``
+
+- ``FigureFrameWx.sizer``; use ``frame.GetSizer()`` instead.
+- ``FigureFrameWx.figmgr`` and ``FigureFrameWx.get_figure_manager``; use
+ ``frame.canvas.manager`` instead.
+- ``FigureFrameWx.num``; use ``frame.canvas.manager.num`` instead.
+- ``FigureFrameWx.toolbar``; use ``frame.GetToolBar()`` instead.
+- ``FigureFrameWx.toolmanager``; use ``frame.canvas.manager.toolmanager``
+ instead.
+
+Modules
+~~~~~~~
+
+The modules ``matplotlib.afm``, ``matplotlib.docstring``,
+``matplotlib.fontconfig_pattern``, ``matplotlib.tight_bbox``,
+``matplotlib.tight_layout``, and ``matplotlib.type1font`` are considered
+internal and public access is deprecated.
+
+``checkdep_usetex`` deprecated
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+This method was only intended to disable tests in case no latex install was
+found. As such, it is considered to be private and for internal use only.
+
+Please vendor the code if you need this.
+
+``date_ticker_factory`` deprecated
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The ``date_ticker_factory`` method in the `matplotlib.dates` module is
+deprecated. Instead use `~.AutoDateLocator` and `~.AutoDateFormatter` for a
+more flexible and scalable locator and formatter.
+
+If you need the exact ``date_ticker_factory`` behavior, please copy the code.
+
+``dviread.find_tex_file`` will raise ``FileNotFoundError``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+In the future, ``dviread.find_tex_file`` will raise a `FileNotFoundError` for
+missing files. Previously, it would return an empty string in such cases.
+Raising an exception allows attaching a user-friendly message instead. During
+the transition period, a warning is raised.
+
+``transforms.Affine2D.identity()``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+... is deprecated in favor of directly calling the `.Affine2D` constructor with
+no arguments.
+
+Deprecations in ``testing.decorators``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The unused class ``CleanupTestCase`` and decorator ``cleanup`` are deprecated
+and will be removed. Vendor the code, including the private function
+``_cleanup_cm``.
+
+The function ``check_freetype_version`` is considered internal and deprecated.
+Vendor the code of the private function ``_check_freetype_version``.
+
+``text.get_rotation()``
+~~~~~~~~~~~~~~~~~~~~~~~
+
+... is deprecated with no replacement. Copy the original implementation if
+needed.
+
+Miscellaneous internals
+~~~~~~~~~~~~~~~~~~~~~~~
+
+- ``axes_grid1.axes_size.AddList``; use ``sum(sizes, start=Fixed(0))`` (for
+ example) to sum multiple size objects.
+- ``axes_size.Padded``; use ``size + pad`` instead
+- ``axes_size.SizeFromFunc``, ``axes_size.GetExtentHelper``
+- ``AxisArtistHelper.delta1`` and ``AxisArtistHelper.delta2``
+- ``axislines.GridHelperBase.new_gridlines`` and
+ ``axislines.Axes.new_gridlines``
+- ``cbook.maxdict``; use the standard library ``functools.lru_cache`` instead.
+- ``_DummyAxis.dataLim`` and ``_DummyAxis.viewLim``; use
+ ``get_data_interval()``, ``set_data_interval()``, ``get_view_interval()``,
+ and ``set_view_interval()`` instead.
+- ``GridSpecBase.get_grid_positions(..., raw=True)``
+- ``ImageMagickBase.delay`` and ``ImageMagickBase.output_args``
+- ``MathtextBackend``, ``MathtextBackendAgg``, ``MathtextBackendPath``,
+ ``MathTextWarning``
+- ``TexManager.get_font_config``; it previously returned an internal hashed key
+ for used for caching purposes.
+- ``TextToPath.get_texmanager``; directly construct a `.texmanager.TexManager`
+ instead.
+- ``ticker.is_close_to_int``; use ``math.isclose(x, round(x))`` instead.
+- ``ticker.is_decade``; use ``y = numpy.log(x)/numpy.log(base);
+ numpy.isclose(y, numpy.round(y))`` instead.
diff --git a/doc/api/prev_api_changes/api_changes_3.6.0/development.rst b/doc/api/prev_api_changes/api_changes_3.6.0/development.rst
new file mode 100644
index 000000000000..fb9f1f3e21c5
--- /dev/null
+++ b/doc/api/prev_api_changes/api_changes_3.6.0/development.rst
@@ -0,0 +1,42 @@
+Development changes
+-------------------
+
+Increase to minimum supported versions of dependencies
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+For Matplotlib 3.6, the :ref:`minimum supported versions ` are
+being bumped:
+
++------------+-----------------+---------------+
+| Dependency | min in mpl3.5 | min in mpl3.6 |
++============+=================+===============+
+| Python | 3.7 | 3.8 |
++------------+-----------------+---------------+
+| NumPy | 1.17 | 1.19 |
++------------+-----------------+---------------+
+
+This is consistent with our :ref:`min_deps_policy` and `NEP29
+`__
+
+Build setup options changes
+~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The ``gui_support.macosx`` setup option has been renamed to
+``packages.macosx``.
+
+New wheel architectures
+~~~~~~~~~~~~~~~~~~~~~~~
+
+Wheels have been added for:
+
+- Python 3.11
+- PyPy 3.8 and 3.9
+
+Increase to required versions of documentation dependencies
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+`sphinx`_ >= 3.0 and `numpydoc`_ >= 1.0 are now required for building the
+documentation.
+
+.. _numpydoc: https://pypi.org/project/numpydoc/
+.. _sphinx: https://pypi.org/project/Sphinx/
diff --git a/doc/api/prev_api_changes/api_changes_3.6.0/removals.rst b/doc/api/prev_api_changes/api_changes_3.6.0/removals.rst
new file mode 100644
index 000000000000..b261fdb30596
--- /dev/null
+++ b/doc/api/prev_api_changes/api_changes_3.6.0/removals.rst
@@ -0,0 +1,222 @@
+Removals
+--------
+
+The following deprecated APIs have been removed:
+
+Removed behaviour
+~~~~~~~~~~~~~~~~~
+
+Stricter validation of function parameters
+..........................................
+
+- Unknown keyword arguments to `.Figure.savefig`, `.pyplot.savefig`, and the
+ ``FigureCanvas.print_*`` methods now raise a `TypeError`, instead of being
+ ignored.
+- Extra parameters to the `~.axes.Axes` constructor, i.e., those other than
+ *fig* and *rect*, are now keyword only.
+- Passing arguments not specifically listed in the signatures of
+ `.Axes3D.plot_surface` and `.Axes3D.plot_wireframe` is no longer supported;
+ pass any extra arguments as keyword arguments instead.
+- Passing positional arguments to `.LineCollection` has been removed; use
+ specific keyword argument names now.
+
+``imread`` no longer accepts URLs
+.................................
+
+Passing a URL to `~.pyplot.imread()` has been removed. Please open the URL for
+reading and directly use the Pillow API (e.g.,
+``PIL.Image.open(urllib.request.urlopen(url))``, or
+``PIL.Image.open(io.BytesIO(requests.get(url).content))``) instead.
+
+MarkerStyle is immutable
+........................
+
+The methods ``MarkerStyle.set_fillstyle`` and ``MarkerStyle.set_marker`` have
+been removed. Create a new `.MarkerStyle` with the respective parameters
+instead.
+
+Passing bytes to ``FT2Font.set_text``
+.....................................
+
+... is no longer supported. Pass `str` instead.
+
+Support for passing tool names to ``ToolManager.add_tool``
+..........................................................
+
+... has been removed. The second parameter to `.ToolManager.add_tool` must now
+always be a tool class.
+
+``backend_tools.ToolFullScreen`` now inherits from ``ToolBase``, not from ``ToolToggleBase``
+............................................................................................
+
+`.ToolFullScreen` can only switch between the non-fullscreen and fullscreen
+states, but not unconditionally put the window in a given state; hence the
+``enable`` and ``disable`` methods were misleadingly named. Thus, the
+`.ToolToggleBase`-related API (``enable``, ``disable``, etc.) was removed.
+
+``BoxStyle._Base`` and ``transmute`` method of box styles
+.........................................................
+
+... have been removed. Box styles implemented as classes no longer need to
+inherit from a base class.
+
+Loaded modules logging
+......................
+
+The list of currently loaded modules is no longer logged at the DEBUG level at
+Matplotlib import time, because it can produce extensive output and make other
+valuable DEBUG statements difficult to find. If you were relying on this
+output, please arrange for your own logging (the built-in `sys.modules` can be
+used to get the currently loaded modules).
+
+Modules
+~~~~~~~
+
+- The ``cbook.deprecation`` module has been removed from the public API as it
+ is considered internal.
+- The ``mpl_toolkits.axes_grid`` module has been removed. All functionality 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`.
+
+Classes, methods and attributes
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The following module-level classes/variables have been removed:
+
+- ``cm.cmap_d``
+- ``colorbar.colorbar_doc``, ``colorbar.colorbar_kw_doc``
+- ``ColorbarPatch``
+- ``mathtext.Fonts`` and all its subclasses
+- ``mathtext.FontConstantsBase`` and all its subclasses
+- ``mathtext.latex_to_bakoma``, ``mathtext.latex_to_cmex``,
+ ``mathtext.latex_to_standard``
+- ``mathtext.MathtextBackendPdf``, ``mathtext.MathtextBackendPs``,
+ ``mathtext.MathtextBackendSvg``, ``mathtext.MathtextBackendCairo``; use
+ `.MathtextBackendPath` instead.
+- ``mathtext.Node`` and all its subclasses
+- ``mathtext.NUM_SIZE_LEVELS``
+- ``mathtext.Parser``
+- ``mathtext.Ship``
+- ``mathtext.SHRINK_FACTOR`` and ``mathtext.GROW_FACTOR``
+- ``mathtext.stix_virtual_fonts``,
+- ``mathtext.tex2uni``
+- ``backend_pgf.TmpDirCleaner``
+- ``backend_ps.GraphicsContextPS``; use ``GraphicsContextBase`` instead.
+- ``backend_wx.IDLE_DELAY``
+- ``axes_grid1.parasite_axes.ParasiteAxesAuxTransBase``; use
+ `.ParasiteAxesBase` instead.
+- ``axes_grid1.parasite_axes.ParasiteAxesAuxTrans``; use `.ParasiteAxes`
+ instead.
+
+The following class attributes have been removed:
+
+- ``Line2D.validCap`` and ``Line2D.validJoin``; validation is centralized in
+ ``rcsetup``.
+- ``Patch.validCap`` and ``Patch.validJoin``; validation is centralized in
+ ``rcsetup``.
+- ``renderer.M``, ``renderer.eye``, ``renderer.vvec``,
+ ``renderer.get_axis_position`` placed on the Renderer during 3D Axes draw;
+ these attributes are all available via `.Axes3D`, which can be accessed via
+ ``self.axes`` on all `.Artist`\s.
+- ``RendererPdf.mathtext_parser``, ``RendererPS.mathtext_parser``,
+ ``RendererSVG.mathtext_parser``, ``RendererCairo.mathtext_parser``
+- ``StandardPsFonts.pswriter``
+- ``Subplot.figbox``; use `.Axes.get_position` instead.
+- ``Subplot.numRows``; ``ax.get_gridspec().nrows`` instead.
+- ``Subplot.numCols``; ``ax.get_gridspec().ncols`` instead.
+- ``SubplotDivider.figbox``
+- ``cids``, ``cnt``, ``observers``, ``change_observers``, and
+ ``submit_observers`` on all `.Widget`\s
+
+The following class methods have been removed:
+
+- ``Axis.cla()``; use `.Axis.clear` instead.
+- ``RadialAxis.cla()`` and ``ThetaAxis.cla()``; use `.RadialAxis.clear` or
+ `.ThetaAxis.clear` instead.
+- ``Spine.cla()``; use `.Spine.clear` instead.
+- ``ContourLabeler.get_label_coords()``; there is no replacement as it was
+ considered an internal helper.
+- ``FancyArrowPatch.get_dpi_cor`` and ``FancyArrowPatch.set_dpi_cor``
+
+- ``FigureCanvas.get_window_title()`` and ``FigureCanvas.set_window_title()``;
+ use `.FigureManagerBase.get_window_title` or
+ `.FigureManagerBase.set_window_title` if using pyplot, or use GUI-specific
+ methods if embedding.
+- ``FigureManager.key_press()`` and ``FigureManager.button_press()``; trigger
+ the events directly on the canvas using
+ ``canvas.callbacks.process(event.name, event)`` for key and button events.
+
+- ``RendererAgg.get_content_extents()`` and
+ ``RendererAgg.tostring_rgba_minimized()``
+- ``NavigationToolbar2Wx.get_canvas()``
+
+- ``ParasiteAxesBase.update_viewlim()``; use ``ParasiteAxesBase.apply_aspect``
+ instead.
+- ``Subplot.get_geometry()``; use ``SubplotBase.get_subplotspec`` instead.
+- ``Subplot.change_geometry()``; use ``SubplotBase.set_subplotspec`` instead.
+- ``Subplot.update_params()``; this method did nothing.
+- ``Subplot.is_first_row()``; use ``ax.get_subplotspec().is_first_row``
+ instead.
+- ``Subplot.is_first_col()``; use ``ax.get_subplotspec().is_first_col``
+ instead.
+- ``Subplot.is_last_row()``; use ``ax.get_subplotspec().is_last_row`` instead.
+- ``Subplot.is_last_col()``; use ``ax.get_subplotspec().is_last_col`` instead.
+- ``SubplotDivider.change_geometry()``; use `.SubplotDivider.set_subplotspec`
+ instead.
+- ``SubplotDivider.get_geometry()``; use `.SubplotDivider.get_subplotspec`
+ instead.
+- ``SubplotDivider.update_params()``
+- ``get_depth``, ``parse``, ``to_mask``, ``to_rgba``, and ``to_png`` of
+ `.MathTextParser`; use `.mathtext.math_to_image` instead.
+
+- ``MovieWriter.cleanup()``; the cleanup logic is instead fully implemented in
+ `.MovieWriter.finish` and ``cleanup`` is no longer called.
+
+Functions
+~~~~~~~~~
+
+The following functions have been removed;
+
+- ``backend_template.new_figure_manager()``,
+ ``backend_template.new_figure_manager_given_figure()``, and
+ ``backend_template.draw_if_interactive()`` have been removed, as part of the
+ introduction of the simplified backend API.
+- Deprecation-related re-imports ``cbook.deprecated()``, and
+ ``cbook.warn_deprecated()``.
+- ``colorbar.colorbar_factory()``; use `.Colorbar` instead.
+ ``colorbar.make_axes_kw_doc()``
+- ``mathtext.Error()``
+- ``mathtext.ship()``
+- ``mathtext.tex2uni()``
+- ``axes_grid1.parasite_axes.parasite_axes_auxtrans_class_factory()``; use
+ `.parasite_axes_class_factory` instead.
+- ``sphinext.plot_directive.align()``; use
+ ``docutils.parsers.rst.directives.images.Image.align`` instead.
+
+Arguments
+~~~~~~~~~
+
+The following arguments have been removed:
+
+- *dpi* from ``print_ps()`` in the PS backend and ``print_pdf()`` in the PDF
+ backend. Instead, the methods will obtain the DPI from the ``savefig``
+ machinery.
+- *dpi_cor* from `~.FancyArrowPatch`
+- *minimum_descent* from ``TextArea``; it is now effectively always True
+- *origin* from ``FigureCanvasWx.gui_repaint()``
+- *project* from ``Line3DCollection.draw()``
+- *renderer* from `.Line3DCollection.do_3d_projection`,
+ `.Patch3D.do_3d_projection`, `.PathPatch3D.do_3d_projection`,
+ `.Path3DCollection.do_3d_projection`, `.Patch3DCollection.do_3d_projection`,
+ `.Poly3DCollection.do_3d_projection`
+- *resize_callback* from the Tk backend; use
+ ``get_tk_widget().bind('', ..., True)`` instead.
+- *return_all* from ``gridspec.get_position()``
+- Keyword arguments to ``gca()``; there is no replacement.
+
+rcParams
+~~~~~~~~
+
+The setting :rc:`ps.useafm` no longer has any effect on `matplotlib.mathtext`.
diff --git a/doc/api/prev_api_changes/api_changes_3.6.1.rst b/doc/api/prev_api_changes/api_changes_3.6.1.rst
new file mode 100644
index 000000000000..ad929d426885
--- /dev/null
+++ b/doc/api/prev_api_changes/api_changes_3.6.1.rst
@@ -0,0 +1,15 @@
+API Changes for 3.6.1
+=====================
+
+Deprecations
+------------
+
+Colorbars for orphaned mappables are deprecated, but no longer raise
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Before 3.6.0, Colorbars for mappables that do not have a parent Axes would
+steal space from the current Axes. 3.6.0 raised an error on this, but without a
+deprecation cycle. For 3.6.1 this is reverted; the current Axes is used, but a
+deprecation warning is shown instead. In this undetermined case, users and
+libraries should explicitly specify what Axes they want space to be stolen
+from: ``fig.colorbar(mappable, ax=plt.gca())``.
diff --git a/doc/api/prev_api_changes/api_changes_3.7.0.rst b/doc/api/prev_api_changes/api_changes_3.7.0.rst
new file mode 100644
index 000000000000..932a4ba34452
--- /dev/null
+++ b/doc/api/prev_api_changes/api_changes_3.7.0.rst
@@ -0,0 +1,14 @@
+API Changes for 3.7.0
+=====================
+
+.. contents::
+ :local:
+ :depth: 1
+
+.. include:: /api/prev_api_changes/api_changes_3.7.0/behaviour.rst
+
+.. include:: /api/prev_api_changes/api_changes_3.7.0/deprecations.rst
+
+.. include:: /api/prev_api_changes/api_changes_3.7.0/removals.rst
+
+.. include:: /api/prev_api_changes/api_changes_3.7.0/development.rst
diff --git a/doc/api/prev_api_changes/api_changes_3.7.0/behaviour.rst b/doc/api/prev_api_changes/api_changes_3.7.0/behaviour.rst
new file mode 100644
index 000000000000..6057bfa9af4c
--- /dev/null
+++ b/doc/api/prev_api_changes/api_changes_3.7.0/behaviour.rst
@@ -0,0 +1,136 @@
+Behaviour Changes
+-----------------
+
+All Axes have ``get_subplotspec`` and ``get_gridspec`` methods now, which returns None for Axes not positioned via a gridspec
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Previously, this method was only present for Axes positioned via a gridspec.
+Following this change, checking ``hasattr(ax, "get_gridspec")`` should now be
+replaced by ``ax.get_gridspec() is not None``. For compatibility with older
+Matplotlib releases, one can also check
+``hasattr(ax, "get_gridspec") and ax.get_gridspec() is not None``.
+
+``HostAxesBase.get_aux_axes`` now defaults to using the same base axes class as the host axes
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+If using an ``mpl_toolkits.axisartist``-based host Axes, the parasite Axes will
+also be based on ``mpl_toolkits.axisartist``. This behavior is consistent with
+``HostAxesBase.twin``, ``HostAxesBase.twinx``, and ``HostAxesBase.twiny``.
+
+``plt.get_cmap`` and ``matplotlib.cm.get_cmap`` return a copy
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Formerly, `~.pyplot.get_cmap` and `.cm.get_cmap` returned a global version of a
+`.Colormap`. This was prone to errors as modification of the colormap would
+propagate from one location to another without warning. Now, a new copy of the
+colormap is returned.
+
+``TrapezoidMapTriFinder`` uses different random number generator
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The random number generator used to determine the order of insertion of
+triangle edges in ``TrapezoidMapTriFinder`` has changed. This can result in a
+different triangle index being returned for a point that lies exactly on an
+edge between two triangles. This can also affect triangulation interpolation
+and refinement algorithms that use ``TrapezoidMapTriFinder``.
+
+``FuncAnimation(save_count=None)``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Passing ``save_count=None`` to `.FuncAnimation` no longer limits the number
+of frames to 100. Make sure that it either can be inferred from *frames*
+or provide an integer *save_count*.
+
+``CenteredNorm`` halfrange is not modified when vcenter changes
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Previously, the **halfrange** would expand in proportion to the
+amount that **vcenter** was moved away from either **vmin** or **vmax**.
+Now, the halfrange remains fixed when vcenter is changed, and **vmin** and
+**vmax** are updated based on the **vcenter** and **halfrange** values.
+
+For example, this is what the values were when changing vcenter previously.
+
+.. code-block::
+
+ norm = CenteredNorm(vcenter=0, halfrange=1)
+ # Move vcenter up by one
+ norm.vcenter = 1
+ # updates halfrange and vmax (vmin stays the same)
+ # norm.halfrange == 2, vmin == -1, vmax == 3
+
+and now, with that same example
+
+.. code-block::
+
+ norm = CenteredNorm(vcenter=0, halfrange=1)
+ norm.vcenter = 1
+ # updates vmin and vmax (halfrange stays the same)
+ # norm.halfrange == 1, vmin == 0, vmax == 2
+
+The **halfrange** can be set manually or ``norm.autoscale()``
+can be used to automatically set the limits after setting **vcenter**.
+
+``fig.subplot_mosaic`` no longer passes the ``gridspec_kw`` args to nested gridspecs.
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+For nested `.Figure.subplot_mosaic` layouts, it is almost always
+inappropriate for *gridspec_kw* arguments to be passed to lower nest
+levels, and these arguments are incompatible with the lower levels in
+many cases. This dictionary is no longer passed to the inner
+layouts. Users who need to modify *gridspec_kw* at multiple levels
+should use `.Figure.subfigures` to get nesting, and construct the
+inner layouts with `.Figure.subplots` or `.Figure.subplot_mosaic`.
+
+``HPacker`` alignment with **bottom** or **top** are now correct
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Previously, the **bottom** and **top** alignments were swapped.
+This has been corrected so that the alignments correspond appropriately.
+
+On Windows only fonts known to the registry will be discovered
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Previously, Matplotlib would recursively walk user and system font directories
+to discover fonts, however this lead to a number of undesirable behaviors
+including finding deleted fonts. Now Matplotlib will only find fonts that are
+known to the Windows registry.
+
+This means that any user installed fonts must go through the Windows font
+installer rather than simply being copied to the correct folder.
+
+This only impacts the set of fonts Matplotlib will consider when using
+`matplotlib.font_manager.findfont`. To use an arbitrary font, directly pass the
+path to a font as shown in
+:doc:`/gallery/text_labels_and_annotations/font_file`.
+
+``QuadMesh.set_array`` now always raises ``ValueError`` for inputs with incorrect shapes
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+It could previously also raise `TypeError` in some cases.
+
+``contour`` and ``contourf`` auto-select suitable levels when given boolean inputs
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+If the height array given to `.Axes.contour` or `.Axes.contourf` is of bool
+dtype and *levels* is not specified, *levels* now defaults to ``[0.5]`` for
+`~.Axes.contour` and ``[0, 0.5, 1]`` for `.Axes.contourf`.
+
+``contour`` no longer warns if no contour lines are drawn.
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+This can occur if the user explicitly passes a ``levels`` array with no values
+
+``AxesImage.set_extent`` now raises ``TypeError`` for unknown keyword arguments
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+It previously raised a `ValueError`.
+
+etween ``z.min()`` and ``z.max()``; or if ``z`` has the same value everywhere.
+
+Change of ``legend(loc="best")`` behavior
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The algorithm of the auto-legend locator has been tweaked to better handle
+non rectangular patches. Additional details on this change can be found in
+:ghissue:`9580` and :ghissue:`9598`.
diff --git a/doc/api/prev_api_changes/api_changes_3.7.0/deprecations.rst b/doc/api/prev_api_changes/api_changes_3.7.0/deprecations.rst
new file mode 100644
index 000000000000..dd6d9d8e0894
--- /dev/null
+++ b/doc/api/prev_api_changes/api_changes_3.7.0/deprecations.rst
@@ -0,0 +1,291 @@
+Deprecations
+------------
+
+``Axes`` subclasses should override ``clear`` instead of ``cla``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+For clarity, `.axes.Axes.clear` is now preferred over `.Axes.cla`. However, for
+backwards compatibility, the latter will remain as an alias for the former.
+
+For additional compatibility with third-party libraries, Matplotlib will
+continue to call the ``cla`` method of any `~.axes.Axes` subclasses if they
+define it. In the future, this will no longer occur, and Matplotlib will only
+call the ``clear`` method in `~.axes.Axes` subclasses.
+
+It is recommended to define only the ``clear`` method when on Matplotlib 3.6,
+and only ``cla`` for older versions.
+
+rcParams type
+~~~~~~~~~~~~~
+
+Relying on ``rcParams`` being a ``dict`` subclass is deprecated.
+
+Nothing will change for regular users because ``rcParams`` will continue to
+be dict-like (technically fulfill the ``MutableMapping`` interface).
+
+The `.RcParams` class does validation checking on calls to
+``.RcParams.__getitem__`` and ``.RcParams.__setitem__``. However, there are rare
+cases where we want to circumvent the validation logic and directly access the
+underlying data values. Previously, this could be accomplished via a call to
+the parent methods ``dict.__getitem__(rcParams, key)`` and
+``dict.__setitem__(rcParams, key, val)``.
+
+Matplotlib 3.7 introduces ``rcParams._set(key, val)`` and
+``rcParams._get(key)`` as a replacement to calling the parent methods. They are
+intentionally marked private to discourage external use; However, if direct
+`.RcParams` data access is needed, please switch from the dict functions to the
+new ``_get()`` and ``_set()``. Even though marked private, we guarantee API
+stability for these methods and they are subject to Matplotlib's API and
+deprecation policy.
+
+Please notify the Matplotlib developers if you rely on ``rcParams`` being a
+dict subclass in any other way, for which there is no migration path yet.
+
+Deprecation aliases in cbook
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The module ``matplotlib.cbook.deprecation`` was previously deprecated in
+Matplotlib 3.4, along with deprecation-related API in ``matplotlib.cbook``. Due
+to technical issues, ``matplotlib.cbook.MatplotlibDeprecationWarning`` and
+``matplotlib.cbook.mplDeprecation`` did not raise deprecation warnings on use.
+Changes in Python have now made it possible to warn when these aliases are
+being used.
+
+In order to avoid downstream breakage, these aliases will now warn, and their
+removal has been pushed from 3.6 to 3.8 to give time to notice said warnings.
+As replacement, please use `matplotlib.MatplotlibDeprecationWarning`.
+
+``draw_gouraud_triangle``
+~~~~~~~~~~~~~~~~~~~~~~~~~
+
+... is deprecated as in most backends this is a redundant call. Use
+`~.RendererBase.draw_gouraud_triangles` instead. A ``draw_gouraud_triangle``
+call in a custom `~matplotlib.artist.Artist` can readily be replaced as::
+
+ self.draw_gouraud_triangles(gc, points.reshape((1, 3, 2)),
+ colors.reshape((1, 3, 4)), trans)
+
+A `~.RendererBase.draw_gouraud_triangles` method can be implemented from an
+existing ``draw_gouraud_triangle`` method as::
+
+ transform = transform.frozen()
+ for tri, col in zip(triangles_array, colors_array):
+ self.draw_gouraud_triangle(gc, tri, col, transform)
+
+``matplotlib.pyplot.get_plot_commands``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+... is a pending deprecation. This is considered internal and no end-user
+should need it.
+
+``matplotlib.tri`` submodules are deprecated
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The ``matplotlib.tri.*`` submodules are deprecated. All functionality is
+available in ``matplotlib.tri`` directly and should be imported from there.
+
+Passing undefined *label_mode* to ``Grid``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+... is deprecated. This includes `mpl_toolkits.axes_grid1.axes_grid.Grid`,
+`mpl_toolkits.axes_grid1.axes_grid.AxesGrid`, and
+`mpl_toolkits.axes_grid1.axes_grid.ImageGrid` as well as the corresponding
+classes imported from `mpl_toolkits.axisartist.axes_grid`.
+
+Pass ``label_mode='keep'`` instead to get the previous behavior of not modifying labels.
+
+Colorbars for orphaned mappables are deprecated, but no longer raise
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Before 3.6.0, Colorbars for mappables that do not have a parent axes would
+steal space from the current Axes. 3.6.0 raised an error on this, but without
+a deprecation cycle. For 3.6.1 this is reverted, the current axes is used,
+but a deprecation warning is shown instead. In this undetermined case users
+and libraries should explicitly specify what axes they want space to be stolen
+from: ``fig.colorbar(mappable, ax=plt.gca())``.
+
+``Animation`` attributes
+~~~~~~~~~~~~~~~~~~~~~~~~
+
+The attributes ``repeat`` of `.TimedAnimation` and subclasses and
+``save_count`` of `.FuncAnimation` are considered private and deprecated.
+
+``contour.ClabelText`` and ``ContourLabeler.set_label_props``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+... are deprecated.
+
+Use ``Text(..., transform_rotates_text=True)`` as a replacement for
+``contour.ClabelText(...)`` and ``text.set(text=text, color=color,
+fontproperties=labeler.labelFontProps, clip_box=labeler.axes.bbox)`` as a
+replacement for the ``ContourLabeler.set_label_props(label, text, color)``.
+
+``ContourLabeler`` attributes
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The ``labelFontProps``, ``labelFontSizeList``, and ``labelTextsList``
+attributes of `.ContourLabeler` have been deprecated. Use the ``labelTexts``
+attribute and the font properties of the corresponding text objects instead.
+
+``backend_ps.PsBackendHelper`` and ``backend_ps.ps_backend_helper``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+... are deprecated with no replacement.
+
+``backend_webagg.ServerThread`` is deprecated
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+... with no replacement.
+
+``parse_fontconfig_pattern`` will no longer ignore unknown constant names
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Previously, in a fontconfig pattern like ``DejaVu Sans:foo``, the unknown
+``foo`` constant name would be silently ignored. This now raises a warning,
+and will become an error in the future.
+
+``BufferRegion.to_string`` and ``BufferRegion.to_string_argb``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+... are deprecated. Use ``np.asarray(buffer_region)`` to get an array view on
+a buffer region without making a copy; to convert that view from RGBA (the
+default) to ARGB, use ``np.take(..., [2, 1, 0, 3], axis=2)``.
+
+``num2julian``, ``julian2num`` and ``JULIAN_OFFSET``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+... of the `.dates` module are deprecated without replacements. These are
+undocumented and not exported. If you rely on these, please make a local copy.
+
+``unit_cube``, ``tunit_cube``, and ``tunit_edges``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+... of `.Axes3D` are deprecated without replacements. If you rely on them,
+please copy the code of the corresponding private function (name starting
+with ``_``).
+
+Most arguments to widgets have been made keyword-only
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Passing all but the very few first arguments positionally in the constructors
+of Widgets is deprecated. Most arguments will become keyword-only in a future
+version.
+
+``SimpleEvent``
+~~~~~~~~~~~~~~~
+
+The ``SimpleEvent`` nested class (previously accessible via the public
+subclasses of ``ConnectionStyle._Base``, such as `.ConnectionStyle.Arc`, has
+been deprecated.
+
+``RadioButtons.circles``
+~~~~~~~~~~~~~~~~~~~~~~~~
+
+... is deprecated. (RadioButtons now draws itself using `~.Axes.scatter`.)
+
+``CheckButtons.rectangles`` and ``CheckButtons.lines``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+``CheckButtons.rectangles`` and ``CheckButtons.lines`` are deprecated.
+(``CheckButtons`` now draws itself using `~.Axes.scatter`.)
+
+``OffsetBox.get_extent_offsets`` and ``OffsetBox.get_extent``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+... are deprecated; these methods are also deprecated on all subclasses of
+`.OffsetBox`.
+
+To get the offsetbox extents, instead of ``get_extent``, use
+`.OffsetBox.get_bbox`, which directly returns a `.Bbox` instance.
+
+To also get the child offsets, instead of ``get_extent_offsets``, separately
+call `~.OffsetBox.get_offset` on each children after triggering a draw.
+
+``legend.legendHandles``
+~~~~~~~~~~~~~~~~~~~~~~~~
+
+... was undocumented and has been renamed to ``legend_handles``. Using ``legendHandles`` is deprecated.
+
+``ticklabels`` parameter of `.Axis.set_ticklabels` renamed to ``labels``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+``offsetbox.bbox_artist``
+~~~~~~~~~~~~~~~~~~~~~~~~~
+
+... is deprecated. This is just a wrapper to call `.patches.bbox_artist` if a
+flag is set in the file, so use that directly if you need the behavior.
+
+``Quiver.quiver_doc`` and ``Barbs.barbs_doc``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+... are deprecated. These are the doc-string and should not be accessible as
+a named class member.
+
+Deprecate unused parameter *x* to ``TextBox.begin_typing``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+This parameter was unused in the method, but was a required argument.
+
+Deprecation of top-level cmap registration and access functions in ``mpl.cm``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+As part of a `multi-step process
+`_ we are refactoring
+the global state for managing the registered colormaps.
+
+In Matplotlib 3.5 we added a `.ColormapRegistry` class and exposed an instance
+at the top level as ``matplotlib.colormaps``. The existing top level functions
+in `matplotlib.cm` (``get_cmap``, ``register_cmap``, ``unregister_cmap``) were
+changed to be aliases around the same instance. In Matplotlib 3.6 we have
+marked those top level functions as pending deprecation.
+
+In Matplotlib 3.7, the following functions have been marked for deprecation:
+
+- ``matplotlib.cm.get_cmap``; use ``matplotlib.colormaps[name]`` instead if you
+ have a `str`.
+
+ **Added 3.6.1** Use `matplotlib.cm.ColormapRegistry.get_cmap` if you
+ have a string, `None` or a `matplotlib.colors.Colormap` object that you want
+ to convert to a `matplotlib.colors.Colormap` instance.
+- ``matplotlib.cm.register_cmap``; use `matplotlib.colormaps.register
+ <.ColormapRegistry.register>` instead
+- ``matplotlib.cm.unregister_cmap``; use `matplotlib.colormaps.unregister
+ <.ColormapRegistry.unregister>` instead
+- ``matplotlib.pyplot.register_cmap``; use `matplotlib.colormaps.register
+ <.ColormapRegistry.register>` instead
+
+The `matplotlib.pyplot.get_cmap` function will stay available for backward
+compatibility.
+
+``BrokenBarHCollection`` is deprecated
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+It was just a thin wrapper inheriting from `.PolyCollection`;
+`~.Axes.broken_barh` has now been changed to return a `.PolyCollection`
+instead.
+
+The ``BrokenBarHCollection.span_where`` helper is likewise deprecated; for the
+duration of the deprecation it has been moved to the parent `.PolyCollection`
+class. Use `~.Axes.fill_between` as a replacement; see
+:doc:`/gallery/lines_bars_and_markers/span_regions` for an example.
+
+Passing inconsistent ``loc`` and ``nth_coord`` to axisartist helpers
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Trying to construct for example a "top y-axis" or a "left x-axis" is now
+deprecated.
+
+``passthru_pt``
+~~~~~~~~~~~~~~~
+
+This attribute of ``AxisArtistHelper``\s is deprecated.
+
+``axes3d.vvec``, ``axes3d.eye``, ``axes3d.sx``, and ``axes3d.sy``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+... are deprecated without replacement.
+
+``Line2D``
+~~~~~~~~~~
+
+When creating a Line2D or using `.Line2D.set_xdata` and `.Line2D.set_ydata`,
+passing x/y data as non sequence is deprecated.
diff --git a/doc/api/prev_api_changes/api_changes_3.7.0/development.rst b/doc/api/prev_api_changes/api_changes_3.7.0/development.rst
new file mode 100644
index 000000000000..c2ae35970524
--- /dev/null
+++ b/doc/api/prev_api_changes/api_changes_3.7.0/development.rst
@@ -0,0 +1,49 @@
+Development changes
+-------------------
+
+
+Windows wheel runtime bundling
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Wheels built for Windows now bundle the MSVC runtime DLL ``msvcp140.dll``. This
+enables importing Matplotlib on systems that do not have the runtime installed.
+
+
+Increase to minimum supported versions of dependencies
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+
+For Matplotlib 3.7, the :ref:`minimum supported versions ` are
+being bumped:
+
++------------+-----------------+---------------+
+| Dependency | min in mpl3.6 | min in mpl3.7 |
++============+=================+===============+
+| NumPy | 1.19 | 1.20 |
++------------+-----------------+---------------+
+| pyparsing | 2.2.1 | 2.3.1 |
++------------+-----------------+---------------+
+| Qt | | 5.10 |
++------------+-----------------+---------------+
+
+- There are no wheels or conda packages that support both Qt 5.9 (or older) and
+ Python 3.8 (or newer).
+
+This is consistent with our :ref:`min_deps_policy` and `NEP29
+`__
+
+
+New dependencies
+~~~~~~~~~~~~~~~~
+
+* `importlib-resources `_
+ (>= 3.2.0; only required on Python < 3.10)
+
+Maximum line length increased to 88 characters
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The maximum line length for new contributions has been extended from 79 characters to
+88 characters.
+This change provides an extra 9 characters to allow code which is a single idea to fit
+on fewer lines (often a single line).
+The chosen length is the same as `black `_.
diff --git a/doc/api/prev_api_changes/api_changes_3.7.0/removals.rst b/doc/api/prev_api_changes/api_changes_3.7.0/removals.rst
new file mode 100644
index 000000000000..c8f499666525
--- /dev/null
+++ b/doc/api/prev_api_changes/api_changes_3.7.0/removals.rst
@@ -0,0 +1,369 @@
+Removals
+--------
+
+``epoch2num`` and ``num2epoch`` are removed
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+These methods convert from unix timestamps to matplotlib floats, but are not
+used internally to Matplotlib, and should not be needed by end users. To
+convert a unix timestamp to datetime, simply use
+`datetime.datetime.utcfromtimestamp`, or to use NumPy `~numpy.datetime64`
+``dt = np.datetime64(e*1e6, 'us')``.
+
+Locator and Formatter wrapper methods
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The ``set_view_interval``, ``set_data_interval`` and ``set_bounds`` methods of
+`.Locator`\s and `.Formatter`\s (and their common base class, TickHelper) are
+removed. Directly manipulate the view and data intervals on the underlying
+axis instead.
+
+Interactive cursor details
+~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Setting a mouse cursor on a window has been moved from the toolbar to the
+canvas. Consequently, several implementation details on toolbars and within
+backends have been removed.
+
+``NavigationToolbar2.set_cursor`` and ``backend_tools.SetCursorBase.set_cursor``
+................................................................................
+
+Instead, use the `.FigureCanvasBase.set_cursor` method on the canvas (available
+as the ``canvas`` attribute on the toolbar or the Figure.)
+
+``backend_tools.SetCursorBase`` and subclasses
+..............................................
+
+``backend_tools.SetCursorBase`` was subclassed to provide backend-specific
+implementations of ``set_cursor``. As that is now removed, the subclassing
+is no longer necessary. Consequently, the following subclasses are also
+removed:
+
+- ``matplotlib.backends.backend_gtk3.SetCursorGTK3``
+- ``matplotlib.backends.backend_qt5.SetCursorQt``
+- ``matplotlib.backends._backend_tk.SetCursorTk``
+- ``matplotlib.backends.backend_wx.SetCursorWx``
+
+Instead, use the `.backend_tools.ToolSetCursor` class.
+
+``cursord`` in GTK and wx backends
+..................................
+
+The ``backend_gtk3.cursord`` and ``backend_wx.cursord`` dictionaries are
+removed. This makes the GTK module importable on headless environments.
+
+``auto_add_to_figure=True`` for ``Axes3D``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+... is no longer supported. Instead use ``fig.add_axes(ax)``.
+
+The first parameter of ``Axes.grid`` and ``Axis.grid`` has been renamed to *visible*
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The parameter was previously named *b*. This name change only matters if that
+parameter was passed using a keyword argument, e.g. ``grid(b=False)``.
+
+Removal of deprecations in the Selector widget API
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+RectangleSelector and EllipseSelector
+.....................................
+
+The *drawtype* keyword argument to `~matplotlib.widgets.RectangleSelector` is
+removed. From now on, the only behaviour will be ``drawtype='box'``.
+
+Support for ``drawtype=line`` is removed altogether. As a
+result, the *lineprops* keyword argument to
+`~matplotlib.widgets.RectangleSelector` is also removed.
+
+To retain the behaviour of ``drawtype='none'``, use ``rectprops={'visible':
+False}`` to make the drawn `~matplotlib.patches.Rectangle` invisible.
+
+Cleaned up attributes and arguments are:
+
+- The ``active_handle`` attribute has been privatized and removed.
+- The ``drawtype`` attribute has been privatized and removed.
+- The ``eventpress`` attribute has been privatized and removed.
+- The ``eventrelease`` attribute has been privatized and removed.
+- The ``interactive`` attribute has been privatized and removed.
+- The *marker_props* argument is removed, use *handle_props* instead.
+- The *maxdist* argument is removed, use *grab_range* instead.
+- The *rectprops* argument is removed, use *props* instead.
+- The ``rectprops`` attribute has been privatized and removed.
+- The ``state`` attribute has been privatized and removed.
+- The ``to_draw`` attribute has been privatized and removed.
+
+PolygonSelector
+...............
+
+- The *line* attribute is removed. If you want to change the selector artist
+ properties, use the ``set_props`` or ``set_handle_props`` methods.
+- The *lineprops* argument is removed, use *props* instead.
+- The *markerprops* argument is removed, use *handle_props* instead.
+- The *maxdist* argument and attribute is removed, use *grab_range* instead.
+- The *vertex_select_radius* argument and attribute is removed, use
+ *grab_range* instead.
+
+SpanSelector
+............
+
+- The ``active_handle`` attribute has been privatized and removed.
+- The ``eventpress`` attribute has been privatized and removed.
+- The ``eventrelease`` attribute has been privatized and removed.
+- The ``pressv`` attribute has been privatized and removed.
+- The ``prev`` attribute has been privatized and removed.
+- The ``rect`` attribute has been privatized and removed.
+- The *rectprops* parameter has been renamed to *props*.
+- The ``rectprops`` attribute has been privatized and removed.
+- The *span_stays* parameter has been renamed to *interactive*.
+- The ``span_stays`` attribute has been privatized and removed.
+- The ``state`` attribute has been privatized and removed.
+
+LassoSelector
+.............
+
+- The *lineprops* argument is removed, use *props* instead.
+- The ``onpress`` and ``onrelease`` methods are removed. They are straight
+ aliases for ``press`` and ``release``.
+- The ``matplotlib.widgets.TextBox.DIST_FROM_LEFT`` attribute has been
+ removed. It was marked as private in 3.5.
+
+``backend_template.show``
+~~~~~~~~~~~~~~~~~~~~~~~~~
+... has been removed, in order to better demonstrate the new backend definition
+API.
+
+Unused positional parameters to ``print_`` methods
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+None of the ``print_`` methods implemented by canvas subclasses used
+positional arguments other that the first (the output filename or file-like),
+so these extra parameters are removed.
+
+``QuadMesh`` signature
+~~~~~~~~~~~~~~~~~~~~~~
+
+The `.QuadMesh` signature ::
+
+ def __init__(meshWidth, meshHeight, coordinates,
+ antialiased=True, shading='flat', **kwargs)
+
+is removed and replaced by the new signature ::
+
+ def __init__(coordinates, *, antialiased=True, shading='flat', **kwargs)
+
+In particular:
+
+- The *coordinates* argument must now be a (M, N, 2) array-like. Previously,
+ the grid shape was separately specified as (*meshHeight* + 1, *meshWidth* +
+ 1) and *coordinates* could be an array-like of any shape with M * N * 2
+ elements.
+- All parameters except *coordinates* are keyword-only now.
+
+Expiration of ``FancyBboxPatch`` deprecations
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The `.FancyBboxPatch` constructor no longer accepts the *bbox_transmuter*
+parameter, nor can the *boxstyle* parameter be set to "custom" -- instead,
+directly set *boxstyle* to the relevant boxstyle instance. The
+*mutation_scale* and *mutation_aspect* parameters have also become
+keyword-only.
+
+The *mutation_aspect* parameter is now handled internally and no longer passed
+to the boxstyle callables when mutating the patch path.
+
+Testing support
+~~~~~~~~~~~~~~~
+
+``matplotlib.test()`` has been removed
+......................................
+
+Run tests using ``pytest`` from the commandline instead. The variable
+``matplotlib.default_test_modules`` was only used for ``matplotlib.test()`` and
+is thus removed as well.
+
+To test an installed copy, be sure to specify both ``matplotlib`` and
+``mpl_toolkits`` with ``--pyargs``::
+
+ python -m pytest --pyargs matplotlib.tests mpl_toolkits.tests
+
+See :ref:`testing` for more details.
+
+Auto-removal of grids by `~.Axes.pcolor` and `~.Axes.pcolormesh`
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+`~.Axes.pcolor` and `~.Axes.pcolormesh` previously remove any visible axes
+major grid. This behavior is removed; please explicitly call ``ax.grid(False)``
+to remove the grid.
+
+Modification of ``Axes`` children sublists
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+See :ref:`Behavioural API Changes 3.5 - Axes children combined` for more
+information; modification of the following sublists is no longer supported:
+
+* ``Axes.artists``
+* ``Axes.collections``
+* ``Axes.images``
+* ``Axes.lines``
+* ``Axes.patches``
+* ``Axes.tables``
+* ``Axes.texts``
+
+To remove an Artist, use its `.Artist.remove` method. To add an Artist, use the
+corresponding ``Axes.add_*`` method.
+
+Passing incorrect types to ``Axes.add_*`` methods
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The following ``Axes.add_*`` methods will now raise if passed an unexpected
+type. See their documentation for the types they expect.
+
+- `.Axes.add_collection`
+- `.Axes.add_image`
+- `.Axes.add_line`
+- `.Axes.add_patch`
+- `.Axes.add_table`
+
+
+``ConversionInterface.convert`` no longer accepts unitless values
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Previously, custom subclasses of `.units.ConversionInterface` needed to
+implement a ``convert`` method that not only accepted instances of the unit,
+but also unitless values (which are passed through as is). This is no longer
+the case (``convert`` is never called with a unitless value), and such support
+in ``.StrCategoryConverter`` is removed. Likewise, the
+``.ConversionInterface.is_numlike`` helper is removed.
+
+Consider calling `.Axis.convert_units` instead, which still supports unitless
+values.
+
+
+Normal list of `.Artist` objects now returned by `.HandlerLine2D.create_artists`
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+For Matplotlib 3.5 and 3.6 a proxy list was returned that simulated the return
+of `.HandlerLine2DCompound.create_artists`. Now a list containing only the
+single artist is return.
+
+
+rcParams will no longer cast inputs to str
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+rcParams that expect a (non-pathlike) str no longer cast non-str inputs using
+`str`. This will avoid confusing errors in subsequent code if e.g. a list input
+gets implicitly cast to a str.
+
+Case-insensitive scales
+~~~~~~~~~~~~~~~~~~~~~~~
+
+Previously, scales could be set case-insensitively (e.g.,
+``set_xscale("LoG")``). Now all builtin scales use lowercase names.
+
+Support for ``nx1 = None`` or ``ny1 = None`` in ``AxesLocator`` and ``Divider.locate``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+In `.axes_grid1.axes_divider`, various internal APIs no longer supports
+passing ``nx1 = None`` or ``ny1 = None`` to mean ``nx + 1`` or ``ny + 1``, in
+preparation for a possible future API which allows indexing and slicing of
+dividers (possibly ``divider[a:b] == divider.new_locator(a, b)``, but also
+``divider[a:] == divider.new_locator(a, )``). The user-facing
+`.Divider.new_locator` API is unaffected -- it correctly normalizes ``nx1 =
+None`` and ``ny1 = None`` as needed.
+
+
+change signature of ``.FigureCanvasBase.enter_notify_event``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The *xy* parameter is now required and keyword only. This was deprecated in
+3.0 and originally slated to be removed in 3.5.
+
+``Colorbar`` tick update parameters
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The *update_ticks* parameter of `.Colorbar.set_ticks` and
+`.Colorbar.set_ticklabels` was ignored since 3.5 and has been removed.
+
+plot directive removals
+~~~~~~~~~~~~~~~~~~~~~~~
+
+The public methods:
+
+- ``matplotlib.sphinxext.split_code_at_show``
+- ``matplotlib.sphinxext.unescape_doctest``
+- ``matplotlib.sphinxext.run_code``
+
+have been removed.
+
+The deprecated *encoding* option to the plot directive has been removed.
+
+Miscellaneous removals
+~~~~~~~~~~~~~~~~~~~~~~
+
+- ``is_url`` and ``URL_REGEX`` are removed. (They were previously defined in
+ the toplevel :mod:`matplotlib` module.)
+- The ``ArrowStyle.beginarrow`` and ``ArrowStyle.endarrow`` attributes are
+ removed; use the ``arrow`` attribute to define the desired heads and tails
+ of the arrow.
+- ``backend_pgf.LatexManager.str_cache`` is removed.
+- ``backends.qt_compat.ETS`` and ``backends.qt_compat.QT_RC_MAJOR_VERSION`` are
+ removed, with no replacement.
+- The ``blocking_input`` module is removed. Instead, use
+ ``canvas.start_event_loop()`` and ``canvas.stop_event_loop()`` while
+ connecting event callbacks as needed.
+- ``cbook.report_memory`` is removed; use ``psutil.virtual_memory`` instead.
+- ``cm.LUTSIZE`` is removed. Use :rc:`image.lut` instead. This value only
+ affects colormap quantization levels for default colormaps generated at
+ module import time.
+- ``Colorbar.patch`` is removed; this attribute was not correctly updated
+ anymore.
+- ``ContourLabeler.get_label_width`` is removed.
+- ``Dvi.baseline`` is removed (with no replacement).
+- The *format* parameter of ``dviread.find_tex_file`` is removed (with no
+ replacement).
+- ``FancyArrowPatch.get_path_in_displaycoord`` and
+ ``ConnectionPath.get_path_in_displaycoord`` are removed. The path in
+ display coordinates can still be obtained, as for other patches, using
+ ``patch.get_transform().transform_path(patch.get_path())``.
+- The ``font_manager.win32InstalledFonts`` and
+ ``font_manager.get_fontconfig_fonts`` helper functions are removed.
+- All parameters of ``imshow`` starting from *aspect* are keyword-only.
+- ``QuadMesh.convert_mesh_to_paths`` and ``QuadMesh.convert_mesh_to_triangles``
+ are removed. ``QuadMesh.get_paths()`` can be used as an alternative for the
+ former; there is no replacement for the latter.
+- ``ScalarMappable.callbacksSM`` is removed. Use
+ ``ScalarMappable.callbacks`` instead.
+- ``streamplot.get_integrator`` is removed.
+- ``style.core.STYLE_FILE_PATTERN``, ``style.core.load_base_library``, and
+ ``style.core.iter_user_libraries`` are removed.
+- ``SubplotParams.validate`` is removed. Use `.SubplotParams.update` to
+ change `.SubplotParams` while always keeping it in a valid state.
+- The ``grey_arrayd``, ``font_family``, ``font_families``, and ``font_info``
+ attributes of `.TexManager` are removed.
+- ``Text.get_prop_tup`` is removed with no replacements (because the `.Text`
+ class cannot know whether a backend needs to update cache e.g. when the
+ text's color changes).
+- ``Tick.apply_tickdir`` didn't actually update the tick markers on the
+ existing Line2D objects used to draw the ticks and is removed; use
+ `.Axis.set_tick_params` instead.
+- ``tight_layout.auto_adjust_subplotpars`` is removed.
+- The ``grid_info`` attribute of ``axisartist`` classes has been removed.
+- ``axes_grid1.axes_grid.CbarAxes`` and ``axisartist.axes_grid.CbarAxes`` are
+ removed (they are now dynamically generated based on the owning axes
+ class).
+- The ``axes_grid1.Divider.get_vsize_hsize`` and
+ ``axes_grid1.Grid.get_vsize_hsize`` methods are removed.
+- ``AxesDivider.append_axes(..., add_to_figure=False)`` is removed. Use
+ ``ax.remove()`` to remove the Axes from the figure if needed.
+- ``FixedAxisArtistHelper.change_tick_coord`` is removed with no
+ replacement.
+- ``floating_axes.GridHelperCurveLinear.get_boundary`` is removed with no
+ replacement.
+- ``ParasiteAxesBase.get_images_artists`` is removed.
+- The "units finalize" signal (previously emitted by Axis instances) is
+ removed. Connect to "units" instead.
+- Passing formatting parameters positionally to ``stem()`` is no longer
+ possible.
+- ``axisartist.clip_path`` is removed with no replacement.
+
diff --git a/doc/api/projections/geo.rst b/doc/api/projections/geo.rst
new file mode 100644
index 000000000000..beaa7ec343f3
--- /dev/null
+++ b/doc/api/projections/geo.rst
@@ -0,0 +1,7 @@
+******************************
+``matplotlib.projections.geo``
+******************************
+
+.. automodule:: matplotlib.projections.geo
+ :members:
+ :show-inheritance:
diff --git a/doc/api/projections/polar.rst b/doc/api/projections/polar.rst
new file mode 100644
index 000000000000..3491fd92d16e
--- /dev/null
+++ b/doc/api/projections/polar.rst
@@ -0,0 +1,7 @@
+********************************
+``matplotlib.projections.polar``
+********************************
+
+.. automodule:: matplotlib.projections.polar
+ :members:
+ :show-inheritance:
diff --git a/doc/api/projections_api.rst b/doc/api/projections_api.rst
index ff12a2be8623..f0c742c241e7 100644
--- a/doc/api/projections_api.rst
+++ b/doc/api/projections_api.rst
@@ -6,16 +6,13 @@
:members:
:show-inheritance:
-``matplotlib.projections.polar``
-================================
+Built-in projections
+====================
+Matplotlib has built-in support for polar and some geographic projections.
+See the following pages for more information:
-.. automodule:: matplotlib.projections.polar
- :members:
- :show-inheritance:
-
-``matplotlib.projections.geo``
-==============================
+.. toctree::
+ :maxdepth: 1
-.. automodule:: matplotlib.projections.geo
- :members:
- :show-inheritance:
+ projections/polar
+ projections/geo
diff --git a/doc/api/pyplot_summary.rst b/doc/api/pyplot_summary.rst
index 8d18c8b67e3e..616e9c257aa5 100644
--- a/doc/api/pyplot_summary.rst
+++ b/doc/api/pyplot_summary.rst
@@ -2,32 +2,337 @@
``matplotlib.pyplot``
*********************
-Pyplot function overview
+.. currentmodule:: matplotlib.pyplot
+
+.. automodule:: matplotlib.pyplot
+ :no-members:
+ :no-undoc-members:
+
+
+Managing Figure and Axes
------------------------
-.. currentmodule:: matplotlib
+.. autosummary::
+ :toctree: _as_gen
+ :template: autosummary.rst
+ :nosignatures:
+
+ axes
+ cla
+ clf
+ close
+ delaxes
+ fignum_exists
+ figure
+ gca
+ gcf
+ get_figlabels
+ get_fignums
+ sca
+ subplot
+ subplot2grid
+ subplot_mosaic
+ subplots
+ twinx
+ twiny
+
+
+Adding data to the plot
+-----------------------
+
+Basic
+^^^^^
.. autosummary::
:toctree: _as_gen
- :template: autofunctions.rst
+ :template: autosummary.rst
+ :nosignatures:
- pyplot
+ plot
+ errorbar
+ scatter
+ plot_date
+ step
+ loglog
+ semilogx
+ semilogy
+ fill_between
+ fill_betweenx
+ bar
+ barh
+ bar_label
+ stem
+ eventplot
+ pie
+ stackplot
+ broken_barh
+ vlines
+ hlines
+ fill
+ polar
-.. currentmodule:: matplotlib.pyplot
-.. autofunction:: plotting
+Spans
+^^^^^
+.. autosummary::
+ :toctree: _as_gen
+ :template: autosummary.rst
+ :nosignatures:
-Colors in Matplotlib
---------------------
+ axhline
+ axhspan
+ axvline
+ axvspan
+ axline
-There are many colormaps you can use to map data onto color values.
-Below we list several ways in which color can be utilized in Matplotlib.
-For a more in-depth look at colormaps, see the
-:doc:`/tutorials/colors/colormaps` tutorial.
+Spectral
+^^^^^^^^
-.. currentmodule:: matplotlib.pyplot
+.. autosummary::
+ :toctree: _as_gen
+ :template: autosummary.rst
+ :nosignatures:
+
+ acorr
+ angle_spectrum
+ cohere
+ csd
+ magnitude_spectrum
+ phase_spectrum
+ psd
+ specgram
+ xcorr
+
+
+Statistics
+^^^^^^^^^^
+
+.. autosummary::
+ :toctree: _as_gen
+ :template: autosummary.rst
+ :nosignatures:
+
+ boxplot
+ violinplot
+
+
+Binned
+^^^^^^
+
+.. autosummary::
+ :toctree: _as_gen
+ :template: autosummary.rst
+ :nosignatures:
+
+ hexbin
+ hist
+ hist2d
+ stairs
+
+
+Contours
+^^^^^^^^
+
+.. autosummary::
+ :toctree: _as_gen
+ :template: autosummary.rst
+ :nosignatures:
+
+ clabel
+ contour
+ contourf
+
+
+2D arrays
+^^^^^^^^^
+
+.. autosummary::
+ :toctree: _as_gen
+ :template: autosummary.rst
+ :nosignatures:
+
+ imshow
+ matshow
+ pcolor
+ pcolormesh
+ spy
+ figimage
+
+
+Unstructured triangles
+^^^^^^^^^^^^^^^^^^^^^^
+
+.. autosummary::
+ :toctree: _as_gen
+ :template: autosummary.rst
+ :nosignatures:
+
+ triplot
+ tripcolor
+ tricontour
+ tricontourf
+
+
+Text and annotations
+^^^^^^^^^^^^^^^^^^^^
+
+.. autosummary::
+ :toctree: _as_gen
+ :template: autosummary.rst
+ :nosignatures:
+
+ annotate
+ text
+ figtext
+ table
+ arrow
+ figlegend
+ legend
+
+
+Vector fields
+^^^^^^^^^^^^^
+
+.. autosummary::
+ :toctree: _as_gen
+ :template: autosummary.rst
+ :nosignatures:
+
+ barbs
+ quiver
+ quiverkey
+ streamplot
+
+
+Axis configuration
+------------------
+
+.. autosummary::
+ :toctree: _as_gen
+ :template: autosummary.rst
+ :nosignatures:
+
+ autoscale
+ axis
+ box
+ grid
+ locator_params
+ minorticks_off
+ minorticks_on
+ rgrids
+ thetagrids
+ tick_params
+ ticklabel_format
+ xlabel
+ xlim
+ xscale
+ xticks
+ ylabel
+ ylim
+ yscale
+ yticks
+ suptitle
+ title
+
+
+Layout
+------
+
+.. autosummary::
+ :toctree: _as_gen
+ :template: autosummary.rst
+ :nosignatures:
+
+ margins
+ subplots_adjust
+ subplot_tool
+ tight_layout
+
+
+Colormapping
+------------
+
+.. autosummary::
+ :toctree: _as_gen
+ :template: autosummary.rst
+ :nosignatures:
+
+ clim
+ colorbar
+ gci
+ sci
+ get_cmap
+ set_cmap
+ imread
+ imsave
+
+Colormaps are available via the colormap registry `matplotlib.colormaps`. For
+convenience this registry is available in ``pyplot`` as
.. autodata:: colormaps
:no-value:
+
+Additionally, there are shortcut functions to set builtin colormaps; e.g.
+``plt.viridis()`` is equivalent to ``plt.set_cmap('viridis')``.
+
+
+.. autodata:: color_sequences
+ :no-value:
+
+
+Configuration
+-------------
+
+.. autosummary::
+ :toctree: _as_gen
+ :template: autosummary.rst
+ :nosignatures:
+
+ rc
+ rc_context
+ rcdefaults
+
+
+Output
+------
+
+.. autosummary::
+ :toctree: _as_gen
+ :template: autosummary.rst
+ :nosignatures:
+
+ draw
+ draw_if_interactive
+ ioff
+ ion
+ install_repl_displayhook
+ isinteractive
+ pause
+ savefig
+ show
+ switch_backend
+ uninstall_repl_displayhook
+
+
+Other
+-----
+
+.. autosummary::
+ :toctree: _as_gen
+ :template: autosummary.rst
+ :nosignatures:
+
+ connect
+ disconnect
+ findobj
+ get
+ getp
+ get_current_fig_manager
+ ginput
+ new_figure_manager
+ set_loglevel
+ setp
+ waitforbuttonpress
+ xkcd
diff --git a/doc/api/testing_api.rst b/doc/api/testing_api.rst
index 808d2b870109..7731d4510b27 100644
--- a/doc/api/testing_api.rst
+++ b/doc/api/testing_api.rst
@@ -3,11 +3,6 @@
**********************
-:func:`matplotlib.test`
-=======================
-
-.. autofunction:: matplotlib.test
-
:mod:`matplotlib.testing`
=========================
diff --git a/doc/api/text_api.rst b/doc/api/text_api.rst
index 8bed3173ebdb..af37e5c526a3 100644
--- a/doc/api/text_api.rst
+++ b/doc/api/text_api.rst
@@ -2,6 +2,8 @@
``matplotlib.text``
*******************
+.. redirect-from:: /api/textpath_api
+
.. automodule:: matplotlib.text
:no-members:
@@ -19,3 +21,13 @@
:members:
:undoc-members:
:show-inheritance:
+
+.. autoclass:: matplotlib.text.TextPath
+ :members:
+ :undoc-members:
+ :show-inheritance:
+
+.. autoclass:: matplotlib.text.TextToPath
+ :members:
+ :undoc-members:
+ :show-inheritance:
diff --git a/doc/api/textpath_api.rst b/doc/api/textpath_api.rst
deleted file mode 100644
index 875e4b376867..000000000000
--- a/doc/api/textpath_api.rst
+++ /dev/null
@@ -1,8 +0,0 @@
-***********************
-``matplotlib.textpath``
-***********************
-
-.. automodule:: matplotlib.textpath
- :members:
- :undoc-members:
- :show-inheritance:
diff --git a/doc/api/tight_bbox_api.rst b/doc/api/tight_bbox_api.rst
index 3a96b5b6d027..9e8dd2fa66f9 100644
--- a/doc/api/tight_bbox_api.rst
+++ b/doc/api/tight_bbox_api.rst
@@ -2,7 +2,12 @@
``matplotlib.tight_bbox``
*************************
-.. automodule:: matplotlib.tight_bbox
+.. attention::
+ This module is considered internal.
+
+ Its use is deprecated and it will be removed in a future version.
+
+.. automodule:: matplotlib._tight_bbox
:members:
:undoc-members:
:show-inheritance:
diff --git a/doc/api/tight_layout_api.rst b/doc/api/tight_layout_api.rst
index 1f1a32281aa0..35f92e3ddced 100644
--- a/doc/api/tight_layout_api.rst
+++ b/doc/api/tight_layout_api.rst
@@ -2,7 +2,12 @@
``matplotlib.tight_layout``
***************************
-.. automodule:: matplotlib.tight_layout
+.. attention::
+ This module is considered internal.
+
+ Its use is deprecated and it will be removed in a future version.
+
+.. automodule:: matplotlib._tight_layout
:members:
:undoc-members:
:show-inheritance:
diff --git a/doc/api/toolkits/axes_grid.rst b/doc/api/toolkits/axes_grid.rst
deleted file mode 100644
index c991ee61ed3c..000000000000
--- a/doc/api/toolkits/axes_grid.rst
+++ /dev/null
@@ -1,22 +0,0 @@
-.. _axes_grid-api-index:
-
-``mpl_toolkits.axes_grid``
-==========================
-
-.. currentmodule:: mpl_toolkits
-
-.. note::
- AxesGrid has been a part of matplotlib since v 0.99. Originally, the toolkit
- used the *axes_grid* namespace. In more recent versions, the toolkit
- has been split into *axes_grid1* and *axisartist*. While *axes_grid*
- is maintained for the backward compatibility, use of *axes_grid1* and
- *axisartist* is recommended. For the documentation on ``axes_grid``, see
- the `previous version of the docs`__.
-
- .. __: https://matplotlib.org/2.0.1/mpl_toolkits/axes_grid/index.html
-
-.. toctree::
- :maxdepth: 1
-
- axes_grid1
- axisartist
diff --git a/doc/api/toolkits/axes_grid1.rst b/doc/api/toolkits/axes_grid1.rst
index 7dc95026a14d..c48a6a31af90 100644
--- a/doc/api/toolkits/axes_grid1.rst
+++ b/doc/api/toolkits/axes_grid1.rst
@@ -1,5 +1,7 @@
.. module:: mpl_toolkits.axes_grid1
+.. redirect-from:: /api/toolkits/axes_grid
+
``mpl_toolkits.axes_grid1``
===========================
@@ -15,6 +17,13 @@ See :ref:`axes_grid1_users-guide-index` for a guide on the usage of axes_grid1.
:align: center
:scale: 50
+.. note::
+
+ This module contains classes and function that were formerly part of the
+ ``mpl_toolkits.axes_grid`` module that was removed in 3.6. Additional
+ classes from that older module may also be found in
+ `mpl_toolkits.axisartist`.
+
.. currentmodule:: mpl_toolkits
**The submodules of the axes_grid1 API are:**
diff --git a/doc/api/toolkits/axisartist.rst b/doc/api/toolkits/axisartist.rst
index e045e68e54d2..8cac4d68a266 100644
--- a/doc/api/toolkits/axisartist.rst
+++ b/doc/api/toolkits/axisartist.rst
@@ -17,6 +17,13 @@ You can find a tutorial describing usage of axisartist at the
:align: center
:scale: 50
+.. note::
+
+ This module contains classes and function that were formerly part of the
+ ``mpl_toolkits.axes_grid`` module that was removed in 3.6. Additional
+ classes from that older module may also be found in
+ `mpl_toolkits.axes_grid1`.
+
.. currentmodule:: mpl_toolkits
**The submodules of the axisartist API are:**
@@ -32,7 +39,6 @@ You can find a tutorial describing usage of axisartist at the
axisartist.axis_artist
axisartist.axisline_style
axisartist.axislines
- axisartist.clip_path
axisartist.floating_axes
axisartist.grid_finder
axisartist.grid_helper_curvelinear
diff --git a/doc/api/toolkits/mplot3d.rst b/doc/api/toolkits/mplot3d.rst
index 5b3cb52571bb..fc6c4cbad6d1 100644
--- a/doc/api/toolkits/mplot3d.rst
+++ b/doc/api/toolkits/mplot3d.rst
@@ -20,13 +20,16 @@ more information.
The interactive backends also provide the ability to rotate and zoom the 3D
scene. One can rotate the 3D scene by simply clicking-and-dragging the scene.
-Zooming is done by right-clicking the scene and dragging the mouse up and down
-(unlike 2D plots, the toolbar zoom button is not used).
+Panning is done by clicking the middle mouse button, and zooming is done by
+right-clicking the scene and dragging the mouse up and down. Unlike 2D plots,
+the toolbar pan and zoom buttons are not used.
.. toctree::
:maxdepth: 2
mplot3d/faq.rst
+ mplot3d/view_angles.rst
+ mplot3d/axes3d.rst
.. note::
`.pyplot` cannot be used to add content to 3D plots, because its function
@@ -49,11 +52,8 @@ Zooming is done by right-clicking the scene and dragging the mouse up and down
Please report any functions that do not behave as expected as a bug.
In addition, help and patches would be greatly appreciated!
-.. autosummary::
- :toctree: ../_as_gen
- :template: autosummary.rst
- axes3d.Axes3D
+`axes3d.Axes3D` (fig[, rect, elev, azim, roll, ...]) 3D Axes object.
.. module:: mpl_toolkits.mplot3d.axis3d
diff --git a/doc/api/toolkits/mplot3d/axes3d.rst b/doc/api/toolkits/mplot3d/axes3d.rst
new file mode 100644
index 000000000000..e334fee2fea5
--- /dev/null
+++ b/doc/api/toolkits/mplot3d/axes3d.rst
@@ -0,0 +1,306 @@
+mpl\_toolkits.mplot3d.axes3d.Axes3D
+===================================
+
+
+.. currentmodule:: mpl_toolkits.mplot3d.axes3d
+
+
+.. autoclass:: Axes3D
+ :no-members:
+ :no-undoc-members:
+ :show-inheritance:
+
+
+.. currentmodule:: mpl_toolkits.mplot3d.axes3d.Axes3D
+
+
+Plotting
+--------
+
+.. autosummary::
+ :toctree: ../../_as_gen
+ :template: autosummary.rst
+ :nosignatures:
+
+ plot
+ scatter
+ bar
+ bar3d
+
+ plot_surface
+ plot_wireframe
+ plot_trisurf
+
+ clabel
+ contour
+ tricontour
+ contourf
+ tricontourf
+
+ quiver
+ voxels
+ errorbar
+ stem
+
+
+Text and annotations
+--------------------
+
+.. autosummary::
+ :toctree: ../../_as_gen
+ :template: autosummary.rst
+ :nosignatures:
+
+ text
+ text2D
+
+
+Clearing
+--------
+
+.. autosummary::
+ :toctree: ../../_as_gen
+ :template: autosummary.rst
+ :nosignatures:
+
+ clear
+
+
+Appearance
+----------
+
+.. autosummary::
+ :toctree: ../../_as_gen
+ :template: autosummary.rst
+ :nosignatures:
+
+ set_axis_off
+ set_axis_on
+ grid
+ get_frame_on
+ set_frame_on
+
+
+Axis
+----
+
+Axis limits and direction
+^^^^^^^^^^^^^^^^^^^^^^^^^
+
+.. autosummary::
+ :toctree: ../../_as_gen
+ :template: autosummary.rst
+ :nosignatures:
+
+ get_zaxis
+ get_xlim
+ get_ylim
+ get_zlim
+ set_zlim
+ get_w_lims
+ invert_zaxis
+ zaxis_inverted
+ get_zbound
+ set_zbound
+
+
+Axis labels and title
+^^^^^^^^^^^^^^^^^^^^^
+
+.. autosummary::
+ :toctree: ../../_as_gen
+ :template: autosummary.rst
+ :nosignatures:
+
+ set_zlabel
+ get_zlabel
+ set_title
+
+
+Axis scales
+^^^^^^^^^^^
+
+.. autosummary::
+ :toctree: ../../_as_gen
+ :template: autosummary.rst
+ :nosignatures:
+
+ set_xscale
+ set_yscale
+ set_zscale
+ get_zscale
+
+
+Autoscaling and margins
+^^^^^^^^^^^^^^^^^^^^^^^
+
+.. autosummary::
+ :toctree: ../../_as_gen
+ :template: autosummary.rst
+ :nosignatures:
+
+ set_zmargin
+ margins
+ autoscale
+ autoscale_view
+ set_autoscalez_on
+ get_autoscalez_on
+ auto_scale_xyz
+
+
+Aspect ratio
+^^^^^^^^^^^^
+
+.. autosummary::
+ :toctree: ../../_as_gen
+ :template: autosummary.rst
+ :nosignatures:
+
+ set_aspect
+ set_box_aspect
+ apply_aspect
+
+
+Ticks
+^^^^^
+
+.. autosummary::
+ :toctree: ../../_as_gen
+ :template: autosummary.rst
+ :nosignatures:
+
+ tick_params
+ set_zticks
+ get_zticks
+ set_zticklabels
+ get_zticklines
+ get_zgridlines
+ get_zminorticklabels
+ get_zmajorticklabels
+ zaxis_date
+
+
+Units
+-----
+
+.. autosummary::
+ :toctree: ../../_as_gen
+ :template: autosummary.rst
+ :nosignatures:
+
+ convert_zunits
+
+
+Adding artists
+--------------
+
+.. autosummary::
+ :toctree: ../../_as_gen
+ :template: autosummary.rst
+ :nosignatures:
+
+ add_collection3d
+
+
+Sharing
+-------
+
+.. autosummary::
+ :toctree: ../../_as_gen
+ :template: autosummary.rst
+ :nosignatures:
+
+ sharez
+
+
+Interactive
+-----------
+
+.. autosummary::
+ :toctree: ../../_as_gen
+ :template: autosummary.rst
+ :nosignatures:
+
+ can_zoom
+ can_pan
+ disable_mouse_rotation
+ mouse_init
+ drag_pan
+ format_zdata
+ format_coord
+
+
+Projection and perspective
+--------------------------
+
+.. autosummary::
+ :toctree: ../../_as_gen
+ :template: autosummary.rst
+ :nosignatures:
+
+ view_init
+ set_proj_type
+ get_proj
+ set_top_view
+
+
+Drawing
+-------
+
+.. autosummary::
+ :toctree: ../../_as_gen
+ :template: autosummary.rst
+ :nosignatures:
+
+ draw
+ get_tightbbox
+
+
+Aliases and deprecated methods
+------------------------------
+
+.. autosummary::
+ :toctree: ../../_as_gen
+ :template: autosummary.rst
+ :nosignatures:
+
+ set_zlim3d
+ stem3D
+ text3D
+ tunit_cube
+ tunit_edges
+ unit_cube
+ w_xaxis
+ w_yaxis
+ w_zaxis
+
+
+Other
+-----
+
+.. autosummary::
+ :toctree: ../../_as_gen
+ :template: autosummary.rst
+ :nosignatures:
+
+ get_axis_position
+ add_contour_set
+ add_contourf_set
+ update_datalim
+
+
+.. currentmodule:: mpl_toolkits.mplot3d
+
+Sample 3D data
+--------------
+
+.. autosummary::
+ :toctree: ../../_as_gen
+ :template: autosummary.rst
+ :nosignatures:
+
+ axes3d.get_test_data
+
+
+.. minigallery:: mpl_toolkits.mplot3d.axes3d.Axes3D
+ :add-heading:
diff --git a/doc/api/toolkits/mplot3d/faq.rst b/doc/api/toolkits/mplot3d/faq.rst
index dfc23b55e069..7e53cabc6e9a 100644
--- a/doc/api/toolkits/mplot3d/faq.rst
+++ b/doc/api/toolkits/mplot3d/faq.rst
@@ -49,4 +49,3 @@ Work is being done to eliminate this issue. For matplotlib v1.1.0, there is
a semi-official manner to modify these parameters. See the note in the
:mod:`.mplot3d.axis3d` section of the mplot3d API documentation for
more information.
-
diff --git a/doc/api/toolkits/mplot3d/view_angles.rst b/doc/api/toolkits/mplot3d/view_angles.rst
new file mode 100644
index 000000000000..10d4fac39e8c
--- /dev/null
+++ b/doc/api/toolkits/mplot3d/view_angles.rst
@@ -0,0 +1,40 @@
+.. _toolkit_mplot3d-view-angles:
+
+*******************
+mplot3d View Angles
+*******************
+
+How to define the view angle
+============================
+
+The position of the viewport "camera" in a 3D plot is defined by three angles:
+*elevation*, *azimuth*, and *roll*. From the resulting position, it always
+points towards the center of the plot box volume. The angle direction is a
+common convention, and is shared with
+`PyVista `_ and
+`MATLAB `_
+(though MATLAB lacks a roll angle). Note that a positive roll angle rotates the
+viewing plane clockwise, so the 3d axes will appear to rotate
+counter-clockwise.
+
+.. image:: /_static/mplot3d_view_angles.png
+ :align: center
+ :scale: 50
+
+Rotating the plot using the mouse will control only the azimuth and elevation,
+but all three angles can be set programmatically::
+
+ import matplotlib.pyplot as plt
+ ax = plt.figure().add_subplot(projection='3d')
+ ax.view_init(elev=30, azim=45, roll=15)
+
+
+Primary view planes
+===================
+
+To look directly at the primary view planes, the required elevation, azimuth,
+and roll angles are shown in the diagram of an "unfolded" plot below. These are
+further documented in the `.mplot3d.axes3d.Axes3D.view_init` API.
+
+.. plot:: gallery/mplot3d/view_planes_3d.py
+ :align: center
diff --git a/doc/api/transformations.rst b/doc/api/transformations.rst
index 25d959801c28..186db9aea728 100644
--- a/doc/api/transformations.rst
+++ b/doc/api/transformations.rst
@@ -15,4 +15,3 @@
interval_contains, interval_contains_open
:show-inheritance:
:special-members:
-
diff --git a/doc/api/tri_api.rst b/doc/api/tri_api.rst
index 9205e34ff93b..0b4e046eec08 100644
--- a/doc/api/tri_api.rst
+++ b/doc/api/tri_api.rst
@@ -2,7 +2,9 @@
``matplotlib.tri``
******************
-.. automodule:: matplotlib.tri
+Unstructured triangular grid functions.
+
+.. py:module:: matplotlib.tri
.. autoclass:: matplotlib.tri.Triangulation
:members:
@@ -17,7 +19,7 @@
:show-inheritance:
.. autoclass:: matplotlib.tri.TriInterpolator
-
+
.. autoclass:: matplotlib.tri.LinearTriInterpolator
:members: __call__, gradient
:show-inheritance:
@@ -30,7 +32,7 @@
.. autoclass:: matplotlib.tri.UniformTriRefiner
:show-inheritance:
- :members:
+ :members:
.. autoclass:: matplotlib.tri.TriAnalyzer
- :members:
+ :members:
diff --git a/doc/api/type1font.rst b/doc/api/type1font.rst
index 2cb2a68eb5d5..00ef38f4d447 100644
--- a/doc/api/type1font.rst
+++ b/doc/api/type1font.rst
@@ -2,7 +2,12 @@
``matplotlib.type1font``
************************
-.. automodule:: matplotlib.type1font
+.. attention::
+ This module is considered internal.
+
+ Its use is deprecated and it will be removed in a future version.
+
+.. automodule:: matplotlib._type1font
:members:
:undoc-members:
:show-inheritance:
diff --git a/doc/conf.py b/doc/conf.py
index dfa0bfb495d5..b77dfa3ba85f 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -5,25 +5,29 @@
# dir.
#
# The contents of this file are pickled, so don't put values in the namespace
-# that aren't pickleable (module imports are okay, they're removed
+# that aren't picklable (module imports are okay, they're removed
# automatically).
#
# All configuration values have a default value; values that are commented out
# serve to show the default value.
+import logging
import os
from pathlib import Path
import shutil
import subprocess
import sys
+from urllib.parse import urlsplit, urlunsplit
import warnings
import matplotlib
-import sphinx
from datetime import datetime
import time
+# debug that building expected version
+print(f"Building Documentation for Matplotlib: {matplotlib.__version__}")
+
# Release mode enables optimizations and other related options.
is_release_build = tags.has('release') # noqa
@@ -49,16 +53,11 @@
# usage in the gallery.
warnings.filterwarnings('error', append=True)
-# Strip backslashes in function's signature
-# To be removed when numpydoc > 0.9.x
-strip_signature_backslash = True
-
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.autosummary',
- 'sphinx.ext.doctest',
'sphinx.ext.inheritance_diagram',
'sphinx.ext.intersphinx',
'sphinx.ext.ifconfig',
@@ -77,26 +76,21 @@
'sphinxext.skip_deprecated',
'sphinxext.redirect_from',
'sphinx_copybutton',
- 'sphinx_panels',
+ 'sphinx_design',
]
exclude_patterns = [
'api/prev_api_changes/api_changes_*/*',
]
-panels_add_bootstrap_css = False
-
def _check_dependencies():
names = {
+ **{ext: ext.split(".")[0] for ext in extensions},
+ # Explicitly list deps that are not extensions, or whose PyPI package
+ # name does not match the (toplevel) module name.
"colorspacious": 'colorspacious',
- "IPython.sphinxext.ipython_console_highlighting": 'ipython',
- "matplotlib": 'matplotlib',
- "numpydoc": 'numpydoc',
- "PIL.Image": 'pillow',
- "pydata_sphinx_theme": 'pydata_sphinx_theme',
- "sphinx_copybutton": 'sphinx_copybutton',
- "sphinx_gallery": 'sphinx_gallery',
+ "mpl_sphinx_theme": 'mpl_sphinx_theme',
"sphinxcontrib.inkscapeconverter": 'sphinxcontrib-svg2pdfconverter',
}
missing = []
@@ -144,9 +138,7 @@ def _check_dependencies():
warnings.filterwarnings('ignore', category=DeprecationWarning,
module='sphinx.util.inspect')
-# missing-references names matches sphinx>=3 behavior, so we can't be nitpicky
-# for older sphinxes.
-nitpicky = sphinx.version_info >= (3,)
+nitpicky = True
# change this to True to update the allowed failures
missing_references_write_json = False
missing_references_warn_unused_ignores = False
@@ -162,6 +154,7 @@ def _check_dependencies():
'python': ('https://docs.python.org/3/', None),
'scipy': ('https://docs.scipy.org/doc/scipy/', None),
'tornado': ('https://www.tornadoweb.org/en/stable/', None),
+ 'xarray': ('https://docs.xarray.dev/en/stable/', None),
}
@@ -183,39 +176,78 @@ def matplotlib_reduced_latex_scraper(block, block_vars, gallery_conf,
sphinx_gallery_conf = {
+ 'backreferences_dir': Path('api') / Path('_as_gen'),
+ # Compression is a significant effort that we skip for local and CI builds.
+ 'compress_images': ('thumbnails', 'images') if is_release_build else (),
+ 'doc_module': ('matplotlib', 'mpl_toolkits'),
'examples_dirs': ['../examples', '../tutorials', '../plot_types'],
'filename_pattern': '^((?!sgskip).)*$',
'gallery_dirs': ['gallery', 'tutorials', 'plot_types'],
- 'doc_module': ('matplotlib', 'mpl_toolkits'),
- 'reference_url': {
- 'matplotlib': None,
- },
- 'backreferences_dir': Path('api') / Path('_as_gen'),
- 'subsection_order': gallery_order.sectionorder,
- 'within_subsection_order': gallery_order.subsectionorder,
- 'remove_config_comments': True,
- 'min_reported_time': 1,
- 'thumbnail_size': (320, 224),
'image_scrapers': (matplotlib_reduced_latex_scraper, ),
- # Compression is a significant effort that we skip for local and CI builds.
- 'compress_images': ('thumbnails', 'images') if is_release_build else (),
- 'matplotlib_animations': True,
'image_srcset': ["2x"],
'junit': '../test-results/sphinx-gallery/junit.xml' if CIRCLECI else '',
+ 'matplotlib_animations': True,
+ 'min_reported_time': 1,
+ 'plot_gallery': 'True', # sphinx-gallery/913
+ 'reference_url': {'matplotlib': None},
+ 'remove_config_comments': True,
+ 'reset_modules': (
+ 'matplotlib',
+ # clear basic_units module to re-register with unit registry on import
+ lambda gallery_conf, fname: sys.modules.pop('basic_units', None)
+ ),
+ 'subsection_order': gallery_order.sectionorder,
+ 'thumbnail_size': (320, 224),
+ 'within_subsection_order': gallery_order.subsectionorder,
+ 'capture_repr': (),
}
+if 'plot_gallery=0' in sys.argv:
+ # Gallery images are not created. Suppress warnings triggered where other
+ # parts of the documentation link to these images.
+
+ def gallery_image_warning_filter(record):
+ msg = record.msg
+ for gallery_dir in sphinx_gallery_conf['gallery_dirs']:
+ if msg.startswith(f'image file not readable: {gallery_dir}'):
+ return False
+
+ if msg == 'Could not obtain image size. :scale: option is ignored.':
+ return False
+
+ return True
+
+ logger = logging.getLogger('sphinx')
+ logger.addFilter(gallery_image_warning_filter)
+
+
mathmpl_fontsize = 11.0
mathmpl_srcset = ['2x']
-# Monkey-patching gallery signature to include search keywords
-gen_rst.SPHX_GLR_SIG = """\n
+# Monkey-patching gallery header to include search keywords
+gen_rst.EXAMPLE_HEADER = """
+.. DO NOT EDIT.
+.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY.
+.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE:
+.. "{0}"
+.. LINE NUMBERS ARE GIVEN BELOW.
+
.. only:: html
- .. rst-class:: sphx-glr-signature
+ .. meta::
+ :keywords: codex
+
+ .. note::
+ :class: sphx-glr-download-link-note
+
+ Click :ref:`here `
+ to download the full example code{2}
- Keywords: matplotlib code example, codex, python plot, pyplot
- `Gallery generated by Sphinx-Gallery
- `_\n"""
+.. rst-class:: sphx-glr-example-title
+
+.. _sphx_glr_{1}:
+
+"""
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
@@ -238,15 +270,16 @@ def matplotlib_reduced_latex_scraper(block, block_vars, gallery_conf,
except (subprocess.CalledProcessError, FileNotFoundError):
SHA = matplotlib.__version__
+
html_context = {
- "sha": SHA,
+ "doc_version": SHA,
}
project = 'Matplotlib'
copyright = (
- '2002 - 2012 John Hunter, Darren Dale, Eric Firing, Michael Droettboom '
+ '2002–2012 John Hunter, Darren Dale, Eric Firing, Michael Droettboom '
'and the Matplotlib development team; '
- f'2012 - {sourceyear} The Matplotlib development team'
+ f'2012–{sourceyear} The Matplotlib development team'
)
@@ -287,22 +320,65 @@ def matplotlib_reduced_latex_scraper(block, block_vars, gallery_conf,
# Plot directive configuration
# ----------------------------
-plot_formats = [('png', 100), ('pdf', 100)]
+# For speedup, decide which plot_formats to build based on build targets:
+# html only -> png
+# latex only -> pdf
+# all other cases, including html + latex -> png, pdf
+# For simplicity, we assume that the build targets appear in the command line.
+# We're falling back on using all formats in case that assumption fails.
+formats = {'html': ('png', 100), 'latex': ('pdf', 100)}
+plot_formats = [formats[target] for target in ['html', 'latex']
+ if target in sys.argv] or list(formats.values())
+
# GitHub extension
github_project_url = "https://github.com/matplotlib/matplotlib/"
+
# Options for HTML output
# -----------------------
+def add_html_cache_busting(app, pagename, templatename, context, doctree):
+ """
+ Add cache busting query on CSS and JavaScript assets.
+
+ This adds the Matplotlib version as a query to the link reference in the
+ HTML, if the path is not absolute (i.e., it comes from the `_static`
+ directory) and doesn't already have a query.
+ """
+ from sphinx.builders.html import Stylesheet, JavaScript
+
+ css_tag = context['css_tag']
+ js_tag = context['js_tag']
+
+ def css_tag_with_cache_busting(css):
+ if isinstance(css, Stylesheet) and css.filename is not None:
+ url = urlsplit(css.filename)
+ if not url.netloc and not url.query:
+ url = url._replace(query=SHA)
+ css = Stylesheet(urlunsplit(url), priority=css.priority,
+ **css.attributes)
+ return css_tag(css)
+
+ def js_tag_with_cache_busting(js):
+ if isinstance(js, JavaScript) and js.filename is not None:
+ url = urlsplit(js.filename)
+ if not url.netloc and not url.query:
+ url = url._replace(query=SHA)
+ js = JavaScript(urlunsplit(url), priority=js.priority,
+ **js.attributes)
+ return js_tag(js)
+
+ context['css_tag'] = css_tag_with_cache_busting
+ context['js_tag'] = js_tag_with_cache_busting
+
+
# The style sheet to use for HTML and HTML Help pages. A file of that name
# must exist either in Sphinx' static/ path, or in one of the custom paths
# given in html_static_path.
-# html_style = 'matplotlib.css'
-# html_style = f"mpl.css?{SHA}"
html_css_files = [
- f"mpl.css?{SHA}",
+ "mpl.css",
]
html_theme = "mpl_sphinx_theme"
@@ -315,16 +391,29 @@ def matplotlib_reduced_latex_scraper(block, block_vars, gallery_conf,
# the sidebar.
html_logo = "_static/logo2.svg"
html_theme_options = {
- "native_site": True,
- "logo_link": "index",
+ "navbar_links": "internal",
# collapse_navigation in pydata-sphinx-theme is slow, so skipped for local
# and CI builds https://github.com/pydata/pydata-sphinx-theme/pull/386
"collapse_navigation": not is_release_build,
"show_prev_next": False,
+ "switcher": {
+ "json_url": "https://matplotlib.org/devdocs/_static/switcher.json",
+ "version_match": (
+ # The start version to show. This must be in switcher.json.
+ # We either go to 'stable' or to 'devdocs'
+ 'stable' if matplotlib.__version_info__.releaselevel == 'final'
+ else 'devdocs')
+ },
+ "logo": {"link": "index",
+ "image_light": "images/logo2.svg",
+ "image_dark": "images/logo_dark.svg"},
+ "navbar_end": ["theme-switcher", "version-switcher", "mpl_icon_links"],
+ "secondary_sidebar_items": "page-toc.html",
+ "footer_items": ["copyright", "sphinx-version", "doc_version"],
}
include_analytics = is_release_build
if include_analytics:
- html_theme_options["google_analytics_id"] = "UA-55954603-1"
+ html_theme_options["analytics"] = {"google_analytics_id": "UA-55954603-1"}
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
@@ -351,7 +440,6 @@ def matplotlib_reduced_latex_scraper(block, block_vars, gallery_conf,
# Custom sidebar templates, maps page names to templates.
html_sidebars = {
"index": [
- 'search-field.html',
# 'sidebar_announcement.html',
"sidebar_versions.html",
"cheatsheet_sidebar.html",
@@ -360,6 +448,10 @@ def matplotlib_reduced_latex_scraper(block, block_vars, gallery_conf,
# '**': ['localtoc.html', 'pagesource.html']
}
+# Copies only relevant code, not the '>>>' prompt
+copybutton_prompt_text = r'>>> |\.\.\. '
+copybutton_prompt_is_regexp = True
+
# If true, add an index to the HTML documents.
html_use_index = False
@@ -372,7 +464,7 @@ def matplotlib_reduced_latex_scraper(block, block_vars, gallery_conf,
# If true, an OpenSearch description file will be output, and all pages will
# contain a tag referring to it.
-html_use_opensearch = 'False'
+html_use_opensearch = 'https://matplotlib.org/stable'
# Output file base name for HTML help builder.
htmlhelp_basename = 'Matplotlibdoc'
@@ -425,7 +517,7 @@ def matplotlib_reduced_latex_scraper(block, block_vars, gallery_conf,
# Sphinx 2.0 adopts GNU FreeFont by default, but it does not have all
# the Unicode codepoints needed for the section about Mathtext
# "Writing mathematical expressions"
-fontpkg = r"""
+latex_elements['fontpkg'] = r"""
\IfFontExistsTF{XITS}{
\setmainfont{XITS}
}{
@@ -465,12 +557,7 @@ def matplotlib_reduced_latex_scraper(block, block_vars, gallery_conf,
Extension = .otf,
]}
"""
-latex_elements['fontpkg'] = fontpkg
-# Sphinx <1.8.0 or >=2.0.0 does this by default, but the 1.8.x series
-# did not for latex_engine = 'xelatex' (as it used Latin Modern font).
-# We need this for code-blocks as FreeMono has wide glyphs.
-latex_elements['fvset'] = r'\fvset{fontsize=\small}'
# Fix fancyhdr complaining about \headheight being too small
latex_elements['passoptionstopackages'] = r"""
\PassOptionsToPackage{headheight=14pt}{geometry}
@@ -538,40 +625,18 @@ def matplotlib_reduced_latex_scraper(block, block_vars, gallery_conf,
numpydoc_show_class_members = False
-html4_writer = True
-
-inheritance_node_attrs = dict(fontsize=16)
+# We want to prevent any size limit, as we'll add scroll bars with CSS.
+inheritance_graph_attrs = dict(dpi=100, size='1000.0', splines='polyline')
+# Also remove minimum node dimensions, and increase line size a bit.
+inheritance_node_attrs = dict(height=0.02, margin=0.055, penwidth=1,
+ width=0.01)
+inheritance_edge_attrs = dict(penwidth=1)
graphviz_dot = shutil.which('dot')
# Still use PNG until SVG linking is fixed
# https://github.com/sphinx-doc/sphinx/issues/3176
# graphviz_output_format = 'svg'
-
-def reduce_plot_formats(app):
- # Fox CI and local builds, we don't need all the default plot formats, so
- # only generate the directly useful one for the current builder.
- if app.builder.name == 'html':
- keep = 'png'
- elif app.builder.name == 'latex':
- keep = 'pdf'
- else:
- return
- app.config.plot_formats = [entry
- for entry in app.config.plot_formats
- if entry[0] == keep]
-
-
-def setup(app):
- if any(st in version for st in ('post', 'alpha', 'beta')):
- bld_type = 'dev'
- else:
- bld_type = 'rel'
- app.add_config_value('releaselevel', bld_type, 'env')
-
- if not is_release_build:
- app.connect('builder-inited', reduce_plot_formats)
-
# -----------------------------------------------------------------------------
# Source code links
# -----------------------------------------------------------------------------
@@ -628,14 +693,29 @@ def linkcode_resolve(domain, info):
if lineno else "")
startdir = Path(matplotlib.__file__).parent.parent
- fn = os.path.relpath(fn, start=startdir).replace(os.path.sep, '/')
+ try:
+ fn = os.path.relpath(fn, start=startdir).replace(os.path.sep, '/')
+ except ValueError:
+ return None
if not fn.startswith(('matplotlib/', 'mpl_toolkits/')):
return None
version = parse(matplotlib.__version__)
- tag = 'master' if version.is_devrelease else f'v{version.public}'
+ tag = 'main' if version.is_devrelease else f'v{version.public}'
return ("https://github.com/matplotlib/matplotlib/blob"
f"/{tag}/lib/{fn}{linespec}")
else:
extensions.append('sphinx.ext.viewcode')
+
+
+# -----------------------------------------------------------------------------
+# Sphinx setup
+# -----------------------------------------------------------------------------
+def setup(app):
+ if any(st in version for st in ('post', 'dev', 'alpha', 'beta')):
+ bld_type = 'dev'
+ else:
+ bld_type = 'rel'
+ app.add_config_value('releaselevel', bld_type, 'env')
+ app.connect('html-page-context', add_html_cache_busting, priority=1000)
diff --git a/doc/devel/MEP/MEP08.rst b/doc/devel/MEP/MEP08.rst
index 67ce5d3d76ef..18419ac2bf11 100644
--- a/doc/devel/MEP/MEP08.rst
+++ b/doc/devel/MEP/MEP08.rst
@@ -9,7 +9,10 @@
Status
======
-**Completed**
+**Superseded**
+
+Current guidelines for style, including usage of pep8 are maintained
+in `our pull request guidelines `_.
We are currently enforcing a sub-set of pep8 on new code contributions.
diff --git a/doc/devel/MEP/MEP14.rst b/doc/devel/MEP/MEP14.rst
index 2c680017b515..574c733e10bf 100644
--- a/doc/devel/MEP/MEP14.rst
+++ b/doc/devel/MEP/MEP14.rst
@@ -78,8 +78,8 @@ number of other projects:
- `Microsoft DirectWrite`_
- `Apple Core Text`_
-.. _pango: https://www.pango.org/
-.. _harfbuzz: https://www.freedesktop.org/wiki/Software/HarfBuzz/
+.. _pango: https://pango.gnome.org
+.. _harfbuzz: https://github.com/harfbuzz/harfbuzz
.. _QtTextLayout: https://doc.qt.io/archives/qt-4.8/qtextlayout.html
.. _Microsoft DirectWrite: https://docs.microsoft.com/en-ca/windows/win32/directwrite/introducing-directwrite
.. _Apple Core Text: https://developer.apple.com/library/archive/documentation/StringsTextFonts/Conceptual/CoreText_Programming/Overview/Overview.html
diff --git a/doc/devel/MEP/MEP19.rst b/doc/devel/MEP/MEP19.rst
index 05e34132249f..fd93ba619aed 100644
--- a/doc/devel/MEP/MEP19.rst
+++ b/doc/devel/MEP/MEP19.rst
@@ -67,7 +67,7 @@ great!]:
**Documentation**
-Documentation of master is now built by travis and uploaded to https://matplotlib.org/devdocs/index.html
+Documentation of main is now built by travis and uploaded to https://matplotlib.org/devdocs/index.html
@NelleV, I believe, generates the docs automatically and posts them on
the web to chart MEP10 progress.
diff --git a/doc/devel/MEP/MEP26.rst b/doc/devel/MEP/MEP26.rst
index 929393a683d2..9d3af8f8c703 100644
--- a/doc/devel/MEP/MEP26.rst
+++ b/doc/devel/MEP/MEP26.rst
@@ -34,7 +34,7 @@ Detailed description
====================
Currently, the look and appearance of existing artist objects (figure,
-axes, Line2D etc...) can only be updated via ``set_`` and ``get_`` methods
+axes, Line2D, etc.) can only be updated via ``set_`` and ``get_`` methods
on the artist object, which is quite laborious, especially if no
reference to the artist(s) has been stored. The new style sheets
introduced in 1.4 allow styling before a plot is created, but do not
@@ -51,7 +51,7 @@ of primitives.
The new methodology would require development of a number of steps:
- A new stylesheet syntax (likely based on CSS) to allow selection of
- artists by type, class, id etc...
+ artists by type, class, id, etc.
- A mechanism by which to parse a stylesheet into a tree
- A mechanism by which to translate the parse-tree into something
which can be used to update the properties of relevant
diff --git a/doc/devel/MEP/MEP27.rst b/doc/devel/MEP/MEP27.rst
index d4ea57f1b6a6..81eca8f9c53d 100644
--- a/doc/devel/MEP/MEP27.rst
+++ b/doc/devel/MEP/MEP27.rst
@@ -13,9 +13,11 @@ Status
Branches and Pull requests
==========================
Main PR (including GTK3):
+
+ https://github.com/matplotlib/matplotlib/pull/4143
Backend specific branch diffs:
+
+ https://github.com/OceanWolf/matplotlib/compare/backend-refactor...OceanWolf:backend-refactor-tkagg
+ https://github.com/OceanWolf/matplotlib/compare/backend-refactor...OceanWolf:backend-refactor-qt
+ https://github.com/OceanWolf/matplotlib/compare/backend-refactor...backend-refactor-wx
@@ -49,15 +51,14 @@ Two main places for generic code appear in the classes derived from
1. ``FigureManagerBase`` has **three** jobs at the moment:
- 1. The documentation describes it as a *``Helper class for pyplot
- mode, wraps everything up into a neat bundle''*
+ 1. The documentation describes it as a *Helper class for pyplot
+ mode, wraps everything up into a neat bundle*
2. But it doesn't just wrap the canvas and toolbar, it also does
all of the windowing tasks itself. The conflation of these two
- tasks gets seen the best in the following line: ```python
- self.set_window_title("Figure %d" % num) ``` This combines
+ tasks gets seen the best in the following line:
+ ``self.set_window_title("Figure %d" % num)`` This combines
backend specific code ``self.set_window_title(title)`` with
matplotlib generic code ``title = "Figure %d" % num``.
-
3. Currently the backend specific subclass of ``FigureManager``
decides when to end the mainloop. This also seems very wrong
as the figure should have no control over the other figures.
@@ -95,7 +96,7 @@ The description of this MEP gives us most of the solution:
1. This allows us to break up the conversion of backends into
separate PRs as we can keep the existing ``FigureManagerBase``
class and its dependencies intact.
- 2. and this also anticipates MEP22 where the new
+ 2. And this also anticipates MEP22 where the new
``NavigationBase`` has morphed into a backend independent
``ToolManager``.
diff --git a/doc/devel/MEP/MEP28.rst b/doc/devel/MEP/MEP28.rst
index 631be1e2b548..07b83c17800e 100644
--- a/doc/devel/MEP/MEP28.rst
+++ b/doc/devel/MEP/MEP28.rst
@@ -46,7 +46,7 @@ Detailed description
Currently, the ``Axes.boxplot`` method accepts parameters that allow the
users to specify medians and confidence intervals for each box that
-will be drawn in the plot. These were provided so that avdanced users
+will be drawn in the plot. These were provided so that advanced users
could provide statistics computed in a different fashion that the simple
method provided by matplotlib. However, handling this input requires
complex logic to make sure that the forms of the data structure match what
diff --git a/doc/devel/MEP/MEP29.rst b/doc/devel/MEP/MEP29.rst
index 0a42e7d1eff7..d937889d55de 100644
--- a/doc/devel/MEP/MEP29.rst
+++ b/doc/devel/MEP/MEP29.rst
@@ -34,7 +34,7 @@ one has to look at the gallery where one such example is provided:
This example takes a list of strings as well as a list of colors which makes it
cumbersome to use. An alternative would be to use a restricted set of pango_-like markup and to interpret this markup.
-.. _pango: https://developer.gnome.org/pygtk/stable/pango-markup-language.html
+.. _pango: https://docs.gtk.org/Pango/pango_markup.html#pango-markup
Some markup examples::
diff --git a/doc/devel/MEP/template.rst b/doc/devel/MEP/template.rst
index 81191fc44eeb..00bdbc87a95e 100644
--- a/doc/devel/MEP/template.rst
+++ b/doc/devel/MEP/template.rst
@@ -24,7 +24,7 @@ MEPs go through a number of phases in their lifetime:
- **Progress**: Consensus was reached and implementation work has begun.
-- **Completed**: The implementation has been merged into master.
+- **Completed**: The implementation has been merged into main.
- **Superseded**: This MEP has been abandoned in favor of another
approach.
diff --git a/doc/devel/coding_guide.rst b/doc/devel/coding_guide.rst
index ccc6d8a5d0ef..d584a1c986e7 100644
--- a/doc/devel/coding_guide.rst
+++ b/doc/devel/coding_guide.rst
@@ -13,8 +13,93 @@
Pull request guidelines
***********************
-Pull requests (PRs) are the mechanism for contributing to Matplotlibs code and
-documentation.
+`Pull requests (PRs) on GitHub
+`__
+are the mechanism for contributing to Matplotlib's code and documentation.
+
+It is recommended to check that your contribution complies with the following
+rules before submitting a pull request:
+
+* If your pull request addresses an issue, please use the title to describe the
+ issue (e.g. "Add ability to plot timedeltas") and mention the issue number
+ in the pull request description to ensure that a link is created to the
+ original issue (e.g. "Closes #8869" or "Fixes #8869"). This will ensure the
+ original issue mentioned is automatically closed when your PR is merged. See
+ `the GitHub documentation
+ `__
+ for more details.
+
+* Formatting should follow the recommendations of PEP8_, as enforced by
+ flake8_. Matplotlib modifies PEP8 to extend the maximum line length to 88
+ characters. You can check flake8 compliance from the command line with ::
+
+ python -m pip install flake8
+ flake8 /path/to/module.py
+
+ or your editor may provide integration with it. Note that Matplotlib
+ intentionally does not use the black_ auto-formatter (1__), in particular due
+ to its unability to understand the semantics of mathematical expressions
+ (2__, 3__).
+
+ .. _PEP8: https://www.python.org/dev/peps/pep-0008/
+ .. _flake8: https://flake8.pycqa.org/
+ .. _black: https://black.readthedocs.io/
+ .. __: https://github.com/matplotlib/matplotlib/issues/18796
+ .. __: https://github.com/psf/black/issues/148
+ .. __: https://github.com/psf/black/issues/1984
+
+* All public methods should have informative docstrings with sample usage when
+ appropriate. Use the :ref:`docstring standards `.
+
+* For high-level plotting functions, consider adding a simple example either in
+ the ``Example`` section of the docstring or the
+ :ref:`examples gallery `.
+
+* Changes (both new features and bugfixes) should have good test coverage. See
+ :ref:`testing` for more details.
+
+* Import the following modules using the standard scipy conventions::
+
+ import numpy as np
+ import numpy.ma as ma
+ import matplotlib as mpl
+ import matplotlib.pyplot as plt
+ import matplotlib.cbook as cbook
+ import matplotlib.patches as mpatches
+
+ In general, Matplotlib modules should **not** import `.rcParams` using ``from
+ matplotlib import rcParams``, but rather access it as ``mpl.rcParams``. This
+ is because some modules are imported very early, before the `.rcParams`
+ singleton is constructed.
+
+* If your change is a major new feature, add an entry to the ``What's new``
+ section by adding a new file in ``doc/users/next_whats_new`` (see
+ :file:`doc/users/next_whats_new/README.rst` for more information).
+
+* If you change the API in a backward-incompatible way, please document it in
+ :file:`doc/api/next_api_changes/behavior`, by adding a new file with the
+ naming convention ``99999-ABC.rst`` where the pull request number is followed
+ by the contributor's initials. (see :file:`doc/api/api_changes.rst` for more
+ information)
+
+* See below for additional points about :ref:`keyword-argument-processing`, if
+ applicable for your pull request.
+
+.. note::
+
+ The current state of the Matplotlib code base is not compliant with all
+ of these guidelines, but we expect that enforcing these constraints on all
+ new contributions will move the overall code base quality in the right
+ direction.
+
+
+.. seealso::
+
+ * :ref:`coding_guidelines`
+ * :ref:`testing`
+ * :ref:`documenting-matplotlib`
+
+
Summary for pull request authors
================================
@@ -34,7 +119,7 @@ When making a PR, pay attention to:
.. rst-class:: checklist
-* :ref:`Target the master branch `.
+* :ref:`Target the main branch `.
* Adhere to the :ref:`coding_guidelines`.
* Update the :ref:`documentation ` if necessary.
* Aim at making the PR as "ready-to-go" as you can. This helps to speed up
@@ -45,7 +130,7 @@ When making a PR, pay attention to:
on GitHub.
* When updating your PR, instead of adding new commits to fix something, please
consider amending your initial commit(s) to keep the history clean.
- You can achieve this using
+ You can achieve this by using
.. code-block:: bash
@@ -72,13 +157,18 @@ Content topics:
* Does the PR conform with the :ref:`coding_guidelines`?
* Is the :ref:`documentation ` (docstrings, examples,
what's new, API changes) updated?
+* Is the change purely stylistic? Generally, such changes are discouraged when
+ not part of other non-stylistic work because it obscures the git history of
+ functional changes to the code. Reflowing a method or docstring as part of a
+ larger refactor/rewrite is acceptable.
+
Organizational topics:
.. rst-class:: checklist
* Make sure all :ref:`automated tests ` pass.
-* The PR should :ref:`target the master branch `.
+* The PR should :ref:`target the main branch `.
* Tag with descriptive :ref:`labels `.
* Set the :ref:`milestone `.
* Keep an eye on the :ref:`number of commits `.
@@ -108,13 +198,60 @@ Documentation
* See :ref:`documenting-matplotlib` for our documentation style guide.
-* If your change is a major new feature, add an entry to
- :file:`doc/users/whats_new.rst`.
+.. _release_notes:
+
+New features and API changes
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+When adding a major new feature or changing the API in a backward incompatible
+way, please document it by including a versioning directive in the docstring
+and adding an entry to the folder for either the what's new or API change notes.
+
++-------------------+-----------------------------+----------------------------------+
+| for this addition | include this directive | create entry in this folder |
++===================+=============================+==================================+
+| new feature | ``.. versionadded:: 3.N`` | :file:`doc/users/next_whats_new/`|
++-------------------+-----------------------------+----------------------------------+
+| API change | ``.. versionchanged:: 3.N`` | :file:`doc/api/next_api_changes/`|
+| | | |
+| | | probably in ``behavior/`` |
++-------------------+-----------------------------+----------------------------------+
+
+The directives should be placed at the end of a description block. For example::
+
+ class Foo:
+ """
+ This is the summary.
+
+ Followed by a longer description block.
+
+ Consisting of multiple lines and paragraphs.
+
+ .. versionadded:: 3.5
+
+ Parameters
+ ----------
+ a : int
+ The first parameter.
+ b: bool, default: False
+ This was added later.
+
+ .. versionadded:: 3.6
+ """
+
+ def set_b(b):
+ """
+ Set b.
+
+ .. versionadded:: 3.6
+
+ Parameters
+ ----------
+ b: bool
-* If you change the API in a backward-incompatible way, please
- document it by adding a file in the relevant subdirectory of
- :file:`doc/api/next_api_changes/`, probably in the ``behavior/``
- subdirectory.
+For classes and functions, the directive should be placed before the
+*Parameters* section. For parameters, the directive should be placed at the
+end of the parameter description. The patch release version is omitted and
+the directive should not be added to entire modules.
.. _pr-labels:
@@ -134,20 +271,20 @@ Milestones
* Set the milestone according to these rules:
* *New features and API changes* are milestoned for the next minor release
- ``v3.X.0``.
+ ``v3.N.0``.
- * *Bugfixes and docstring changes* are milestoned for the next patch
- release ``v3.X.Y``
+ * *Bugfixes, tests for released code, and docstring changes* are milestoned
+ for the next patch release ``v3.N.M``.
* *Documentation changes* (all .rst files and examples) are milestoned
- ``v3.X-doc``
+ ``v3.N-doc``.
If multiple rules apply, choose the first matching from the above list.
Setting a milestone does not imply or guarantee that a PR will be merged for that
release, but if it were to be merged what release it would be in.
- All of these PRs should target the master branch. The milestone tag triggers
+ All of these PRs should target the main branch. The milestone tag triggers
an :ref:`automatic backport ` for milestones which have
a corresponding branch.
@@ -269,13 +406,13 @@ Current branches
----------------
The current active branches are
-*master*
+*main*
The current development version. Future minor releases (*v3.N.0*) will be
- branched from this. Supports Python 3.7+.
+ branched from this.
*v3.N.x*
Maintenance branch for Matplotlib 3.N. Future patch releases will be
- branched from this. Supports Python 3.6+.
+ branched from this.
*v3.N.M-doc*
Documentation for the current release. On a patch release, this will be
@@ -287,7 +424,7 @@ The current active branches are
Branch selection for pull requests
----------------------------------
-Generally, all pull requests should target the master branch.
+Generally, all pull requests should target the main branch.
Other branches are fed through :ref:`automatic ` or
:ref:`manual `. Directly
@@ -346,7 +483,7 @@ When doing backports please copy the form used by meeseekdev,
conflicts make note of them and how you resolved them in the commit
message.
-We do a backport from master to v2.2.x assuming:
+We do a backport from main to v2.2.x assuming:
* ``matplotlib`` is a read-only remote branch of the matplotlib/matplotlib repo
@@ -378,4 +515,4 @@ and then continue the cherry pick:
git cherry-pick --continue
Use your discretion to push directly to upstream or to open a PR; be
-sure to push or PR against the ``v2.2.x`` upstream branch, not ``master``!
+sure to push or PR against the ``v2.2.x`` upstream branch, not ``main``!
diff --git a/doc/devel/color_changes.rst b/doc/devel/color_changes.rst
index 24aa15f29abf..f7646ded7c14 100644
--- a/doc/devel/color_changes.rst
+++ b/doc/devel/color_changes.rst
@@ -4,7 +4,8 @@
Default color changes
*********************
-As discussed at length elsewhere [insert links], ``jet`` is an
+As discussed at length `elsewhere `__ ,
+``jet`` is an
empirically bad colormap and should not be the default colormap.
Due to the position that changing the appearance of the plot breaks
backward compatibility, this change has been put off for far longer
diff --git a/doc/devel/contributing.rst b/doc/devel/contributing.rst
index 225219cc5837..6026c7b4d443 100644
--- a/doc/devel/contributing.rst
+++ b/doc/devel/contributing.rst
@@ -4,27 +4,67 @@
Contributing
============
+You've discovered a bug or something else you want to change
+in Matplotlib — excellent!
+
+You've worked out a way to fix it — even better!
+
+You want to tell us about it — best of all!
+
This project is a community effort, and everyone is welcome to
contribute. Everyone within the community
is expected to abide by our
-`code of conduct `_.
+`code of conduct `_.
-The project is hosted on
-https://github.com/matplotlib/matplotlib
+Below, you can find a number of ways to contribute, and how to connect with the
+Matplotlib community.
-Contributor incubator
-=====================
+Get Connected
+=============
+
+Do I really have something to contribute to Matplotlib?
+-------------------------------------------------------
-If you are interested in becoming a regular contributor to Matplotlib, but
-don't know where to start or feel insecure about it, you can join our non-public
-communication channel for new contributors. To do so, please go to `gitter
-`_ and ask to be added to '#incubator'.
-This is a private gitter room moderated by core Matplotlib developers where you can
-get guidance and support for your first few PRs. This is a place you can ask questions
-about anything: how to use git, github, how our PR review process works, technical questions
-about the code, what makes for good documentation or a blog post, how to get involved involved
-in community work, or get "pre-review" on your PR.
+100% yes. There are so many ways to contribute to our community.
+When in doubt, we recommend going together! Get connected with our community of
+active contributors, many of whom felt just like you when they started out and
+are happy to welcome you and support you as you get to know how we work, and
+where things are. Take a look at the next sections to learn more.
+
+Contributor incubator
+---------------------
+
+The incubator is our non-public communication channel for new contributors. It
+is a private gitter room moderated by core Matplotlib developers where you can
+get guidance and support for your first few PRs. It's a place you can ask
+questions about anything: how to use git, GitHub, how our PR review process
+works, technical questions about the code, what makes for good documentation
+or a blog post, how to get involved in community work, or get
+"pre-review" on your PR.
+
+To join, please go to our public `gitter
+`_ community channel, and ask to be
+added to '#incubator'. One of our core developers will see your message and will
+add you.
+
+New Contributors meeting
+------------------------
+
+Once a month, we host a meeting to discuss topics that interest new
+contributors. Anyone can attend, present, or sit in and listen to the call.
+Among our attendees are fellow new contributors, as well as maintainers, and
+veteran contributors, who are keen to support onboarding of new folks and
+share their experience. You can find our community calendar link at the
+`Scientific Python website `_, and
+you can browse previous meeting notes on `GitHub
+`_.
+We recommend joining the meeting to clarify any doubts, or lingering
+questions you might have, and to get to know a few of the people behind the
+GitHub handles 😉. You can reach out to @noatamir on `gitter
+`_ for any clarifications or
+suggestions. We <3 feedback!
.. _new_contributors:
@@ -32,13 +72,32 @@ Issues for new contributors
---------------------------
While any contributions are welcome, we have marked some issues as
-particularly suited for new contributors by the label
-`good first issue `_
-These are well documented issues, that do not require a deep understanding of
-the internals of Matplotlib. The issues may additionally be tagged with a
-difficulty. ``Difficulty: Easy`` is suited for people with little Python experience.
-``Difficulty: Medium`` and ``Difficulty: Hard`` are not trivial to solve and
-require more thought and programming experience.
+particularly suited for new contributors by the label `good first issue
+`_. These
+are well documented issues, that do not require a deep understanding of the
+internals of Matplotlib. The issues may additionally be tagged with a
+difficulty. ``Difficulty: Easy`` is suited for people with little Python
+experience. ``Difficulty: Medium`` and ``Difficulty: Hard`` require more
+programming experience. This could be for a variety of reasons, among them,
+though not necessarily all at the same time:
+
+- The issue is in areas of the code base which have more interdependencies,
+ or legacy code.
+- It has less clearly defined tasks, which require some independent
+ exploration, making suggestions, or follow-up discussions to clarify a good
+ path to resolve the issue.
+- It involves Python features such as decorators and context managers, which
+ have subtleties due to our implementation decisions.
+
+In general, the Matplotlib project does not assign issues. Issues are
+"assigned" or "claimed" by opening a PR; there is no other assignment
+mechanism. If you have opened such a PR, please comment on the issue thread to
+avoid duplication of work. Please check if there is an existing PR for the
+issue you are addressing. If there is, try to work with the author by
+submitting reviews of their code or commenting on the PR rather than opening
+a new PR; duplicate PRs are subject to being closed. However, if the existing
+PR is an outline, unlikely to work, or stalled, and the original author is
+unresponsive, feel free to open a new PR referencing the old one.
.. _submitting-a-bug-report:
@@ -73,7 +132,7 @@ If you are reporting a bug, please do your best to include the following:
>>> platform.python_version()
'3.9.2'
-We have preloaded the issue creation page with a Markdown template that you can
+We have preloaded the issue creation page with a Markdown form that you can
use to organize this information.
Thank you for your help in keeping bug reports complete, targeted and descriptive.
@@ -123,9 +182,9 @@ A brief overview is:
5. Create a branch to hold your changes::
- git checkout -b my-feature origin/master
+ git checkout -b my-feature origin/main
- and start making changes. Never work in the ``master`` branch!
+ and start making changes. Never work in the ``main`` branch!
6. Work on this copy, on your computer, using Git to do the version control.
When you're done editing e.g., ``lib/matplotlib/collections.py``, do::
@@ -140,96 +199,8 @@ A brief overview is:
Finally, go to the web page of your fork of the Matplotlib repo, and click
'Pull request' to send your changes to the maintainers for review.
-.. seealso::
-
- * `Git documentation `_
- * `Git-Contributing to a Project `_
- * `Introduction to GitHub `_
- * :ref:`development-workflow` for best practices for Matplotlib
- * :ref:`using-git`
-
-Contributing pull requests
---------------------------
-
-It is recommended to check that your contribution complies with the following
-rules before submitting a pull request:
-
-* If your pull request addresses an issue, please use the title to describe the
- issue and mention the issue number in the pull request description to ensure
- that a link is created to the original issue.
-
-* All public methods should have informative docstrings with sample usage when
- appropriate. Use the `numpy docstring standard
- `_.
-
-* Formatting should follow the recommendations of PEP8_, as enforced by
- flake8_. You can check flake8 compliance from the command line with ::
-
- python -m pip install flake8
- flake8 /path/to/module.py
-
- or your editor may provide integration with it. Note that Matplotlib
- intentionally does not use the black_ auto-formatter (1__), in particular due
- to its unability to understand the semantics of mathematical expressions
- (2__, 3__).
-
- .. _PEP8: https://www.python.org/dev/peps/pep-0008/
- .. _flake8: https://flake8.pycqa.org/
- .. _black: https://black.readthedocs.io/
- .. __: https://github.com/matplotlib/matplotlib/issues/18796
- .. __: https://github.com/psf/black/issues/148
- .. __: https://github.com/psf/black/issues/1984
-
-* Each high-level plotting function should have a simple example in the
- ``Example`` section of the docstring. This should be as simple as possible
- to demonstrate the method. More complex examples should go in the
- ``examples`` tree.
-
-* Changes (both new features and bugfixes) should have good test coverage. See
- :ref:`testing` for more details.
-
-* Import the following modules using the standard scipy conventions::
-
- import numpy as np
- import numpy.ma as ma
- import matplotlib as mpl
- import matplotlib.pyplot as plt
- import matplotlib.cbook as cbook
- import matplotlib.patches as mpatches
-
- In general, Matplotlib modules should **not** import `.rcParams` using ``from
- matplotlib import rcParams``, but rather access it as ``mpl.rcParams``. This
- is because some modules are imported very early, before the `.rcParams`
- singleton is constructed.
-
-* If your change is a major new feature, add an entry to the ``What's new``
- section by adding a new file in ``doc/users/next_whats_new`` (see
- :file:`doc/users/next_whats_new/README.rst` for more information).
-
-* If you change the API in a backward-incompatible way, please document it in
- :file:`doc/api/next_api_changes/behavior`, by adding a new file with the
- naming convention ``99999-ABC.rst`` where the pull request number is followed
- by the contributor's initials. (see :file:`doc/api/api_changes.rst` for more
- information)
-
-* See below for additional points about :ref:`keyword-argument-processing`, if
- applicable for your pull request.
-
-.. note::
-
- The current state of the Matplotlib code base is not compliant with all
- of those guidelines, but we expect that enforcing those constraints on all
- new contributions will move the overall code base quality in the right
- direction.
-
-
-.. seealso::
-
- * :ref:`coding_guidelines`
- * :ref:`testing`
- * :ref:`documenting-matplotlib`
-
-
+For more detailed instructions on how to set up Matplotlib for development and
+best practices for contribution, see :ref:`installing_for_devs`.
.. _contributing_documentation:
@@ -279,6 +250,12 @@ API consistency and stability are of great value. Therefore, API changes
(e.g. signature changes, behavior changes, removals) will only be conducted
if the added benefit is worth the user effort for adapting.
+Because we are a visualization library our primary output is the final
+visualization the user sees. Thus it is our :ref:`long standing
+` policy that the appearance of the figure is part of the API
+and any changes, either semantic or esthetic, will be treated as a
+backwards-incompatible API change.
+
API changes in Matplotlib have to be performed following the deprecation process
below, except in very rare circumstances as deemed necessary by the development team.
This ensures that users are notified before the change will take effect and thus
@@ -288,7 +265,7 @@ Rules
~~~~~
- Deprecations are targeted at the next point.release (e.g. 3.x)
-- Deprecated API is generally removed two two point-releases after introduction
+- Deprecated API is generally removed two point-releases after introduction
of the deprecation. Longer deprecations can be imposed by core developers on
a case-by-case basis to give more time for the transition
- The old API must remain fully functional during the deprecation period
@@ -303,8 +280,8 @@ Introducing
1. Announce the deprecation in a new file
:file:`doc/api/next_api_changes/deprecations/99999-ABC.rst` where ``99999``
is the pull request number and ``ABC`` are the contributor's initials.
-2. If possible, issue a `.MatplotlibDeprecationWarning` when the deprecated
- API is used. There are a number of helper tools for this:
+2. If possible, issue a `~matplotlib.MatplotlibDeprecationWarning` when the
+ deprecated API is used. There are a number of helper tools for this:
- Use ``_api.warn_deprecated()`` for general deprecation warnings
- Use the decorator ``@_api.deprecated`` to deprecate classes, functions,
@@ -526,7 +503,9 @@ running the script::
from matplotlib import my_matplotlib_module
my_matplotlib_module.set_range(0, 0) # set range
-will display::
+will display
+
+.. code-block:: none
UserWarning: Attempting to set identical bottom==top
warnings.warn('Attempting to set identical bottom==top')
diff --git a/doc/devel/dependencies.rst b/doc/devel/dependencies.rst
index 5da29663ad7d..da67cae0061e 100644
--- a/doc/devel/dependencies.rst
+++ b/doc/devel/dependencies.rst
@@ -7,6 +7,7 @@ Dependencies
Runtime dependencies
====================
+
Mandatory dependencies
----------------------
@@ -14,15 +15,20 @@ When installing through a package manager like ``pip`` or ``conda``, the
mandatory dependencies are automatically installed. This list is mainly for
reference.
-* `Python `_ (>= 3.7)
-* `NumPy `_ (>= 1.17)
-* `setuptools `_
+* `Python `_ (>= 3.8)
+* `contourpy `_ (>= 1.0.1)
* `cycler `_ (>= 0.10.0)
* `dateutil `_ (>= 2.7)
+* `fontTools `_ (>= 4.22.0)
* `kiwisolver `_ (>= 1.0.1)
+* `NumPy `_ (>= 1.20)
+* `packaging `_ (>= 20.0)
* `Pillow `_ (>= 6.2)
-* `pyparsing `_ (>=2.2.1)
-* `fontTools `_ (>=4.22.0)
+* `pyparsing `_ (>= 2.3.1)
+* `setuptools `_
+* `pyparsing `_ (>= 2.3.1)
+* `importlib-resources `_
+ (>= 3.2.0; only required on Python < 3.10)
.. _optional_dependencies:
@@ -40,13 +46,21 @@ Matplotlib figures can be rendered to various user interfaces. See
:ref:`what-is-a-backend` for more details on the optional Matplotlib backends
and the capabilities they provide.
-* Tk_ (>= 8.4, != 8.6.0 or 8.6.1) [#]_: for the Tk-based backends.
+* Tk_ (>= 8.4, != 8.6.0 or 8.6.1): for the Tk-based backends. Tk is part of
+ most standard Python installations, but it's not part of Python itself and
+ thus may not be present in rare cases.
* PyQt6_ (>= 6.1), PySide6_, PyQt5_, or PySide2_: for the Qt-based backends.
-* PyGObject_: for the GTK-based backends [#]_.
-* wxPython_ (>= 4) [#]_: for the wx-based backends.
-* pycairo_ (>= 1.11.0) or cairocffi_ (>= 0.8): for the GTK and/or cairo-based
- backends.
-* Tornado_ (>=5): for the WebAgg backend.
+* PyGObject_ and pycairo_ (>= 1.14.0): for the GTK-based backends. If using pip
+ (but not conda or system package manager) PyGObject must be built from
+ source; see `pygobject documentation
+ `_.
+* pycairo_ (>= 1.14.0) or cairocffi_ (>= 0.8): for cairo-based backends.
+* wxPython_ (>= 4): for the wx-based backends. If using pip (but not conda or
+ system package manager) on Linux wxPython wheels must be manually downloaded
+ from https://wxpython.org/pages/downloads/.
+* Tornado_ (>= 5): for the WebAgg backend.
+* ipykernel_: for the nbagg backend.
+* macOS (>= 10.12): for the macosx backend.
.. _Tk: https://docs.python.org/3/library/tk.html
.. _PyQt5: https://pypi.org/project/PyQt5/
@@ -58,13 +72,7 @@ and the capabilities they provide.
.. _pycairo: https://pycairo.readthedocs.io/en/latest/
.. _cairocffi: https://cairocffi.readthedocs.io/en/latest/
.. _Tornado: https://pypi.org/project/tornado/
-
-.. [#] Tk is part of most standard Python installations, but it's not part of
- Python itself and thus may not be present in rare cases.
-.. [#] If using pip (and not conda), PyGObject must be built from source; see
- https://pygobject.readthedocs.io/en/latest/devguide/dev_environ.html.
-.. [#] If using pip (and not conda) on Linux, wxPython wheels must be manually
- downloaded from https://wxpython.org/pages/downloads/.
+.. _ipykernel: https://pypi.org/project/ipykernel/
Animations
~~~~~~~~~~
@@ -77,8 +85,9 @@ Font handling and rendering
~~~~~~~~~~~~~~~~~~~~~~~~~~~
* `LaTeX `_ (with `cm-super
- `__ ) and `GhostScript (>=9.0)
- `_ : for rendering text with LaTeX.
+ `__ and `underscore
+ `__) and `GhostScript (>= 9.0)
+ `_: for rendering text with LaTeX.
* `fontconfig `_ (>= 2.7): for detection of system
fonts on Linux.
@@ -165,45 +174,121 @@ remember to clear your artifacts before re-building::
git clean -xfd
+Minimum pip / manylinux support (linux)
+---------------------------------------
+
+Matplotlib publishes `manylinux wheels `_
+which have a minimum version of pip which will recognize the wheels
+
+- Python 3.8: ``manylinx2010`` / pip >= 19.0
+- Python 3.9+: ``manylinx2014`` / pip >= 19.3
+
+In all cases the required version of pip is embedded in the CPython source.
+
+
+
.. _development-dependencies:
-Additional dependencies for development
-=======================================
+Dependencies for building Matplotlib
+====================================
+
+.. _setup-dependencies:
+
+Setup dependencies
+------------------
+
+- `certifi `_ (>= 2020.06.20). Used while
+ downloading the freetype and QHull source during build. This is not a
+ runtime dependency.
+- `setuptools_scm `_ (>= 7). Used to
+ update the reported ``mpl.__version__`` based on the current git commit.
+ Also a runtime dependency for editable installs.
+- `NumPy `_ (>= 1.20). Also a runtime dependency.
+
+
+.. _compile-dependencies:
+
+C++ compiler
+------------
+
+Matplotlib requires a C++ compiler that supports C++11.
+
+- `gcc 4.8.1 `_ or higher. For gcc <6.5 you will
+ need to set ``$CFLAGS=-std=c++11`` to enable C++11 support.
+ `Installing GCC: Binaries `_.
+- `clang 3.3 `_ or higher.
+ `LLVM Download Page `_.
+- `Visual Studio 2015
+ `_
+ (aka VS 14.0) or higher. A free version of Build Tools for Visual Studio is available for
+ `download `_.
+
.. _test-dependencies:
-Additional dependencies for testing
+Dependencies for testing Matplotlib
===================================
This section lists the additional software required for
:ref:`running the tests `.
Required:
-- pytest_ (>=3.6)
-- Ghostscript_ (>= 9.0, to render PDF files)
-- Inkscape_ (to render SVG files)
+- pytest_ (>= 3.6)
Optional:
-- pytest-cov_ (>=2.3.1) to collect coverage information
+In addition to all of the optional dependencies on the main library, for
+testing the following will be used if they are installed.
+
+- Ghostscript_ (>= 9.0, to render PDF files)
+- Inkscape_ (to render SVG files)
+- nbformat_ and nbconvert_ used to test the notebook backend
+- pandas_ used to test compatibility with Pandas
+- pikepdf_ used in some tests for the pgf and pdf backends
+- psutil_ used in testing the interactive backends
+- pytest-cov_ (>= 2.3.1) to collect coverage information
- pytest-flake8_ to test coding standards using flake8_
- pytest-timeout_ to limit runtime in case of stuck tests
- pytest-xdist_ to run tests in parallel
+- pytest-xvfb_ to run tests without windows popping up (Linux)
+- pytz_ used to test pytz int
+- sphinx_ used to test our sphinx extensions
+- WenQuanYi Zen Hei and `Noto Sans CJK `_
+ fonts for testing font fallback and non-western fonts
+- xarray_ used to test compatibility with xarray
-.. _pytest: http://doc.pytest.org/en/latest/
-.. _Ghostscript: https://www.ghostscript.com/
+If any of these dependencies are not discovered the tests that rely on them
+will be skipped by pytest.
+
+.. note::
+
+ When installing Inkscape on Windows, make sure that you select “Add
+ Inkscape to system PATH”, either for all users or current user, or the
+ tests will not find it.
+
+.. _Ghostscript: https://ghostscript.com/
.. _Inkscape: https://inkscape.org
+.. _flake8: https://pypi.org/project/flake8/
+.. _nbconvert: https://pypi.org/project/nbconvert/
+.. _nbformat: https://pypi.org/project/nbformat/
+.. _pandas: https://pypi.org/project/pandas/
+.. _pikepdf: https://pypi.org/project/pikepdf/
+.. _psutil: https://pypi.org/project/psutil/
+.. _pytz: https://fonts.google.com/noto/use#faq
.. _pytest-cov: https://pytest-cov.readthedocs.io/en/latest/
.. _pytest-flake8: https://pypi.org/project/pytest-flake8/
-.. _pytest-xdist: https://pypi.org/project/pytest-xdist/
.. _pytest-timeout: https://pypi.org/project/pytest-timeout/
-.. _flake8: https://pypi.org/project/flake8/
+.. _pytest-xdist: https://pypi.org/project/pytest-xdist/
+.. _pytest-xvfb: https://pypi.org/project/pytest-xvfb/
+.. _pytest: http://doc.pytest.org/en/latest/
+.. _sphinx: https://pypi.org/project/Sphinx/
+.. _xarray: https://pypi.org/project/xarray/
.. _doc-dependencies:
-Additional dependencies for building documentation
-==================================================
+Dependencies for building Matplotlib's documentation
+====================================================
Python packages
---------------
@@ -222,9 +307,10 @@ Additional external dependencies
--------------------------------
Required:
-* a minimal working LaTeX distribution
+* a minimal working LaTeX distribution, e.g., `TeX Live `_ or
+ `MikTeX `_
* `Graphviz `_
-* the following LaTeX packages (if your OS bundles TeXLive, the
+* the following LaTeX packages (if your OS bundles TeX Live, the
"complete" version of the installer, e.g. "texlive-full" or "texlive-all",
will often automatically include these packages):
diff --git a/doc/devel/development_setup.rst b/doc/devel/development_setup.rst
index 468a7add7d75..afcd63b3bf15 100644
--- a/doc/devel/development_setup.rst
+++ b/doc/devel/development_setup.rst
@@ -1,49 +1,127 @@
+.. redirect-from:: /devel/gitwash/configure_git
+.. redirect-from:: /devel/gitwash/dot2_dot3
+.. redirect-from:: /devel/gitwash/following_latest
+.. redirect-from:: /devel/gitwash/forking_hell
+.. redirect-from:: /devel/gitwash/git_development
+.. redirect-from:: /devel/gitwash/git_install
+.. redirect-from:: /devel/gitwash/git_intro
+.. redirect-from:: /devel/gitwash/git_resources
+.. redirect-from:: /devel/gitwash/patching
+.. redirect-from:: /devel/gitwash/set_up_fork
+.. redirect-from:: /devel/gitwash/index
+
.. _installing_for_devs:
=====================================
Setting up Matplotlib for development
=====================================
+To set up Matplotlib for development follow these steps:
+
+.. contents::
+ :local:
+
+Fork the Matplotlib repository
+==============================
+
+Matplotlib is hosted at https://github.com/matplotlib/matplotlib.git. If you
+plan on solving issues or submit pull requests to the main Matplotlib
+repository, you should first *fork* this repository by visiting
+https://github.com/matplotlib/matplotlib.git and clicking on the
+``Fork`` button on the top right of the page (see
+`the GitHub documentation `__ for more details.)
+
+Retrieve the latest version of the code
+=======================================
+
+Now that your fork of the repository lives under your GitHub username, you can
+retrieve the latest sources with one of the following commands (where your
+should replace ```` with your GitHub username):
+
+.. tab-set::
+
+ .. tab-item:: https
+
+ .. code-block:: bash
+
+ git clone https://github.com//matplotlib.git
+
+ .. tab-item:: ssh
+
+ .. code-block:: bash
+
+ git clone git@github.com:/matplotlib.git
+
+ This requires you to setup an `SSH key`_ in advance, but saves you from
+ typing your password at every connection.
+
+ .. _SSH key: https://docs.github.com/en/authentication/connecting-to-github-with-ssh
+
+
+This will place the sources in a directory :file:`matplotlib` below your
+current working directory, set up the ``origin`` remote to point to your own
+fork, and set up the ``upstream`` remote to point to the Matplotlib main
+repository (see also `Managing remote repositories `__.)
+Change into this directory before continuing::
+
+ cd matplotlib
+
+.. note::
+
+ For more information on ``git`` and ``GitHub``, check the following resources.
+
+ * `Git documentation `_
+ * `GitHub-Contributing to a Project `_
+ * `GitHub Skills `_
+ * :ref:`using-git`
+ * :ref:`git-resources`
+ * `Installing git `_
+ * https://tacaswell.github.io/think-like-git.html
+ * https://tom.preston-werner.com/2009/05/19/the-git-parable.html
+
.. _dev-environment:
-Creating a dedicated environment
-================================
+Create a dedicated environment
+==============================
You should set up a dedicated environment to decouple your Matplotlib
development from other Python and Matplotlib installations on your system.
-Here we use python's virtual environment `venv`_, but you may also use others
-such as conda.
+
+The simplest way to do this is to use either Python's virtual environment
+`venv`_ or `conda`_.
.. _venv: https://docs.python.org/3/library/venv.html
+.. _conda: https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html
-A new environment can be set up with ::
+.. tab-set::
- python -m venv
+ .. tab-item:: venv environment
-and activated with one of the following::
+ Create a new `venv`_ environment with ::
- source /bin/activate # Linux/macOS
- \Scripts\activate.bat # Windows cmd.exe
- \Scripts\Activate.ps1 # Windows PowerShell
+ python -m venv
-Whenever you plan to work on Matplotlib, remember to activate the development
-environment in your shell.
+ and activate it with one of the following ::
-Retrieving the latest version of the code
-=========================================
+ source /bin/activate # Linux/macOS
+ \Scripts\activate.bat # Windows cmd.exe
+ \Scripts\Activate.ps1 # Windows PowerShell
-Matplotlib is hosted at https://github.com/matplotlib/matplotlib.git.
+ .. tab-item:: conda environment
-You can retrieve the latest sources with the command (see
-:ref:`set-up-fork` for more details)::
+ Create a new `conda`_ environment with ::
- git clone https://github.com/matplotlib/matplotlib.git
+ conda env create -f environment.yml
-This will place the sources in a directory :file:`matplotlib` below your
-current working directory.
+ You can use ``mamba`` instead of ``conda`` in the above command if
+ you have `mamba`_ installed.
-If you have the proper privileges, you can use ``git@`` instead of
-``https://``, which works through the ssh protocol and might be easier to use
-if you are using 2-factor authentication.
+ .. _mamba: https://mamba.readthedocs.io/en/latest/
+
+ Activate the environment using ::
+
+ conda activate mpl-dev
+
+Remember to activate the environment whenever you start working on Matplotlib.
Installing Matplotlib in editable mode
======================================
@@ -60,6 +138,20 @@ true for ``*.py`` files. If you change the C-extension source (which might
also happen if you change branches) you will have to re-run
``python -m pip install -ve .``
-Installing additional dependencies for development
-==================================================
-See :ref:`development-dependencies`.
+Install pre-commit hooks (optional)
+===================================
+`pre-commit `_ hooks automatically check flake8 and
+other style issues when you run ``git commit``. The hooks are defined in the
+top level ``.pre-commit-config.yaml`` file. To install the hooks ::
+
+ python -m pip install pre-commit
+ pre-commit install
+
+The hooks can also be run manually. All the hooks can be run, in order as
+listed in ``.pre-commit-config.yaml``, against the full codebase with ::
+
+ pre-commit run --all-files
+
+To run a particular hook manually, run ``pre-commit run`` with the hook id ::
+
+ pre-commit run --all-files
diff --git a/doc/devel/development_workflow.rst b/doc/devel/development_workflow.rst
new file mode 100644
index 000000000000..cd902f3f30e5
--- /dev/null
+++ b/doc/devel/development_workflow.rst
@@ -0,0 +1,430 @@
+.. highlight:: bash
+
+.. _development-workflow:
+
+####################
+Development workflow
+####################
+
+Workflow summary
+================
+
+To keep your work well organized, with readable history, and in turn make it
+easier for project maintainers (that might be you) to see what you've done, and
+why you did it, we recommend the following:
+
+* Don't use your ``main`` branch for anything. Consider deleting it.
+* Before starting a new set of changes, fetch all changes from
+ ``upstream/main``, and start a new *feature branch* from that.
+* Make a new branch for each feature or bug fix — "one task, one branch".
+* Name your branch for the purpose of the changes - e.g.
+ ``bugfix-for-issue-14`` or ``refactor-database-code``.
+* If you get stuck, reach out on Gitter or
+ `discourse `__.
+* When you're ready or need feedback on your code, open a pull request so that the
+ Matplotlib developers can give feedback and eventually include your suggested
+ code into the ``main`` branch.
+
+.. note::
+
+ It may sound strange, but deleting your own ``main`` branch can help reduce
+ confusion about which branch you are on. See `deleting main on GitHub`_ for
+ details.
+
+.. _deleting main on GitHub: https://matthew-brett.github.io/pydagogue/gh_delete_master.html
+
+.. _update-mirror-main:
+
+Update the ``main`` branch
+==========================
+
+First make sure you have followed :ref:`installing_for_devs`.
+
+From time to time you should fetch the upstream changes from GitHub::
+
+ git fetch upstream
+
+This will pull down any commits you don't have, and set the remote branches to
+point to the right commit.
+
+.. _make-feature-branch:
+
+Make a new feature branch
+=========================
+
+When you are ready to make some changes to the code, you should start a new
+branch. Branches that are for a collection of related edits are often called
+'feature branches'.
+
+Making a new branch for each set of related changes will make it easier for
+someone reviewing your branch to see what you are doing.
+
+Choose an informative name for the branch to remind yourself and the rest of us
+what the changes in the branch are for. For example ``add-ability-to-fly``, or
+``bugfix-for-issue-42``.
+
+::
+
+ # Update the main branch
+ git fetch upstream
+ # Make new feature branch starting at current main
+ git branch my-new-feature upstream/main
+ git checkout my-new-feature
+
+Generally, you will want to keep your feature branches on your public GitHub
+fork of Matplotlib. To do this, you ``git push`` this new branch up to your
+GitHub repo. Generally (if you followed the instructions in these pages, and by
+default), git will have a link to your fork of the GitHub repo, called
+``origin``. You push up to your own fork with::
+
+ git push origin my-new-feature
+
+In git >= 1.7 you can ensure that the link is correctly set by using the
+``--set-upstream`` option::
+
+ git push --set-upstream origin my-new-feature
+
+From now on git will know that ``my-new-feature`` is related to the
+``my-new-feature`` branch in the GitHub repo.
+
+.. _edit-flow:
+
+The editing workflow
+====================
+
+Overview
+--------
+
+::
+
+ # hack hack
+ git add my_new_file
+ git commit -am 'NF - some message'
+ git push
+
+In more detail
+--------------
+
+#. Make some changes
+#. See which files have changed with ``git status``.
+ You'll see a listing like this one:
+
+ .. code-block:: none
+
+ # On branch ny-new-feature
+ # Changed but not updated:
+ # (use "git add ..." to update what will be committed)
+ # (use "git checkout -- ..." to discard changes in working directory)
+ #
+ # modified: README
+ #
+ # Untracked files:
+ # (use "git add ..." to include in what will be committed)
+ #
+ # INSTALL
+ no changes added to commit (use "git add" and/or "git commit -a")
+
+#. Check what the actual changes are with ``git diff``.
+#. Add any new files to version control ``git add new_file_name``.
+#. To commit all modified files into the local copy of your repo,, do
+ ``git commit -am 'A commit message'``. Note the ``-am`` options to
+ ``commit``. The ``m`` flag just signals that you're going to type a
+ message on the command line. The ``a`` flag — you can just take on
+ faith — or see `why the -a flag?`_. The
+ `git commit `_ manual page might also be
+ useful.
+#. To push the changes up to your forked repo on GitHub, do a ``git
+ push``.
+
+.. _why the -a flag?: http://gitready.com/beginner/2009/01/18/the-staging-area.html
+
+
+Open a pull request
+===================
+
+When you are ready to ask for someone to review your code and consider a merge,
+`submit your Pull Request (PR) `_.
+
+Enter a title for the set of changes with some explanation of what you've done.
+Mention anything you'd like particular attention for - such as a
+complicated change or some code you are not happy with.
+
+If you don't think your request is ready to be merged, just say so in your pull
+request message and use the "Draft PR" feature of GitHub. This is a good way of
+getting some preliminary code review.
+
+Some other things you might want to do
+======================================
+
+Explore your repository
+-----------------------
+
+To see a graphical representation of the repository branches and
+commits::
+
+ gitk --all
+
+To see a linear list of commits for this branch::
+
+ git log
+
+
+.. _recovering-from-mess-up:
+
+Recovering from mess-ups
+------------------------
+
+Sometimes, you mess up merges or rebases. Luckily, in git it is
+relatively straightforward to recover from such mistakes.
+
+If you mess up during a rebase::
+
+ git rebase --abort
+
+If you notice you messed up after the rebase::
+
+ # reset branch back to the saved point
+ git reset --hard tmp
+
+If you forgot to make a backup branch::
+
+ # look at the reflog of the branch
+ git reflog show cool-feature
+
+ 8630830 cool-feature@{0}: commit: BUG: io: close file handles immediately
+ 278dd2a cool-feature@{1}: rebase finished: refs/heads/my-feature-branch onto 11ee694744f2552d
+ 26aa21a cool-feature@{2}: commit: BUG: lib: make seek_gzip_factory not leak gzip obj
+ ...
+
+ # reset the branch to where it was before the botched rebase
+ git reset --hard cool-feature@{2}
+
+.. _rewriting-commit-history:
+
+Rewriting commit history
+------------------------
+
+.. note::
+
+ Do this only for your own feature branches.
+
+Is there an embarrassing typo in a commit you made? Or perhaps you
+made several false starts you don't want posterity to see.
+
+This can be done via *interactive rebasing*.
+
+Suppose that the commit history looks like this::
+
+ git log --oneline
+ eadc391 Fix some remaining bugs
+ a815645 Modify it so that it works
+ 2dec1ac Fix a few bugs + disable
+ 13d7934 First implementation
+ 6ad92e5 * masked is now an instance of a new object, MaskedConstant
+ 29001ed Add pre-nep for a copule of structured_array_extensions.
+ ...
+
+and ``6ad92e5`` is the last commit in the ``cool-feature`` branch. Suppose we
+want to make the following changes:
+
+* Rewrite the commit message for ``13d7934`` to something more sensible.
+* Combine the commits ``2dec1ac``, ``a815645``, ``eadc391`` into a single one.
+
+We do as follows::
+
+ # make a backup of the current state
+ git branch tmp HEAD
+ # interactive rebase
+ git rebase -i 6ad92e5
+
+This will open an editor with the following text in it::
+
+ pick 13d7934 First implementation
+ pick 2dec1ac Fix a few bugs + disable
+ pick a815645 Modify it so that it works
+ pick eadc391 Fix some remaining bugs
+
+ # Rebase 6ad92e5..eadc391 onto 6ad92e5
+ #
+ # Commands:
+ # p, pick = use commit
+ # r, reword = use commit, but edit the commit message
+ # e, edit = use commit, but stop for amending
+ # s, squash = use commit, but meld into previous commit
+ # f, fixup = like "squash", but discard this commit's log message
+ #
+ # If you remove a line here THAT COMMIT WILL BE LOST.
+ # However, if you remove everything, the rebase will be aborted.
+ #
+
+To achieve what we want, we will make the following changes to it::
+
+ r 13d7934 First implementation
+ pick 2dec1ac Fix a few bugs + disable
+ f a815645 Modify it so that it works
+ f eadc391 Fix some remaining bugs
+
+This means that (i) we want to edit the commit message for
+``13d7934``, and (ii) collapse the last three commits into one. Now we
+save and quit the editor.
+
+Git will then immediately bring up an editor for editing the commit
+message. After revising it, we get the output::
+
+ [detached HEAD 721fc64] FOO: First implementation
+ 2 files changed, 199 insertions(+), 66 deletions(-)
+ [detached HEAD 0f22701] Fix a few bugs + disable
+ 1 files changed, 79 insertions(+), 61 deletions(-)
+ Successfully rebased and updated refs/heads/my-feature-branch.
+
+and now, the history looks like this::
+
+ 0f22701 Fix a few bugs + disable
+ 721fc64 ENH: Sophisticated feature
+ 6ad92e5 * masked is now an instance of a new object, MaskedConstant
+
+If it went wrong, recovery is again possible as explained :ref:`above
+`.
+
+If you have not yet pushed this branch to github, you can carry on as normal,
+however if you *have* already pushed this commit see :ref:`force-push` for how
+to replace your already published commits with the new ones.
+
+
+.. _rebase-on-main:
+
+Rebasing on ``upstream/main``
+-----------------------------
+
+Let's say you thought of some work you'd like to do. You
+:ref:`update-mirror-main` and :ref:`make-feature-branch` called
+``cool-feature``. At this stage, ``main`` is at some commit, let's call it E.
+Now you make some new commits on your ``cool-feature`` branch, let's call them
+A, B, C. Maybe your changes take a while, or you come back to them after a
+while. In the meantime, ``main`` has progressed from commit E to commit (say) G:
+
+.. code-block:: none
+
+ A---B---C cool-feature
+ /
+ D---E---F---G main
+
+At this stage you consider merging ``main`` into your feature branch, and you
+remember that this page sternly advises you not to do that, because the
+history will get messy. Most of the time, you can just ask for a review without
+worrying about whether ``main`` has got a little ahead; however sometimes, the changes in
+``main`` might affect your changes, and you need to harmonize them. In this
+situation you may prefer to do a rebase.
+
+``rebase`` takes your changes (A, B, C) and replays them as if they had been
+made to the current state of ``main``. In other words, in this case, it takes
+the changes represented by A, B, C and replays them on top of G. After the
+rebase, your history will look like this:
+
+.. code-block:: none
+
+ A'--B'--C' cool-feature
+ /
+ D---E---F---G main
+
+See `rebase without tears`_ for more detail.
+
+.. _rebase without tears: https://matthew-brett.github.io/pydagogue/rebase_without_tears.html
+
+To do a rebase on ``upstream/main``::
+
+ # Fetch changes from upstream/main
+ git fetch upstream
+ # go to the feature branch
+ git checkout cool-feature
+ # make a backup in case you mess up
+ git branch tmp cool-feature
+ # rebase cool-feature onto main
+ git rebase --onto upstream/main upstream/main cool-feature
+
+In this situation, where you are already on branch ``cool-feature``, the last
+command can be written more succinctly as::
+
+ git rebase upstream/main
+
+When all looks good, you can delete your backup branch::
+
+ git branch -D tmp
+
+If it doesn't look good you may need to have a look at
+:ref:`recovering-from-mess-up`.
+
+If you have made changes to files that have also changed in ``main``, this may
+generate merge conflicts that you need to resolve - see the `git rebase`_ man
+page for some instructions at the end of the "Description" section. There is
+some related help on merging in the git user manual - see `resolving a merge`_.
+
+.. _git rebase: https://git-scm.com/docs/git-rebase
+.. _resolving a merge: https://schacon.github.io/git/user-manual.html#resolving-a-merge
+
+
+If you have not yet pushed this branch to github, you can carry on as normal,
+however if you *have* already pushed this commit see :ref:`force-push` for how
+to replace your already published commits with the new ones.
+
+
+.. _force-push:
+
+
+Pushing, with force
+-------------------
+
+
+If you have in some way re-written already pushed history (e.g. via
+:ref:`rewriting-commit-history` or :ref:`rebase-on-main`) leaving you with
+a git history that looks something like
+
+.. code-block:: none
+
+ A'--E cool-feature
+ /
+ D---A---B---C origin/cool-feature
+
+where you have pushed the commits ``A,B,C`` to your fork on GitHub (under the
+remote name *origin*) but now have the commits ``A'`` and ``E`` on your local
+branch *cool-feature*. If you try to push the new commits to GitHub, it will
+fail and show an error that looks like ::
+
+ $ git push
+ Pushing to github.com:origin/matplotlib.git
+ To github.com:origin/matplotlib.git
+ ! [rejected] cool_feature -> cool_feature (non-fast-forward)
+ error: failed to push some refs to 'github.com:origin/matplotlib.git'
+ hint: Updates were rejected because the tip of your current branch is behind
+ hint: its remote counterpart. Integrate the remote changes (e.g.
+ hint: 'git pull ...') before pushing again.
+ hint: See the 'Note about fast-forwards' in 'git push --help' for details.
+
+If this push had succeeded, the commits ``A``, ``B``, and ``C`` would no
+longer be referenced by any branch and they would be discarded:
+
+.. code-block:: none
+
+ D---A'---E cool-feature, origin/cool-feature
+
+By default ``git push`` helpfully tries to protect you from accidentally
+discarding commits by rejecting the push to the remote. When this happens,
+GitHub also adds the helpful suggestion to pull the remote changes and then try
+pushing again. In some cases, such as if you and a colleague are both
+committing and pushing to the same branch, this is a correct course of action.
+
+However, in the case of having intentionally re-written history, we *want* to
+discard the commits on the remote and replace them with the new-and-improved
+versions from our local branch. In this case, what we want to do is ::
+
+ $ git push --force-with-lease
+
+which tells git you are aware of the risks and want to do the push anyway. We
+recommend using ``--force-with-lease`` over the ``--force`` flag. The
+``--force`` will do the push no matter what, whereas ``--force-with-lease``
+will only do the push if the remote branch is where the local ``git`` client
+thought it was.
+
+Be judicious with force-pushing. It is effectively re-writing published
+history, and if anyone has fetched the old commits, it will have a different view
+of history which can cause confusion.
diff --git a/doc/devel/documenting_mpl.rst b/doc/devel/documenting_mpl.rst
index beed5b6549a7..b814e67cd308 100644
--- a/doc/devel/documenting_mpl.rst
+++ b/doc/devel/documenting_mpl.rst
@@ -67,6 +67,10 @@ Other useful invocations include
.. code-block:: sh
+ # Build the html documentation, but skip generation of the gallery images to
+ # save time.
+ make html-noplot
+
# Delete built files. May help if you get errors about missing paths or
# broken links.
make clean
@@ -82,27 +86,19 @@ it, use
make SPHINXOPTS= html
-On Windows the arguments must be at the end of the statement:
-
-.. code-block:: bat
-
- make html SPHINXOPTS=
-
You can use the ``O`` variable to set additional options:
* ``make O=-j4 html`` runs a parallel build with 4 processes.
* ``make O=-Dplot_formats=png:100 html`` saves figures in low resolution.
-* ``make O=-Dplot_gallery=0 html`` skips the gallery build.
-Multiple options can be combined using e.g. ``make O='-j4 -Dplot_gallery=0'
+Multiple options can be combined, e.g. ``make O='-j4 -Dplot_formats=png:100'
html``.
-On Windows, either use the format shown above or set options as environment variables, e.g.:
+On Windows, set the options as environment variables, e.g.:
.. code-block:: bat
- set O=-W --keep-going -j4
- make html
+ set SPHINXOPTS= & set O=-j4 -Dplot_formats=png:100 & make html
Showing locally built docs
--------------------------
@@ -199,7 +195,7 @@ Documents can be linked with the ``:doc:`` directive:
See the :doc:`/users/installing/index`
- See the tutorial :doc:`/tutorials/introductory/usage`
+ See the tutorial :doc:`/tutorials/introductory/quick_start`
See the example :doc:`/gallery/lines_bars_and_markers/simple_plot`
@@ -207,7 +203,7 @@ will render as:
See the :doc:`/users/installing/index`
- See the tutorial :doc:`/tutorials/introductory/usage`
+ See the tutorial :doc:`/tutorials/introductory/quick_start`
See the example :doc:`/gallery/lines_bars_and_markers/simple_plot`
@@ -269,7 +265,7 @@ generates a link like this: `matplotlib.collections.LineCollection`.
have to use qualifiers like ``:class:``, ``:func:``, ``:meth:`` and the likes.
Often, you don't want to show the full package and module name. As long as the
-target is unanbigous you can simply leave them out:
+target is unambiguous you can simply leave them out:
.. code-block:: rst
@@ -368,7 +364,7 @@ An example docstring looks like:
.. code-block:: python
- def hlines(self, y, xmin, xmax, colors='k', linestyles='solid',
+ def hlines(self, y, xmin, xmax, colors=None, linestyles='solid',
label='', **kwargs):
"""
Plot horizontal lines at each *y* from *xmin* to *xmax*.
@@ -382,24 +378,26 @@ An example docstring looks like:
Respective beginning and end of each line. If scalars are
provided, all lines will have the same length.
- colors : array-like of colors, default: 'k'
+ colors : list of colors, default: :rc:`lines.color`
- linestyles : {'solid', 'dashed', 'dashdot', 'dotted'}, default: 'solid'
+ linestyles : {'solid', 'dashed', 'dashdot', 'dotted'}, optional
label : str, default: ''
Returns
-------
- lines : `~matplotlib.collections.LineCollection`
+ `~matplotlib.collections.LineCollection`
Other Parameters
----------------
- **kwargs : `~matplotlib.collections.LineCollection` properties
+ data : indexable object, optional
+ DATA_PARAMETER_PLACEHOLDER
+ **kwargs : `~matplotlib.collections.LineCollection` properties.
- See also
+ See Also
--------
vlines : vertical lines
- axhline: horizontal line across the axes
+ axhline : horizontal line across the Axes
"""
See the `~.Axes.hlines` documentation for how this renders.
@@ -566,10 +564,10 @@ effect.
Sphinx automatically links code elements in the definition blocks of ``See
also`` sections. No need to use backticks there::
- See also
+ See Also
--------
vlines : vertical lines
- axhline: horizontal line across the axes
+ axhline : horizontal line across the Axes
Wrapping parameter lists
~~~~~~~~~~~~~~~~~~~~~~~~
@@ -673,7 +671,7 @@ Keyword arguments
Since Matplotlib uses a lot of pass-through ``kwargs``, e.g., in every function
that creates a line (`~.pyplot.plot`, `~.pyplot.semilogx`, `~.pyplot.semilogy`,
-etc...), it can be difficult for the new user to know which ``kwargs`` are
+etc.), it can be difficult for the new user to know which ``kwargs`` are
supported. Matplotlib uses a docstring interpolation scheme to support
documentation of every function that takes a ``**kwargs``. The requirements
are:
@@ -684,14 +682,14 @@ are:
2. as automated as possible so that as properties change, the docs
are updated automatically.
-The ``@docstring.interpd`` decorator implements this. Any function accepting
+The ``@_docstring.interpd`` decorator implements this. Any function accepting
`.Line2D` pass-through ``kwargs``, e.g., `matplotlib.axes.Axes.plot`, can list
a summary of the `.Line2D` properties, as follows:
.. code-block:: python
# in axes.py
- @docstring.interpd
+ @_docstring.interpd
def plot(self, *args, **kwargs):
"""
Some stuff omitted
@@ -726,7 +724,7 @@ gets interpolated into the docstring.
Note that this scheme does not work for decorating an Artist's ``__init__``, as
the subclass and its properties are not defined yet at that point. Instead,
-``@docstring.interpd`` can be used to decorate the class itself -- at that
+``@_docstring.interpd`` can be used to decorate the class itself -- at that
point, `.kwdoc` can list the properties and interpolate them into
``__init__.__doc__``.
@@ -847,7 +845,7 @@ render as comments in :doc:`/gallery/lines_bars_and_markers/simple_plot`.
Tutorials are made with the exact same mechanism, except they are longer, and
typically have more than one comment block (i.e.
-:doc:`/tutorials/introductory/usage`). The first comment block
+:doc:`/tutorials/introductory/quick_start`). The first comment block
can be the same as the example above. Subsequent blocks of ReST text
are delimited by a line of ``###`` characters:
@@ -963,41 +961,6 @@ found by users at ``http://matplotlib.org/stable/old_topic/old_info2``.
For clarity, do not use relative links.
-Adding animations
------------------
-
-Animations are scraped automatically by Sphinx-gallery. If this is not
-desired,
-there is also a Matplotlib Google/Gmail account with username ``mplgithub``
-which was used to setup the github account but can be used for other
-purposes, like hosting Google docs or Youtube videos. You can embed a
-Matplotlib animation in the docs by first saving the animation as a
-movie using :meth:`matplotlib.animation.Animation.save`, and then
-uploading to `Matplotlib's Youtube
-channel `_ and inserting the
-embedding string youtube provides like:
-
-.. code-block:: rst
-
- .. raw:: html
-
-
-
-An example save command to generate a movie looks like this
-
-.. code-block:: python
-
- ani = animation.FuncAnimation(fig, animate, np.arange(1, len(y)),
- interval=25, blit=True, init_func=init)
-
- ani.save('double_pendulum.mp4', fps=15)
-
-Contact Michael Droettboom for the login password to upload youtube videos of
-google docs to the mplgithub account.
-
.. _inheritance-diagrams:
Generating inheritance diagrams
diff --git a/doc/devel/gitwash/branch_dropdown.png b/doc/devel/gitwash/branch_dropdown.png
deleted file mode 100644
index 1bb7a577732c..000000000000
Binary files a/doc/devel/gitwash/branch_dropdown.png and /dev/null differ
diff --git a/doc/devel/gitwash/configure_git.rst b/doc/devel/gitwash/configure_git.rst
deleted file mode 100644
index eb7ce2662c93..000000000000
--- a/doc/devel/gitwash/configure_git.rst
+++ /dev/null
@@ -1,172 +0,0 @@
-.. highlight:: bash
-
-.. _configure-git:
-
-===============
- Configure git
-===============
-
-.. _git-config-basic:
-
-Overview
-========
-
-Your personal git configurations are saved in the ``.gitconfig`` file in
-your home directory.
-
-Here is an example ``.gitconfig`` file:
-
-.. code-block:: none
-
- [user]
- name = Your Name
- email = you@yourdomain.example.com
-
- [alias]
- ci = commit -a
- co = checkout
- st = status
- stat = status
- br = branch
- wdiff = diff --color-words
-
- [core]
- editor = vim
-
- [merge]
- summary = true
-
-You can check what is already in your config file using the ``git config --list`` command. You can edit the ``.gitconfig`` file directly or you can use the ``git config --global``
-command.::
-
- git config --global user.name "Your Name"
- git config --global user.email you@yourdomain.example.com
- git config --global alias.ci "commit -a"
- git config --global alias.co checkout
- git config --global alias.st "status -a"
- git config --global alias.stat "status -a"
- git config --global alias.br branch
- git config --global alias.wdiff "diff --color-words"
- git config --global core.editor vim
- git config --global merge.summary true
-
-To set up on another computer, you can copy your ``~/.gitconfig`` file,
-or run the commands above.
-
-In detail
-=========
-
-user.name and user.email
-------------------------
-
-It is good practice to tell git_ who you are, for labeling any changes
-you make to the code. The simplest way to do this is from the command
-line::
-
- git config --global user.name "Your Name"
- git config --global user.email you@yourdomain.example.com
-
-This will write the settings into your git configuration file, which
-should now contain a user section with your name and email:
-
-.. code-block:: none
-
- [user]
- name = Your Name
- email = you@yourdomain.example.com
-
-You'll need to replace ``Your Name`` and ``you@yourdomain.example.com``
-with your actual name and email address.
-
-Aliases
--------
-
-You might well benefit from some aliases to common commands.
-
-For example, you might well want to be able to shorten ``git checkout``
-to ``git co``. Or you may want to alias ``git diff --color-words``
-(which gives a nicely formatted output of the diff) to ``git wdiff``
-
-The following ``git config --global`` commands::
-
- git config --global alias.ci "commit -a"
- git config --global alias.co checkout
- git config --global alias.st "status -a"
- git config --global alias.stat "status -a"
- git config --global alias.br branch
- git config --global alias.wdiff "diff --color-words"
-
-will create an ``alias`` section in your ``.gitconfig`` file with contents
-like this:
-
-.. code-block:: none
-
- [alias]
- ci = commit -a
- co = checkout
- st = status -a
- stat = status -a
- br = branch
- wdiff = diff --color-words
-
-Editor
-------
-
-You may also want to make sure that your editor of choice is used ::
-
- git config --global core.editor vim
-
-Merging
--------
-
-To enforce summaries when doing merges (``~/.gitconfig`` file again):
-
-.. code-block:: none
-
- [merge]
- log = true
-
-Or from the command line::
-
- git config --global merge.log true
-
-.. _fancy-log:
-
-Fancy log output
-----------------
-
-This is a very nice alias to get a fancy log output; it should go in the
-``alias`` section of your ``.gitconfig`` file:
-
-.. code-block:: none
-
- lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)[%an]%Creset' --abbrev-commit --date=relative
-
-You use the alias with::
-
- git lg
-
-and it gives graph / text output something like this (but with color!):
-
-.. code-block:: none
-
- * 6d8e1ee - (HEAD, origin/my-fancy-feature, my-fancy-feature) NF - a fancy file (45 minutes ago) [Matthew Brett]
- * d304a73 - (origin/placeholder, placeholder) Merge pull request #48 from hhuuggoo/master (2 weeks ago) [Jonathan Terhorst]
- |\
- | * 4aff2a8 - fixed bug 35, and added a test in test_bugfixes (2 weeks ago) [Hugo]
- |/
- * a7ff2e5 - Added notes on discussion/proposal made during Data Array Summit. (2 weeks ago) [Corran Webster]
- * 68f6752 - Initial implementation of AxisIndexer - uses 'index_by' which needs to be changed to a call on an Axes object - this is all very sketchy right now. (2 weeks ago) [Corr
- * 376adbd - Merge pull request #46 from terhorst/master (2 weeks ago) [Jonathan Terhorst]
- |\
- | * b605216 - updated joshu example to current api (3 weeks ago) [Jonathan Terhorst]
- | * 2e991e8 - add testing for outer ufunc (3 weeks ago) [Jonathan Terhorst]
- | * 7beda5a - prevent axis from throwing an exception if testing equality with non-axis object (3 weeks ago) [Jonathan Terhorst]
- | * 65af65e - convert unit testing code to assertions (3 weeks ago) [Jonathan Terhorst]
- | * 956fbab - Merge remote-tracking branch 'upstream/master' (3 weeks ago) [Jonathan Terhorst]
- | |\
- | |/
-
-Thanks to Yury V. Zaytsev for posting it.
-
-.. include:: links.inc
diff --git a/doc/devel/gitwash/development_workflow.rst b/doc/devel/gitwash/development_workflow.rst
deleted file mode 100644
index 9ac5c05e2b16..000000000000
--- a/doc/devel/gitwash/development_workflow.rst
+++ /dev/null
@@ -1,423 +0,0 @@
-.. highlight:: bash
-
-.. _development-workflow:
-
-####################
-Development workflow
-####################
-
-You already have your own forked copy of the `Matplotlib`_ repository, by
-following :ref:`forking`. You have :ref:`set-up-fork`. You have configured
-git by following :ref:`configure-git`. Now you are ready for some real work.
-
-Workflow summary
-================
-
-In what follows we'll refer to the upstream Matplotlib ``master`` branch, as
-"trunk".
-
-* Don't use your ``master`` branch for anything. Consider deleting it.
-* When you are starting a new set of changes, fetch any changes from trunk,
- and start a new *feature branch* from that.
-* Make a new branch for each separable set of changes |emdash| "one task, one
- branch" (`ipython git workflow`_).
-* Name your branch for the purpose of the changes - e.g.
- ``bugfix-for-issue-14`` or ``refactor-database-code``.
-* If you can possibly avoid it, avoid merging trunk or any other branches into
- your feature branch while you are working.
-* If you do find yourself merging from trunk, consider :ref:`rebase-on-trunk`
-* Ask on the `Matplotlib mailing list`_ if you get stuck.
-* Ask for code review!
-
-This way of working helps to keep work well organized, with readable history.
-This in turn makes it easier for project maintainers (that might be you) to see
-what you've done, and why you did it.
-
-See `linux git workflow`_ and `ipython git workflow`_ for some explanation.
-
-Consider deleting your master branch
-====================================
-
-It may sound strange, but deleting your own ``master`` branch can help reduce
-confusion about which branch you are on. See `deleting master on github`_ for
-details.
-
-.. _update-mirror-trunk:
-
-Update the mirror of trunk
-==========================
-
-First make sure you have done :ref:`linking-to-upstream`.
-
-From time to time you should fetch the upstream (trunk) changes from github::
-
- git fetch upstream
-
-This will pull down any commits you don't have, and set the remote branches to
-point to the right commit. For example, 'trunk' is the branch referred to by
-(remote/branchname) ``upstream/master`` - and if there have been commits since
-you last checked, ``upstream/master`` will change after you do the fetch.
-
-.. _make-feature-branch:
-
-Make a new feature branch
-=========================
-
-When you are ready to make some changes to the code, you should start a new
-branch. Branches that are for a collection of related edits are often called
-'feature branches'.
-
-Making an new branch for each set of related changes will make it easier for
-someone reviewing your branch to see what you are doing.
-
-Choose an informative name for the branch to remind yourself and the rest of us
-what the changes in the branch are for. For example ``add-ability-to-fly``, or
-``buxfix-for-issue-42``.
-
-::
-
- # Update the mirror of trunk
- git fetch upstream
- # Make new feature branch starting at current trunk
- git branch my-new-feature upstream/master
- git checkout my-new-feature
-
-Generally, you will want to keep your feature branches on your public github_
-fork of `Matplotlib`_. To do this, you `git push`_ this new branch up to your
-github repo. Generally (if you followed the instructions in these pages, and by
-default), git will have a link to your github repo, called ``origin``. You push
-up to your own repo on github with::
-
- git push origin my-new-feature
-
-In git >= 1.7 you can ensure that the link is correctly set by using the
-``--set-upstream`` option::
-
- git push --set-upstream origin my-new-feature
-
-From now on git will know that ``my-new-feature`` is related to the
-``my-new-feature`` branch in the github repo.
-
-.. _edit-flow:
-
-The editing workflow
-====================
-
-Overview
---------
-
-::
-
- # hack hack
- git add my_new_file
- git commit -am 'NF - some message'
- git push
-
-In more detail
---------------
-
-#. Make some changes
-#. See which files have changed with ``git status`` (see `git status`_).
- You'll see a listing like this one:
-
- .. code-block:: none
-
- # On branch ny-new-feature
- # Changed but not updated:
- # (use "git add ..." to update what will be committed)
- # (use "git checkout -- ..." to discard changes in working directory)
- #
- # modified: README
- #
- # Untracked files:
- # (use "git add ..." to include in what will be committed)
- #
- # INSTALL
- no changes added to commit (use "git add" and/or "git commit -a")
-
-#. Check what the actual changes are with ``git diff`` (`git diff`_).
-#. Add any new files to version control ``git add new_file_name`` (see
- `git add`_).
-#. To commit all modified files into the local copy of your repo,, do
- ``git commit -am 'A commit message'``. Note the ``-am`` options to
- ``commit``. The ``m`` flag just signals that you're going to type a
- message on the command line. The ``a`` flag |emdash| you can just take on
- faith |emdash| or see `why the -a flag?`_ |emdash| and the helpful use-case
- description in the `tangled working copy problem`_. The `git commit`_ manual
- page might also be useful.
-#. To push the changes up to your forked repo on github, do a ``git
- push`` (see `git push`_).
-
-Ask for your changes to be reviewed or merged
-=============================================
-
-When you are ready to ask for someone to review your code and consider a merge:
-
-#. Go to the URL of your forked repo, say
- ``https://github.com/your-user-name/matplotlib``.
-#. Use the 'Switch Branches' dropdown menu near the top left of the page to
- select the branch with your changes:
-
- .. image:: branch_dropdown.png
-
-#. Click on the 'Pull request' button:
-
- .. image:: pull_button.png
-
- Enter a title for the set of changes, and some explanation of what you've
- done. Say if there is anything you'd like particular attention for - like a
- complicated change or some code you are not happy with.
-
- If you don't think your request is ready to be merged, just say so in your
- pull request message. This is still a good way of getting some preliminary
- code review.
-
-Some other things you might want to do
-======================================
-
-Delete a branch on github
--------------------------
-
-::
-
- git checkout master
- # delete branch locally
- git branch -D my-unwanted-branch
- # delete branch on github
- git push origin :my-unwanted-branch
-
-Note the colon ``:`` before ``my-unwanted-branch``. See also:
-https://help.github.com/articles/pushing-to-a-remote/#deleting-a-remote-branch-or-tag
-
-Several people sharing a single repository
-------------------------------------------
-
-If you want to work on some stuff with other people, where you are all
-committing into the same repository, or even the same branch, then just
-share it via github.
-
-First fork Matplotlib into your account, as from :ref:`forking`.
-
-Then, go to your forked repository github page, say
-``https://github.com/your-user-name/matplotlib``
-
-Click on the 'Admin' button, and add anyone else to the repo as a
-collaborator:
-
- .. image:: pull_button.png
-
-Now all those people can do::
-
- git clone https://github.com/your-user-name/matplotlib.git
-
-Remember that links starting with ``https`` or ``git@`` are read-write, and that
-``git@`` uses the ssh protocol.
-
-Your collaborators can then commit directly into that repo with the
-usual::
-
- git commit -am 'ENH - much better code'
- git push origin master # pushes directly into your repo
-
-Explore your repository
------------------------
-
-To see a graphical representation of the repository branches and
-commits::
-
- gitk --all
-
-To see a linear list of commits for this branch::
-
- git log
-
-You can also look at the `network graph visualizer`_ for your github
-repo.
-
-Finally the :ref:`fancy-log` ``lg`` alias will give you a reasonable text-based
-graph of the repository.
-
-.. _rebase-on-trunk:
-
-Rebasing on trunk
------------------
-
-Let's say you thought of some work you'd like to do. You
-:ref:`update-mirror-trunk` and :ref:`make-feature-branch` called
-``cool-feature``. At this stage trunk is at some commit, let's call it E. Now
-you make some new commits on your ``cool-feature`` branch, let's call them A, B,
-C. Maybe your changes take a while, or you come back to them after a while. In
-the meantime, trunk has progressed from commit E to commit (say) G:
-
-.. code-block:: none
-
- A---B---C cool-feature
- /
- D---E---F---G trunk
-
-At this stage you consider merging trunk into your feature branch, and you
-remember that this here page sternly advises you not to do that, because the
-history will get messy. Most of the time you can just ask for a review, and not
-worry that trunk has got a little ahead. But sometimes, the changes in trunk
-might affect your changes, and you need to harmonize them. In this situation
-you may prefer to do a rebase.
-
-rebase takes your changes (A, B, C) and replays them as if they had been made to
-the current state of ``trunk``. In other words, in this case, it takes the
-changes represented by A, B, C and replays them on top of G. After the rebase,
-your history will look like this:
-
-.. code-block:: none
-
- A'--B'--C' cool-feature
- /
- D---E---F---G trunk
-
-See `rebase without tears`_ for more detail.
-
-To do a rebase on trunk::
-
- # Update the mirror of trunk
- git fetch upstream
- # go to the feature branch
- git checkout cool-feature
- # make a backup in case you mess up
- git branch tmp cool-feature
- # rebase cool-feature onto trunk
- git rebase --onto upstream/master upstream/master cool-feature
-
-In this situation, where you are already on branch ``cool-feature``, the last
-command can be written more succinctly as::
-
- git rebase upstream/master
-
-When all looks good you can delete your backup branch::
-
- git branch -D tmp
-
-If it doesn't look good you may need to have a look at
-:ref:`recovering-from-mess-up`.
-
-If you have made changes to files that have also changed in trunk, this may
-generate merge conflicts that you need to resolve - see the `git rebase`_ man
-page for some instructions at the end of the "Description" section. There is
-some related help on merging in the git user manual - see `resolving a merge`_.
-
-.. _recovering-from-mess-up:
-
-Recovering from mess-ups
-------------------------
-
-Sometimes, you mess up merges or rebases. Luckily, in git it is
-relatively straightforward to recover from such mistakes.
-
-If you mess up during a rebase::
-
- git rebase --abort
-
-If you notice you messed up after the rebase::
-
- # reset branch back to the saved point
- git reset --hard tmp
-
-If you forgot to make a backup branch::
-
- # look at the reflog of the branch
- git reflog show cool-feature
-
- 8630830 cool-feature@{0}: commit: BUG: io: close file handles immediately
- 278dd2a cool-feature@{1}: rebase finished: refs/heads/my-feature-branch onto 11ee694744f2552d
- 26aa21a cool-feature@{2}: commit: BUG: lib: make seek_gzip_factory not leak gzip obj
- ...
-
- # reset the branch to where it was before the botched rebase
- git reset --hard cool-feature@{2}
-
-.. _rewriting-commit-history:
-
-Rewriting commit history
-------------------------
-
-.. note::
-
- Do this only for your own feature branches.
-
-There's an embarrassing typo in a commit you made? Or perhaps the you
-made several false starts you would like the posterity not to see.
-
-This can be done via *interactive rebasing*.
-
-Suppose that the commit history looks like this::
-
- git log --oneline
- eadc391 Fix some remaining bugs
- a815645 Modify it so that it works
- 2dec1ac Fix a few bugs + disable
- 13d7934 First implementation
- 6ad92e5 * masked is now an instance of a new object, MaskedConstant
- 29001ed Add pre-nep for a copule of structured_array_extensions.
- ...
-
-and ``6ad92e5`` is the last commit in the ``cool-feature`` branch. Suppose we
-want to make the following changes:
-
-* Rewrite the commit message for ``13d7934`` to something more sensible.
-* Combine the commits ``2dec1ac``, ``a815645``, ``eadc391`` into a single one.
-
-We do as follows::
-
- # make a backup of the current state
- git branch tmp HEAD
- # interactive rebase
- git rebase -i 6ad92e5
-
-This will open an editor with the following text in it::
-
- pick 13d7934 First implementation
- pick 2dec1ac Fix a few bugs + disable
- pick a815645 Modify it so that it works
- pick eadc391 Fix some remaining bugs
-
- # Rebase 6ad92e5..eadc391 onto 6ad92e5
- #
- # Commands:
- # p, pick = use commit
- # r, reword = use commit, but edit the commit message
- # e, edit = use commit, but stop for amending
- # s, squash = use commit, but meld into previous commit
- # f, fixup = like "squash", but discard this commit's log message
- #
- # If you remove a line here THAT COMMIT WILL BE LOST.
- # However, if you remove everything, the rebase will be aborted.
- #
-
-To achieve what we want, we will make the following changes to it::
-
- r 13d7934 First implementation
- pick 2dec1ac Fix a few bugs + disable
- f a815645 Modify it so that it works
- f eadc391 Fix some remaining bugs
-
-This means that (i) we want to edit the commit message for
-``13d7934``, and (ii) collapse the last three commits into one. Now we
-save and quit the editor.
-
-Git will then immediately bring up an editor for editing the commit
-message. After revising it, we get the output::
-
- [detached HEAD 721fc64] FOO: First implementation
- 2 files changed, 199 insertions(+), 66 deletions(-)
- [detached HEAD 0f22701] Fix a few bugs + disable
- 1 files changed, 79 insertions(+), 61 deletions(-)
- Successfully rebased and updated refs/heads/my-feature-branch.
-
-and the history looks now like this::
-
- 0f22701 Fix a few bugs + disable
- 721fc64 ENH: Sophisticated feature
- 6ad92e5 * masked is now an instance of a new object, MaskedConstant
-
-If it went wrong, recovery is again possible as explained :ref:`above
-`.
-
-.. include:: links.inc
diff --git a/doc/devel/gitwash/dot2_dot3.rst b/doc/devel/gitwash/dot2_dot3.rst
deleted file mode 100644
index 7759e2e60d68..000000000000
--- a/doc/devel/gitwash/dot2_dot3.rst
+++ /dev/null
@@ -1,28 +0,0 @@
-.. _dot2-dot3:
-
-========================================
- Two and three dots in difference specs
-========================================
-
-Thanks to Yarik Halchenko for this explanation.
-
-Imagine a series of commits A, B, C, D... Imagine that there are two
-branches, *topic* and *master*. You branched *topic* off *master* when
-*master* was at commit 'E'. The graph of the commits looks like this::
-
-
- A---B---C topic
- /
- D---E---F---G master
-
-Then::
-
- git diff master..topic
-
-will output the difference from G to C (i.e. with effects of F and G),
-while::
-
- git diff master...topic
-
-would output just differences in the topic branch (i.e. only A, B, and
-C).
diff --git a/doc/devel/gitwash/following_latest.rst b/doc/devel/gitwash/following_latest.rst
deleted file mode 100644
index 5c90f5b84446..000000000000
--- a/doc/devel/gitwash/following_latest.rst
+++ /dev/null
@@ -1,38 +0,0 @@
-.. highlight:: bash
-
-.. _following-latest:
-
-=============================
- Following the latest source
-=============================
-
-These are the instructions if you just want to follow the latest
-*Matplotlib* source, but you don't need to do any development for now.
-
-The steps are:
-
-* :ref:`install-git`
-* get local copy of the `Matplotlib github`_ git repository
-* update local copy from time to time
-
-Get the local copy of the code
-==============================
-
-From the command line::
-
- git clone https://github.com/matplotlib/matplotlib.git
-
-You now have a copy of the code tree in the new ``matplotlib`` directory.
-
-Updating the code
-=================
-
-From time to time you may want to pull down the latest code. Do this with::
-
- cd matplotlib
- git pull
-
-The tree in ``matplotlib`` will now have the latest changes from the initial
-repository.
-
-.. include:: links.inc
diff --git a/doc/devel/gitwash/forking_button.png b/doc/devel/gitwash/forking_button.png
deleted file mode 100644
index d0e04134d4d0..000000000000
Binary files a/doc/devel/gitwash/forking_button.png and /dev/null differ
diff --git a/doc/devel/gitwash/forking_hell.rst b/doc/devel/gitwash/forking_hell.rst
deleted file mode 100644
index b79e13400a62..000000000000
--- a/doc/devel/gitwash/forking_hell.rst
+++ /dev/null
@@ -1,34 +0,0 @@
-.. highlight:: bash
-
-.. _forking:
-
-======================================================
-Making your own copy (fork) of Matplotlib
-======================================================
-
-You need to do this only once. The instructions here are very similar
-to the instructions at https://help.github.com/forking/ |emdash| please see
-that page for more detail. We're repeating some of it here just to give the
-specifics for the `Matplotlib`_ project, and to suggest some default names.
-
-Set up and configure a github account
-=====================================
-
-If you don't have a github account, go to the github page, and make one.
-
-You then need to configure your account to allow write access |emdash| see
-the ``Generating SSH keys`` help on `github help`_.
-
-Create your own forked copy of `Matplotlib`_
-======================================================
-
-#. Log into your github account.
-#. Go to the `Matplotlib`_ github home at `Matplotlib github`_.
-#. Click on the *fork* button:
-
- .. image:: forking_button.png
-
- Now, after a short pause, you should find yourself at the home page for
- your own forked copy of `Matplotlib`_.
-
-.. include:: links.inc
diff --git a/doc/devel/gitwash/git_development.rst b/doc/devel/gitwash/git_development.rst
deleted file mode 100644
index c5b910d86342..000000000000
--- a/doc/devel/gitwash/git_development.rst
+++ /dev/null
@@ -1,16 +0,0 @@
-.. _git-development:
-
-=====================
- Git for development
-=====================
-
-Contents:
-
-.. toctree::
- :maxdepth: 2
-
- forking_hell
- set_up_fork
- configure_git
- development_workflow
- maintainer_workflow
diff --git a/doc/devel/gitwash/git_install.rst b/doc/devel/gitwash/git_install.rst
deleted file mode 100644
index 66eca8c29bde..000000000000
--- a/doc/devel/gitwash/git_install.rst
+++ /dev/null
@@ -1,28 +0,0 @@
-.. highlight:: bash
-
-.. _install-git:
-
-=============
- Install git
-=============
-
-Overview
-========
-
-================ =============
-Debian / Ubuntu ``sudo apt-get install git``
-Fedora ``sudo yum install git``
-Windows Download and install msysGit_
-OS X Use the git-osx-installer_
-================ =============
-
-In detail
-=========
-
-See the git page for the most recent information.
-
-Have a look at the github install help pages available from `github help`_
-
-There are good instructions here: https://git-scm.com/book/en/v2/Getting-Started-Installing-Git
-
-.. include:: links.inc
diff --git a/doc/devel/gitwash/git_intro.rst b/doc/devel/gitwash/git_intro.rst
deleted file mode 100644
index 1f89b7e9fb51..000000000000
--- a/doc/devel/gitwash/git_intro.rst
+++ /dev/null
@@ -1,20 +0,0 @@
-.. highlight:: bash
-
-==============
- Introduction
-==============
-
-These pages describe a git_ and github_ workflow for the `Matplotlib`_
-project.
-
-There are several different workflows here, for different ways of
-working with *Matplotlib*.
-
-This is not a comprehensive git reference, it's just a workflow for our
-own project. It's tailored to the github hosting service. You may well
-find better or quicker ways of getting stuff done with git, but these
-should get you started.
-
-For general resources for learning git, see :ref:`git-resources`.
-
-.. include:: links.inc
diff --git a/doc/devel/gitwash/git_links.inc b/doc/devel/gitwash/git_links.inc
deleted file mode 100644
index c26173367c9b..000000000000
--- a/doc/devel/gitwash/git_links.inc
+++ /dev/null
@@ -1,59 +0,0 @@
-.. This (-*- rst -*-) format file contains commonly used link targets
- and name substitutions. It may be included in many files,
- therefore it should only contain link targets and name
- substitutions. Try grepping for "^\.\. _" to find plausible
- candidates for this list.
-
-.. NOTE: reST targets are
- __not_case_sensitive__, so only one target definition is needed for
- nipy, NIPY, Nipy, etc...
-
-.. git stuff
-.. _git: https://git-scm.com/
-.. _github: https://github.com
-.. _github help: https://help.github.com
-.. _msysgit: https://git-scm.com/download/win
-.. _git-osx-installer: https://git-scm.com/download/mac
-.. _subversion: https://subversion.apache.org/
-.. _git cheat sheet: https://help.github.com/git-cheat-sheets/
-.. _pro git book: https://git-scm.com/book/en/v2
-.. _git svn crash course: https://git-scm.com/course/svn.html
-.. _network graph visualizer: https://github.com/blog/39-say-hello-to-the-network-graph-visualizer
-.. _git user manual: https://schacon.github.io/git/user-manual.html
-.. _git tutorial: https://schacon.github.io/git/gittutorial.html
-.. _git community book: https://git-scm.com/book/en/v2
-.. _git ready: http://gitready.com/
-.. _Fernando's git page: http://www.fperez.org/py4science/git.html
-.. _git magic: http://www-cs-students.stanford.edu/~blynn/gitmagic/index.html
-.. _git concepts: https://www.sbf5.com/~cduan/technical/git/
-.. _git clone: https://schacon.github.io/git/git-clone.html
-.. _git checkout: https://schacon.github.io/git/git-checkout.html
-.. _git commit: https://schacon.github.io/git/git-commit.html
-.. _git push: https://schacon.github.io/git/git-push.html
-.. _git pull: https://schacon.github.io/git/git-pull.html
-.. _git add: https://schacon.github.io/git/git-add.html
-.. _git status: https://schacon.github.io/git/git-status.html
-.. _git diff: https://schacon.github.io/git/git-diff.html
-.. _git log: https://schacon.github.io/git/git-log.html
-.. _git branch: https://schacon.github.io/git/git-branch.html
-.. _git remote: https://schacon.github.io/git/git-remote.html
-.. _git rebase: https://schacon.github.io/git/git-rebase.html
-.. _git config: https://schacon.github.io/git/git-config.html
-.. _why the -a flag?: http://gitready.com/beginner/2009/01/18/the-staging-area.html
-.. _git staging area: http://gitready.com/beginner/2009/01/18/the-staging-area.html
-.. _tangled working copy problem: http://2ndscale.com/rtomayko/2008/the-thing-about-git
-.. _git management: https://web.archive.org/web/20090224195437/http://kerneltrap.org/Linux/Git_Management
-.. _linux git workflow: https://www.mail-archive.com/dri-devel@lists.sourceforge.net/msg39091.html
-.. _git parable: http://tom.preston-werner.com/2009/05/19/the-git-parable.html
-.. _git foundation: https://matthew-brett.github.io/pydagogue/foundation.html
-.. _deleting master on github: https://matthew-brett.github.io/pydagogue/gh_delete_master.html
-.. _rebase without tears: https://matthew-brett.github.io/pydagogue/rebase_without_tears.html
-.. _resolving a merge: https://schacon.github.io/git/user-manual.html#resolving-a-merge
-.. _ipython git workflow: https://mail.python.org/pipermail/ipython-dev/2010-October/005632.html
-
-.. other stuff
-.. _python: https://www.python.org
-
-.. |emdash| unicode:: U+02014
-
-.. vim: ft=rst
diff --git a/doc/devel/gitwash/git_resources.rst b/doc/devel/gitwash/git_resources.rst
deleted file mode 100644
index 2787a575cc43..000000000000
--- a/doc/devel/gitwash/git_resources.rst
+++ /dev/null
@@ -1,59 +0,0 @@
-.. highlight:: bash
-
-.. _git-resources:
-
-=============
-git resources
-=============
-
-Tutorials and summaries
-=======================
-
-* `github help`_ has an excellent series of how-to guides.
-* The `pro git book`_ is a good in-depth book on git.
-* A `git cheat sheet`_ is a page giving summaries of common commands.
-* The `git user manual`_
-* The `git tutorial`_
-* The `git community book`_
-* `git ready`_ |emdash| a nice series of tutorials
-* `git magic`_ |emdash| extended introduction with intermediate detail
-* The `git parable`_ is an easy read explaining the concepts behind git.
-* `git foundation`_ expands on the `git parable`_.
-* Fernando Perez' git page |emdash| `Fernando's git page`_ |emdash| many
- links and tips
-* A good but technical page on `git concepts`_
-* `git svn crash course`_: git for those of us used to subversion_
-
-Advanced git workflow
-=====================
-
-There are many ways of working with git; here are some posts on the
-rules of thumb that other projects have come up with:
-
-* Linus Torvalds on `git management`_
-* Linus Torvalds on `linux git workflow`_ . Summary; use the git tools
- to make the history of your edits as clean as possible; merge from
- upstream edits as little as possible in branches where you are doing
- active development.
-
-Manual pages online
-===================
-
-You can get these on your own machine with (e.g) ``git help push`` or
-(same thing) ``git push --help``, but, for convenience, here are the
-online manual pages for some common commands:
-
-* `git add`_
-* `git branch`_
-* `git checkout`_
-* `git clone`_
-* `git commit`_
-* `git config`_
-* `git diff`_
-* `git log`_
-* `git pull`_
-* `git push`_
-* `git remote`_
-* `git status`_
-
-.. include:: links.inc
diff --git a/doc/devel/gitwash/index.rst b/doc/devel/gitwash/index.rst
deleted file mode 100644
index 9ee965d626ff..000000000000
--- a/doc/devel/gitwash/index.rst
+++ /dev/null
@@ -1,19 +0,0 @@
-.. _using-git:
-
-Working with *Matplotlib* source code
-================================================
-
-Contents:
-
-.. toctree::
- :maxdepth: 2
-
- git_intro
- git_install
- following_latest
- patching
- git_development
- git_resources
- dot2_dot3
-
-
diff --git a/doc/devel/gitwash/known_projects.inc b/doc/devel/gitwash/known_projects.inc
deleted file mode 100644
index 710abe08e477..000000000000
--- a/doc/devel/gitwash/known_projects.inc
+++ /dev/null
@@ -1,41 +0,0 @@
-.. Known projects
-
-.. PROJECTNAME placeholders
-.. _PROJECTNAME: http://nipy.org
-.. _`PROJECTNAME github`: https://github.com/nipy
-.. _`PROJECTNAME mailing list`: https://mail.python.org/mailman/listinfo/neuroimaging
-
-.. numpy
-.. _numpy: http://www.numpy.org
-.. _`numpy github`: https://github.com/numpy/numpy
-.. _`numpy mailing list`: https://mail.scipy.org/mailman/listinfo/numpy-discussion
-
-.. scipy
-.. _scipy: https://www.scipy.org
-.. _`scipy github`: https://github.com/scipy/scipy
-.. _`scipy mailing list`: https://mail.scipy.org/mailman/listinfo/scipy-dev
-
-.. nipy
-.. _nipy: http://nipy.org/nipy/
-.. _`nipy github`: https://github.com/nipy/nipy
-.. _`nipy mailing list`: https://mail.python.org/mailman/listinfo/neuroimaging
-
-.. ipython
-.. _ipython: https://ipython.org
-.. _`ipython github`: https://github.com/ipython/ipython
-.. _`ipython mailing list`: https://mail.scipy.org/mailman/listinfo/IPython-dev
-
-.. dipy
-.. _dipy: http://nipy.org/dipy/
-.. _`dipy github`: https://github.com/Garyfallidis/dipy
-.. _`dipy mailing list`: https://mail.python.org/mailman/listinfo/neuroimaging
-
-.. nibabel
-.. _nibabel: http://nipy.org/nibabel/
-.. _`nibabel github`: https://github.com/nipy/nibabel
-.. _`nibabel mailing list`: https://mail.python.org/mailman/listinfo/neuroimaging
-
-.. marsbar
-.. _marsbar: http://marsbar.sourceforge.net
-.. _`marsbar github`: https://github.com/matthew-brett/marsbar
-.. _`MarsBaR mailing list`: https://lists.sourceforge.net/lists/listinfo/marsbar-users
diff --git a/doc/devel/gitwash/links.inc b/doc/devel/gitwash/links.inc
deleted file mode 100644
index 20f4dcfffd4a..000000000000
--- a/doc/devel/gitwash/links.inc
+++ /dev/null
@@ -1,4 +0,0 @@
-.. compiling links file
-.. include:: known_projects.inc
-.. include:: this_project.inc
-.. include:: git_links.inc
diff --git a/doc/devel/gitwash/patching.rst b/doc/devel/gitwash/patching.rst
deleted file mode 100644
index aab5039c2fbc..000000000000
--- a/doc/devel/gitwash/patching.rst
+++ /dev/null
@@ -1,138 +0,0 @@
-.. highlight:: bash
-
-================
- Making a patch
-================
-
-You've discovered a bug or something else you want to change
-in `Matplotlib`_ .. |emdash| excellent!
-
-You've worked out a way to fix it |emdash| even better!
-
-You want to tell us about it |emdash| best of all!
-
-The easiest way is to make a *patch* or set of patches. Here
-we explain how. Making a patch is the simplest and quickest,
-but if you're going to be doing anything more than simple
-quick things, please consider following the
-:ref:`git-development` model instead.
-
-.. _making-patches:
-
-Making patches
-==============
-
-Overview
---------
-
-::
-
- # tell git who you are
- git config --global user.email you@yourdomain.example.com
- git config --global user.name "Your Name Comes Here"
- # get the repository if you don't have it
- git clone https://github.com/matplotlib/matplotlib.git
- # make a branch for your patching
- cd matplotlib
- git branch the-fix-im-thinking-of
- git checkout the-fix-im-thinking-of
- # hack, hack, hack
- # Tell git about any new files you've made
- git add somewhere/tests/test_my_bug.py
- # commit work in progress as you go
- git commit -am 'BF - added tests for Funny bug'
- # hack hack, hack
- git commit -am 'BF - added fix for Funny bug'
- # make the patch files
- git format-patch -M -C master
-
-Then, send the generated patch files to the `Matplotlib
-mailing list`_ |emdash| where we will thank you warmly.
-
-In detail
----------
-
-#. Tell git who you are so it can label the commits you've
- made::
-
- git config --global user.email you@yourdomain.example.com
- git config --global user.name "Your Name Comes Here"
-
-#. If you don't already have one, clone a copy of the
- `Matplotlib`_ repository::
-
- git clone https://github.com/matplotlib/matplotlib.git
- cd matplotlib
-
-#. Make a 'feature branch'. This will be where you work on
- your bug fix. It's nice and safe and leaves you with
- access to an unmodified copy of the code in the main
- branch::
-
- git branch the-fix-im-thinking-of
- git checkout the-fix-im-thinking-of
-
-#. Do some edits, and commit them as you go::
-
- # hack, hack, hack
- # Tell git about any new files you've made
- git add somewhere/tests/test_my_bug.py
- # commit work in progress as you go
- git commit -am 'BF - added tests for Funny bug'
- # hack hack, hack
- git commit -am 'BF - added fix for Funny bug'
-
- Note the ``-am`` options to ``commit``. The ``m`` flag just
- signals that you're going to type a message on the command
- line. The ``a`` flag |emdash| you can just take on faith |emdash|
- or see `why the -a flag?`_.
-
-#. When you have finished, check you have committed all your
- changes::
-
- git status
-
-#. Finally, make your commits into patches. You want all the
- commits since you branched from the ``master`` branch::
-
- git format-patch -M -C master
-
- You will now have several files named for the commits:
-
- .. code-block:: none
-
- 0001-BF-added-tests-for-Funny-bug.patch
- 0002-BF-added-fix-for-Funny-bug.patch
-
- Send these files to the `Matplotlib mailing list`_.
-
-When you are done, to switch back to the main copy of the
-code, just return to the ``master`` branch::
-
- git checkout master
-
-Moving from patching to development
-===================================
-
-If you find you have done some patches, and you have one or
-more feature branches, you will probably want to switch to
-development mode. You can do this with the repository you
-have.
-
-Fork the `Matplotlib`_ repository on github |emdash| :ref:`forking`.
-Then::
-
- # checkout and refresh master branch from main repo
- git checkout master
- git pull origin master
- # rename pointer to main repository to 'upstream'
- git remote rename origin upstream
- # point your repo to default read / write to your fork on github
- git remote add origin git@github.com:your-user-name/matplotlib.git
- # push up any branches you've made and want to keep
- git push origin the-fix-im-thinking-of
-
-Then you can, if you want, follow the
-:ref:`development-workflow`.
-
-.. include:: links.inc
diff --git a/doc/devel/gitwash/pull_button.png b/doc/devel/gitwash/pull_button.png
deleted file mode 100644
index e5031681b97b..000000000000
Binary files a/doc/devel/gitwash/pull_button.png and /dev/null differ
diff --git a/doc/devel/gitwash/set_up_fork.rst b/doc/devel/gitwash/set_up_fork.rst
deleted file mode 100644
index 205fdaafd947..000000000000
--- a/doc/devel/gitwash/set_up_fork.rst
+++ /dev/null
@@ -1,68 +0,0 @@
-.. highlight:: bash
-
-.. _set-up-fork:
-
-==================
- Set up your fork
-==================
-
-First you follow the instructions for :ref:`forking`.
-
-Overview
-========
-
-::
-
- git clone https://github.com/your-user-name/matplotlib.git
- cd matplotlib
- git remote add upstream https://github.com/matplotlib/matplotlib.git
-
-In detail
-=========
-
-Clone your fork
----------------
-
-#. Clone your fork to the local computer with ``git clone
- https://github.com/your-user-name/matplotlib.git``
-#. Investigate. Change directory to your new repo: ``cd matplotlib``. Then
- ``git branch -a`` to show you all branches. You'll get something
- like:
-
- .. code-block:: none
-
- * master
- remotes/origin/master
-
- This tells you that you are currently on the ``master`` branch, and
- that you also have a ``remote`` connection to ``origin/master``.
- What remote repository is ``remote/origin``? Try ``git remote -v`` to
- see the URLs for the remote. They will point to your github fork.
-
- Now you want to connect to the upstream `Matplotlib github`_ repository, so
- you can merge in changes from trunk.
-
-.. _linking-to-upstream:
-
-Linking your repository to the upstream repo
---------------------------------------------
-
-::
-
- cd matplotlib
- git remote add upstream https://github.com/matplotlib/matplotlib.git
-
-``upstream`` here is just the arbitrary name we're using to refer to the
-main `Matplotlib`_ repository at `Matplotlib github`_.
-
-Just for your own satisfaction, show yourself that you now have a new
-'remote', with ``git remote -v show``, giving you something like:
-
-.. code-block:: none
-
- upstream https://github.com/matplotlib/matplotlib.git (fetch)
- upstream https://github.com/matplotlib/matplotlib.git (push)
- origin https://github.com/your-user-name/matplotlib.git (fetch)
- origin https://github.com/your-user-name/matplotlib.git (push)
-
-.. include:: links.inc
diff --git a/doc/devel/gitwash/this_project.inc b/doc/devel/gitwash/this_project.inc
deleted file mode 100644
index e8863d5f78f0..000000000000
--- a/doc/devel/gitwash/this_project.inc
+++ /dev/null
@@ -1,5 +0,0 @@
-.. Matplotlib
-.. _`Matplotlib`: http://matplotlib.org
-.. _`Matplotlib github`: https://github.com/matplotlib/matplotlib
-
-.. _`Matplotlib mailing list`: https://mail.python.org/mailman/listinfo/matplotlib-devel
diff --git a/doc/devel/index.rst b/doc/devel/index.rst
index 60f5ef6ff267..e0fc978a6659 100644
--- a/doc/devel/index.rst
+++ b/doc/devel/index.rst
@@ -19,14 +19,37 @@ process or how to fix something feel free to ask on `gitter
`_ for short questions and on
`discourse `_ for longer questions.
-.. raw:: html
+.. rst-class:: sd-d-inline-block
-