diff --git a/doc/_static/zenodo_cache/8336761.svg b/doc/_static/zenodo_cache/8336761.svg
new file mode 100644
index 000000000000..24c222a8a5f5
--- /dev/null
+++ b/doc/_static/zenodo_cache/8336761.svg
@@ -0,0 +1,35 @@
+
\ No newline at end of file
diff --git a/doc/conf.py b/doc/conf.py
index 36130f255774..ab9821a1a086 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -11,12 +11,14 @@
# All configuration values have a default value; values that are commented out
# serve to show the default value.
+from datetime import datetime, timezone
import logging
import os
from pathlib import Path
import shutil
import subprocess
import sys
+import time
from urllib.parse import urlsplit, urlunsplit
import warnings
@@ -25,9 +27,6 @@
import matplotlib
-from datetime import timezone
-from datetime import datetime
-import time
# debug that building expected version
print(f"Building Documentation for Matplotlib: {matplotlib.__version__}")
diff --git a/doc/devel/testing.rst b/doc/devel/testing.rst
index 06296f5dc701..7a11c7c3eb18 100644
--- a/doc/devel/testing.rst
+++ b/doc/devel/testing.rst
@@ -122,6 +122,12 @@ case :file:`lib/matplotlib/tests/baseline_images/test_lines`). Put this new
file under source code revision control (with ``git add``). When rerunning
the tests, they should now pass.
+It is preferred that new tests use ``style='mpl20'`` as this leads to smaller
+figures and reflects the newer look of default Matplotlib plots. Also, if the
+texts (labels, tick labels, etc) are not really part of what is tested, use
+``remove_text=True`` as this will lead to smaller figures and reduce possible
+issues with font mismatch on different platforms.
+
Baseline images take a lot of space in the Matplotlib repository.
An alternative approach for image comparison tests is to use the
`~matplotlib.testing.decorators.check_figures_equal` decorator, which should be
@@ -130,11 +136,26 @@ images on the figures using two different methods (the tested method and the
baseline method). The decorator will arrange for setting up the figures and
then collect the drawn results and compare them.
-It is preferred that new tests use ``style='mpl20'`` as this leads to smaller
-figures and reflects the newer look of default Matplotlib plots. Also, if the
-texts (labels, tick labels, etc) are not really part of what is tested, use
-``remove_text=True`` as this will lead to smaller figures and reduce possible
-issues with font mismatch on different platforms.
+For example, this test compares two different methods to draw the same
+circle: plotting a circle using a `matplotlib.patches.Circle` patch
+vs plotting the circle using the parametric equation of a circle ::
+
+ from matplotlib.testing.decorators import check_figures_equal
+ import matplotib.patches as mpatches
+ import matplotlib.pyplot as plt
+ import numpy as np
+
+ @check_figures_equal(extensions=['png'], tol=100)
+ def test_parametric_circle_plot(fig_test, fig_ref):
+ red_circle_ref = mpatches.Circle((0, 0), 0.2, color='r', clip_on=False)
+ fig_ref.add_artist(red_circle_ref)
+ theta = np.linspace(0, 2 * np.pi, 150)
+ radius = 0.4
+ fig_test.plot(radius * np.cos(theta), radius * np.sin(theta), color='r')
+
+Both comparison decorators have a tolerance argument ``tol`` that is used to specify the
+tolerance for difference in color value between the two images, where 255 is the maximal
+difference. The test fails if the average pixel difference is greater than this value.
See the documentation of `~matplotlib.testing.decorators.image_comparison` and
`~matplotlib.testing.decorators.check_figures_equal` for additional information
diff --git a/doc/users/prev_whats_new/github_stats_3.7.3.rst b/doc/users/prev_whats_new/github_stats_3.7.3.rst
new file mode 100644
index 000000000000..bb43c1a8395e
--- /dev/null
+++ b/doc/users/prev_whats_new/github_stats_3.7.3.rst
@@ -0,0 +1,101 @@
+.. _github-stats-3-7-3:
+
+GitHub statistics for 3.7.3 (Sep 11, 2023)
+==========================================
+
+GitHub statistics for 2023/07/05 (tag: v3.7.2) - 2023/09/11
+
+These lists are automatically generated, and may be incomplete or contain duplicates.
+
+We closed 14 issues and merged 48 pull requests.
+The full list can be seen `on GitHub `__
+
+The following 17 authors contributed 130 commits.
+
+* amiraflak
+* Amirreza Aflakparast
+* dependabot[bot]
+* Elliott Sales de Andrade
+* Greg Lucas
+* hannah
+* Haoying Zhang
+* Jody Klymak
+* Kritika Verma
+* Kyle Sunden
+* marbled-toast
+* Mateusz Sokół
+* Matthew Feickert
+* Oscar Gustafsson
+* Ruth Comer
+* Thomas A Caswell
+* Tim Hoffmann
+
+GitHub issues and pull requests:
+
+Pull Requests (48):
+
+* :ghpull:`26725`: Backport PR #26719 on branch v3.7.x (Fix issue with missing attribute in Path3DCollection)
+* :ghpull:`26723`: Backport PR #26721 on branch v3.7.x (Add a Python 3.12 classifier)
+* :ghpull:`26719`: Fix issue with missing attribute in Path3DCollection
+* :ghpull:`26721`: Add a Python 3.12 classifier
+* :ghpull:`26672`: Backport cibuildwheel updates to v3.7.x
+* :ghpull:`26706`: Pin NumPy below v2 for 3.7.x
+* :ghpull:`26653`: Backport PR #26597 on branch v3.7.x (Squeeze post-converted values when validating limits)
+* :ghpull:`26597`: Squeeze post-converted values when validating limits
+* :ghpull:`26582`: MNT: Enable wheels for Python 3.12
+* :ghpull:`26616`: Backport PR #26598 on branch v3.7.x (FIX: array labelcolor for Tick)
+* :ghpull:`26598`: FIX: array labelcolor for Tick
+* :ghpull:`26610`: Backport PR #26538 on branch v3.7.x (Resolves #26421 Added an example for fig comparison decorator)
+* :ghpull:`26538`: Resolves #26421 Added an example for fig comparison decorator
+* :ghpull:`26574`: Backport PR #26571 on branch v3.7.x ([Doc]: match 3D plot types with others)
+* :ghpull:`26571`: [Doc]: match 3D plot types with others
+* :ghpull:`26570`: Backport PR #26569 on branch v3.7.x (refactor: constant "ncols" to variables)
+* :ghpull:`26569`: refactor: constant "ncols" to variables
+* :ghpull:`26555`: Backport PR #26554 on branch v3.7.x (Remove NumPy abs overrides from pylab)
+* :ghpull:`26552`: Backport PR #26493: Disable ````add_html_cache_busting```` on Sphinx 7.1+
+* :ghpull:`26554`: Remove NumPy abs overrides from pylab
+* :ghpull:`26549`: Backport PR #26545 on branch v3.7.x (Fix size inferral when using cairocffi)
+* :ghpull:`26545`: Fix size inferral when using cairocffi
+* :ghpull:`26544`: Backport PR #26532: Fix input check in Poly3DCollection.__init__
+* :ghpull:`26532`: Fix input check in Poly3DCollection.__init__
+* :ghpull:`26459`: Backport PR #26458 on branch v3.7.x (Remove soon to be deprecated nan/inf aliases)
+* :ghpull:`26458`: Remove soon to be deprecated nan/inf aliases
+* :ghpull:`26455`: Backport PR #26452 on branch v3.7.x (ENH: Update numpy exceptions imports)
+* :ghpull:`26452`: ENH: Update numpy exceptions imports
+* :ghpull:`26439`: Backport PR #26436 on branch v3.7.x (DOC: Add a warning that ticks are not persistent)
+* :ghpull:`26432`: Backport PR #26431 on branch v3.7.x (MNT: Unpin pyparsing, xfail error message tests for pyparsing 3.1.0)
+* :ghpull:`26436`: DOC: Add a warning that ticks are not persistent
+* :ghpull:`26428`: Merge branch v3.7.2-doc into v3.7.x
+* :ghpull:`26431`: MNT: Unpin pyparsing, xfail error message tests for pyparsing 3.1.0
+* :ghpull:`26412`: Backport PR #26405 on branch v3.7.x (DOC: Clarify the difference between document and section references)
+* :ghpull:`26390`: Backport PR #26354 on branch v3.7.x (DOC: contourf antialiased default)
+* :ghpull:`26354`: DOC: contourf antialiased default
+* :ghpull:`26386`: Backport PR #26370 on branch v3.7.x (Update README.txt )
+* :ghpull:`26364`: Backport PR #26361 on branch v3.7.x (LIC: Update the license we bundle the colorbrewer colormap data with)
+* :ghpull:`26361`: LIC: Update the license we bundle the colorbrewer colormap data with
+* :ghpull:`26322`: Backport PR #26321 on branch v3.7.x (remove quote box from font_manager)
+* :ghpull:`26318`: Backport PR #26317 on branch v3.7.x (update the doc string for fancyarrowpatch to link to annotate)
+* :ghpull:`26317`: update the doc string for fancyarrowpatch to link to annotate
+* :ghpull:`26304`: Backport PR #26300 on branch v3.7.x (FIX: do not warn when calling tight_layout multiple times)
+* :ghpull:`26300`: FIX: do not warn when calling tight_layout multiple times
+* :ghpull:`26301`: Backport PR #26291 on branch v3.7.x (Get correct renderer for axes_grid1 inset axes with bbox_inches=tight)
+* :ghpull:`26298`: Backport PR #26195 on branch v3.7.x ([Doc] link style sheets reference to customization tutorial)
+* :ghpull:`26291`: Get correct renderer for axes_grid1 inset axes with bbox_inches=tight
+* :ghpull:`26267`: Backport PR #26266 on branch v3.7.x (DOC: Use consistent font for anatomy example)
+
+Issues (14):
+
+* :ghissue:`26732`: [ENH]: Parser errors should mention that commands do not exist
+* :ghissue:`26497`: [Bug]: AttributeError: 'Path3DCollection' object has no attribute '_offset_zordered' (possible regression)
+* :ghissue:`26588`: [Bug]: Tick class instantiation returns an error when labelcolor is a tuple
+* :ghissue:`26421`: [Doc]: demo testing comparison decorator
+* :ghissue:`26486`: [Doc]: match 3D plot types listings titles to other titles
+* :ghissue:`26560`: [Doc]: ncols parameter hard-coded
+* :ghissue:`26553`: [TST] Upcoming dependency test failures
+* :ghissue:`26523`: [Bug]: backend_cairo set_context() is broken for cairocffi
+* :ghissue:`26420`: Typo in Poly3DCollection constructor
+* :ghissue:`26152`: [Bug]: Pyparsing 3.1 breaks tests
+* :ghissue:`26336`: [Doc]: GPL compatibility
+* :ghissue:`19721`: head size of FancyArrowPatch is "invisibly small" by default
+* :ghissue:`26290`: [Bug]: calling fig.tight_layout multiple times
+* :ghissue:`26287`: [Bug]: Error while creating inset axes using ``mpl_toolkits.axes_grid1.inset_locator.inset_axes``
diff --git a/doc/users/project/citing.rst b/doc/users/project/citing.rst
index 66a829a1eb67..03917f41342e 100644
--- a/doc/users/project/citing.rst
+++ b/doc/users/project/citing.rst
@@ -29,6 +29,9 @@ By version
.. START OF AUTOGENERATED
+v3.7.3
+ .. image:: ../../_static/zenodo_cache/8336761.svg
+ :target: https://doi.org/10.5281/zenodo.8336761
v3.7.2
.. image:: ../../_static/zenodo_cache/8118151.svg
:target: https://doi.org/10.5281/zenodo.8118151
diff --git a/doc/users/release_notes.rst b/doc/users/release_notes.rst
index b2abd3ae79fe..15f6199ea68f 100644
--- a/doc/users/release_notes.rst
+++ b/doc/users/release_notes.rst
@@ -12,6 +12,13 @@ Release notes
.. include:: release_notes_next.rst
+Version 3.8
+===========
+.. toctree::
+ :maxdepth: 1
+
+ github_stats.rst
+
Version 3.7
===========
.. toctree::
@@ -19,7 +26,8 @@ Version 3.7
prev_whats_new/whats_new_3.7.0.rst
../api/prev_api_changes/api_changes_3.7.0.rst
- github_stats.rst
+ prev_whats_new/github_stats_3.7.3.rst
+ prev_whats_new/github_stats_3.7.2.rst
prev_whats_new/github_stats_3.7.1.rst
prev_whats_new/github_stats_3.7.0.rst
diff --git a/galleries/examples/color/named_colors.py b/galleries/examples/color/named_colors.py
index c6cba68ab434..0181e0f06742 100644
--- a/galleries/examples/color/named_colors.py
+++ b/galleries/examples/color/named_colors.py
@@ -42,14 +42,14 @@ def plot_colortable(colors, *, ncols=4, sort_colors=True):
n = len(names)
nrows = math.ceil(n / ncols)
- width = cell_width * 4 + 2 * margin
+ width = cell_width * ncols + 2 * margin
height = cell_height * nrows + 2 * margin
dpi = 72
fig, ax = plt.subplots(figsize=(width / dpi, height / dpi), dpi=dpi)
fig.subplots_adjust(margin/width, margin/height,
(width-margin)/width, (height-margin)/height)
- ax.set_xlim(0, cell_width * 4)
+ ax.set_xlim(0, cell_width * ncols)
ax.set_ylim(cell_height * (nrows-0.5), -cell_height/2.)
ax.yaxis.set_visible(False)
ax.xaxis.set_visible(False)
diff --git a/galleries/plot_types/3D/scatter3d_simple.py b/galleries/plot_types/3D/scatter3d_simple.py
index 023a46448ccf..27ffb6abf748 100644
--- a/galleries/plot_types/3D/scatter3d_simple.py
+++ b/galleries/plot_types/3D/scatter3d_simple.py
@@ -1,7 +1,7 @@
"""
-==============
-3D scatterplot
-==============
+===================
+scatter(xs, ys, zs)
+===================
See `~mpl_toolkits.mplot3d.axes3d.Axes3D.scatter`.
"""
diff --git a/galleries/plot_types/3D/surface3d_simple.py b/galleries/plot_types/3D/surface3d_simple.py
index b421469b821d..04f74d5edd14 100644
--- a/galleries/plot_types/3D/surface3d_simple.py
+++ b/galleries/plot_types/3D/surface3d_simple.py
@@ -1,6 +1,6 @@
"""
=====================
-3D surface
+plot_surface(X, Y, Z)
=====================
See `~mpl_toolkits.mplot3d.axes3d.Axes3D.plot_surface`.
diff --git a/galleries/plot_types/3D/trisurf3d_simple.py b/galleries/plot_types/3D/trisurf3d_simple.py
index 6bf3dc0835d5..b32bd3ebc69a 100644
--- a/galleries/plot_types/3D/trisurf3d_simple.py
+++ b/galleries/plot_types/3D/trisurf3d_simple.py
@@ -1,7 +1,7 @@
"""
-======================
-Triangular 3D surfaces
-======================
+=====================
+plot_trisurf(x, y, z)
+=====================
See `~mpl_toolkits.mplot3d.axes3d.Axes3D.plot_trisurf`.
"""
diff --git a/galleries/plot_types/3D/voxels_simple.py b/galleries/plot_types/3D/voxels_simple.py
index c3473e108969..05ce238b0935 100644
--- a/galleries/plot_types/3D/voxels_simple.py
+++ b/galleries/plot_types/3D/voxels_simple.py
@@ -1,7 +1,7 @@
"""
-==========================
-3D voxel / volumetric plot
-==========================
+=========================
+voxels([x, y, z], filled)
+=========================
See `~mpl_toolkits.mplot3d.axes3d.Axes3D.voxels`.
"""
diff --git a/galleries/plot_types/3D/wire3d_simple.py b/galleries/plot_types/3D/wire3d_simple.py
index 8ce1a460617e..1ab847f3ecf4 100644
--- a/galleries/plot_types/3D/wire3d_simple.py
+++ b/galleries/plot_types/3D/wire3d_simple.py
@@ -1,7 +1,7 @@
"""
-=================
-3D wireframe plot
-=================
+=======================
+plot_wireframe(X, Y, Z)
+=======================
See `~mpl_toolkits.mplot3d.axes3d.Axes3D.plot_wireframe`.
"""
diff --git a/setup.py b/setup.py
index e9c5df01eb68..a876f6e35065 100644
--- a/setup.py
+++ b/setup.py
@@ -333,7 +333,7 @@ def make_release_tree(self, base_dir, files):
"cycler>=0.10",
"fonttools>=4.22.0",
"kiwisolver>=1.0.1",
- "numpy>=1.21",
+ "numpy>=1.21,<2",
"packaging>=20.0",
"pillow>=6.2.0",
"pyparsing>=2.3.1",
diff --git a/tools/cache_zenodo_svg.py b/tools/cache_zenodo_svg.py
index 7d7a51280133..9179655e8638 100644
--- a/tools/cache_zenodo_svg.py
+++ b/tools/cache_zenodo_svg.py
@@ -63,6 +63,7 @@ def _get_xdg_cache_dir():
if __name__ == "__main__":
data = {
+ "v3.7.3": "8336761",
"v3.7.2": "8118151",
"v3.7.1": "7697899",
"v3.7.0": "7637593",