From 3b85ba4365c8eaa172d0a92c9d3ecc2d51693c42 Mon Sep 17 00:00:00 2001 From: Kyle Sunden Date: Fri, 9 May 2025 12:23:58 -0500 Subject: [PATCH 01/23] Zenodo v3.10.3 --- doc/_static/zenodo_cache/14940554.svg | 35 +++++++++++++++++++++++++++ doc/_static/zenodo_cache/15375714.svg | 35 +++++++++++++++++++++++++++ doc/project/citing.rst | 6 +++++ tools/cache_zenodo_svg.py | 2 ++ 4 files changed, 78 insertions(+) create mode 100644 doc/_static/zenodo_cache/14940554.svg create mode 100644 doc/_static/zenodo_cache/15375714.svg diff --git a/doc/_static/zenodo_cache/14940554.svg b/doc/_static/zenodo_cache/14940554.svg new file mode 100644 index 000000000000..6e7d5c37bf7b --- /dev/null +++ b/doc/_static/zenodo_cache/14940554.svg @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + DOI + + + DOI + + + 10.5281/zenodo.14940554 + + + 10.5281/zenodo.14940554 + + + \ No newline at end of file diff --git a/doc/_static/zenodo_cache/15375714.svg b/doc/_static/zenodo_cache/15375714.svg new file mode 100644 index 000000000000..d5e403138561 --- /dev/null +++ b/doc/_static/zenodo_cache/15375714.svg @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + DOI + + + DOI + + + 10.5281/zenodo.15375714 + + + 10.5281/zenodo.15375714 + + + \ No newline at end of file diff --git a/doc/project/citing.rst b/doc/project/citing.rst index 2cd317906bb5..8b4c323229ca 100644 --- a/doc/project/citing.rst +++ b/doc/project/citing.rst @@ -32,6 +32,12 @@ By version .. START OF AUTOGENERATED +v3.10.3 + .. image:: ../_static/zenodo_cache/15375714.svg + :target: https://doi.org/10.5281/zenodo.15375714 +v3.10.1 + .. image:: ../_static/zenodo_cache/14940554.svg + :target: https://doi.org/10.5281/zenodo.14940554 v3.10.0 .. image:: ../_static/zenodo_cache/14464227.svg :target: https://doi.org/10.5281/zenodo.14464227 diff --git a/tools/cache_zenodo_svg.py b/tools/cache_zenodo_svg.py index 3be7d6ca21e4..229e90efeb34 100644 --- a/tools/cache_zenodo_svg.py +++ b/tools/cache_zenodo_svg.py @@ -63,6 +63,8 @@ def _get_xdg_cache_dir(): if __name__ == "__main__": data = { + "v3.10.3": "15375714", + "v3.10.1": "14940554", "v3.10.0": "14464227", "v3.9.4": "14436121", "v3.9.3": "14249941", From d3c77afde1e3fd6948d15ae730d0cebfe25fd6fe Mon Sep 17 00:00:00 2001 From: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com> Date: Fri, 9 May 2025 22:46:21 +0200 Subject: [PATCH 02/23] Backport PR #30029: Update diagram in subplots_adjust documentation to clarify parameters --- doc/_embedded_plots/figure_subplots_adjust.py | 38 +++++++++++-------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/doc/_embedded_plots/figure_subplots_adjust.py b/doc/_embedded_plots/figure_subplots_adjust.py index b4b8d7d32a3d..6f99a3febcdc 100644 --- a/doc/_embedded_plots/figure_subplots_adjust.py +++ b/doc/_embedded_plots/figure_subplots_adjust.py @@ -1,28 +1,34 @@ import matplotlib.pyplot as plt -def arrow(p1, p2, **props): - axs[0, 0].annotate( - "", p1, p2, xycoords='figure fraction', - arrowprops=dict(arrowstyle="<->", shrinkA=0, shrinkB=0, **props)) - - fig, axs = plt.subplots(2, 2, figsize=(6.5, 4)) fig.set_facecolor('lightblue') fig.subplots_adjust(0.1, 0.1, 0.9, 0.9, 0.4, 0.4) + +overlay = fig.add_axes([0, 0, 1, 1], zorder=100) +overlay.axis("off") +xycoords='figure fraction' +arrowprops=dict(arrowstyle="<->", shrinkA=0, shrinkB=0) + for ax in axs.flat: ax.set(xticks=[], yticks=[]) -arrow((0, 0.75), (0.1, 0.75)) # left -arrow((0.435, 0.75), (0.565, 0.75)) # wspace -arrow((0.9, 0.75), (1, 0.75)) # right +overlay.annotate("", (0, 0.75), (0.1, 0.75), + xycoords=xycoords, arrowprops=arrowprops) # left +overlay.annotate("", (0.435, 0.25), (0.565, 0.25), + xycoords=xycoords, arrowprops=arrowprops) # wspace +overlay.annotate("", (0, 0.8), (0.9, 0.8), + xycoords=xycoords, arrowprops=arrowprops) # right fig.text(0.05, 0.7, "left", ha="center") -fig.text(0.5, 0.7, "wspace", ha="center") -fig.text(0.95, 0.7, "right", ha="center") +fig.text(0.5, 0.3, "wspace", ha="center") +fig.text(0.05, 0.83, "right", ha="center") -arrow((0.25, 0), (0.25, 0.1)) # bottom -arrow((0.25, 0.435), (0.25, 0.565)) # hspace -arrow((0.25, 0.9), (0.25, 1)) # top -fig.text(0.28, 0.05, "bottom", va="center") +overlay.annotate("", (0.75, 0), (0.75, 0.1), + xycoords=xycoords, arrowprops=arrowprops) # bottom +overlay.annotate("", (0.25, 0.435), (0.25, 0.565), + xycoords=xycoords, arrowprops=arrowprops) # hspace +overlay.annotate("", (0.8, 0), (0.8, 0.9), + xycoords=xycoords, arrowprops=arrowprops) # top +fig.text(0.65, 0.05, "bottom", va="center") fig.text(0.28, 0.5, "hspace", va="center") -fig.text(0.28, 0.95, "top", va="center") +fig.text(0.82, 0.05, "top", va="center") From b81427cabae98716eda5d27134a882682754de26 Mon Sep 17 00:00:00 2001 From: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com> Date: Fri, 9 May 2025 23:06:22 +0200 Subject: [PATCH 03/23] Update doc/_embedded_plots/figure_subplots_adjust.py Fix flake8 --- doc/_embedded_plots/figure_subplots_adjust.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/_embedded_plots/figure_subplots_adjust.py b/doc/_embedded_plots/figure_subplots_adjust.py index 6f99a3febcdc..d32a029fe05d 100644 --- a/doc/_embedded_plots/figure_subplots_adjust.py +++ b/doc/_embedded_plots/figure_subplots_adjust.py @@ -7,8 +7,8 @@ overlay = fig.add_axes([0, 0, 1, 1], zorder=100) overlay.axis("off") -xycoords='figure fraction' -arrowprops=dict(arrowstyle="<->", shrinkA=0, shrinkB=0) +xycoords = 'figure fraction' +arrowprops = dict(arrowstyle="<->", shrinkA=0, shrinkB=0) for ax in axs.flat: ax.set(xticks=[], yticks=[]) From e188484b9ccacbda63c401fe925e93a10d73eac8 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Wed, 4 Jun 2025 16:11:33 -0400 Subject: [PATCH 04/23] Backport PR #30118: CI: Skip jobs on forks --- .github/workflows/cibuildwheel.yml | 38 +++++++++++++++------------ .github/workflows/codeql-analysis.yml | 1 + .github/workflows/conflictcheck.yml | 1 + 3 files changed, 23 insertions(+), 17 deletions(-) diff --git a/.github/workflows/cibuildwheel.yml b/.github/workflows/cibuildwheel.yml index 79d770d0c8f4..3eddbb402e6a 100644 --- a/.github/workflows/cibuildwheel.yml +++ b/.github/workflows/cibuildwheel.yml @@ -24,14 +24,16 @@ permissions: jobs: build_sdist: if: >- - github.event_name == 'push' || - github.event_name == 'pull_request' && ( - ( - github.event.action == 'labeled' && - github.event.label.name == 'CI: Run cibuildwheel' - ) || - contains(github.event.pull_request.labels.*.name, - 'CI: Run cibuildwheel') + github.repository == 'matplotlib/matplotlib' && ( + github.event_name == 'push' || + github.event_name == 'pull_request' && ( + ( + github.event.action == 'labeled' && + github.event.label.name == 'CI: Run cibuildwheel' + ) || + contains(github.event.pull_request.labels.*.name, + 'CI: Run cibuildwheel') + ) ) name: Build sdist runs-on: ubuntu-latest @@ -78,14 +80,16 @@ jobs: build_wheels: if: >- - github.event_name == 'push' || - github.event_name == 'pull_request' && ( - ( - github.event.action == 'labeled' && - github.event.label.name == 'CI: Run cibuildwheel' - ) || - contains(github.event.pull_request.labels.*.name, - 'CI: Run cibuildwheel') + github.repository == 'matplotlib/matplotlib' && ( + github.event_name == 'push' || + github.event_name == 'pull_request' && ( + ( + github.event.action == 'labeled' && + github.event.label.name == 'CI: Run cibuildwheel' + ) || + contains(github.event.pull_request.labels.*.name, + 'CI: Run cibuildwheel') + ) ) needs: build_sdist name: Build wheels on ${{ matrix.os }} for ${{ matrix.cibw_archs }} @@ -188,7 +192,7 @@ jobs: if-no-files-found: error publish: - if: github.event_name == 'push' && github.ref_type == 'tag' + if: github.repository == 'matplotlib/matplotlib' && github.event_name == 'push' && github.ref_type == 'tag' name: Upload release to PyPI needs: [build_sdist, build_wheels] runs-on: ubuntu-latest diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 089b15700f1b..7a15de609834 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -12,6 +12,7 @@ on: jobs: analyze: + if: github.repository == 'matplotlib/matplotlib' name: Analyze runs-on: ubuntu-latest permissions: diff --git a/.github/workflows/conflictcheck.yml b/.github/workflows/conflictcheck.yml index b018101f325c..c9aa036004e7 100644 --- a/.github/workflows/conflictcheck.yml +++ b/.github/workflows/conflictcheck.yml @@ -11,6 +11,7 @@ on: jobs: main: + if: github.repository == 'matplotlib/matplotlib' runs-on: ubuntu-latest permissions: pull-requests: write From 5bdbb3ad9d982f58174f0ae10323364760ece24e Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Fri, 30 May 2025 01:50:50 -0400 Subject: [PATCH 05/23] Backport PR #30119: Add some types to _mathtext.py --- lib/matplotlib/_mathtext.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/matplotlib/_mathtext.py b/lib/matplotlib/_mathtext.py index 7085a986414e..9e20ea3da9b7 100644 --- a/lib/matplotlib/_mathtext.py +++ b/lib/matplotlib/_mathtext.py @@ -2521,10 +2521,10 @@ def subsuper(self, s: str, loc: int, toks: ParseResults) -> T.Any: if len(new_children): # remove last kern if (isinstance(new_children[-1], Kern) and - hasattr(new_children[-2], '_metrics')): + isinstance(new_children[-2], Char)): new_children = new_children[:-1] last_char = new_children[-1] - if hasattr(last_char, '_metrics'): + if isinstance(last_char, Char): last_char.width = last_char._metrics.advance # create new Hlist without kerning nucleus = Hlist(new_children, do_kern=False) @@ -2600,7 +2600,7 @@ def subsuper(self, s: str, loc: int, toks: ParseResults) -> T.Any: # Do we need to add a space after the nucleus? # To find out, check the flag set by operatorname - spaced_nucleus = [nucleus, x] + spaced_nucleus: list[Node] = [nucleus, x] if self._in_subscript_or_superscript: spaced_nucleus += [self._make_space(self._space_widths[r'\,'])] self._in_subscript_or_superscript = False From 3950d996236581bf7d53f29ffd7fc33434687552 Mon Sep 17 00:00:00 2001 From: Jody Klymak Date: Thu, 19 Jun 2025 15:09:33 -0700 Subject: [PATCH 06/23] Backport PR #30180: DOC: expand polar example --- .../pie_and_polar_charts/polar_demo.py | 26 +++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/galleries/examples/pie_and_polar_charts/polar_demo.py b/galleries/examples/pie_and_polar_charts/polar_demo.py index e4967079d19d..909fea094be5 100644 --- a/galleries/examples/pie_and_polar_charts/polar_demo.py +++ b/galleries/examples/pie_and_polar_charts/polar_demo.py @@ -4,6 +4,11 @@ ========== Demo of a line plot on a polar axis. + +The second plot shows the same data, but with the radial axis starting at r=1 +and the angular axis starting at 0 degrees and ending at 225 degrees. Setting +the origin of the radial axis to 0 allows the radial ticks to be placed at the +same location as the first plot. """ import matplotlib.pyplot as plt import numpy as np @@ -11,14 +16,29 @@ r = np.arange(0, 2, 0.01) theta = 2 * np.pi * r -fig, ax = plt.subplots(subplot_kw={'projection': 'polar'}) +fig, axs = plt.subplots(2, 1, figsize=(5, 8), subplot_kw={'projection': 'polar'}, + layout='constrained') +ax = axs[0] ax.plot(theta, r) ax.set_rmax(2) -ax.set_rticks([0.5, 1, 1.5, 2]) # Less radial ticks +ax.set_rticks([0.5, 1, 1.5, 2]) # Fewer radial ticks ax.set_rlabel_position(-22.5) # Move radial labels away from plotted line ax.grid(True) ax.set_title("A line plot on a polar axis", va='bottom') + +ax = axs[1] +ax.plot(theta, r) +ax.set_rmax(2) +ax.set_rmin(1) # Change the radial axis to only go from 1 to 2 +ax.set_rorigin(0) # Set the origin of the radial axis to 0 +ax.set_thetamin(0) +ax.set_thetamax(225) +ax.set_rticks([1, 1.5, 2]) # Fewer radial ticks +ax.set_rlabel_position(-22.5) # Move radial labels away from plotted line + +ax.grid(True) +ax.set_title("Same plot, but with reduced axis limits", va='bottom') plt.show() # %% @@ -32,6 +52,8 @@ # - `matplotlib.projections.polar` # - `matplotlib.projections.polar.PolarAxes` # - `matplotlib.projections.polar.PolarAxes.set_rticks` +# - `matplotlib.projections.polar.PolarAxes.set_rmin` +# - `matplotlib.projections.polar.PolarAxes.set_rorigin` # - `matplotlib.projections.polar.PolarAxes.set_rmax` # - `matplotlib.projections.polar.PolarAxes.set_rlabel_position` # From 96512fd4835d61e037974944b355edcc131b5f46 Mon Sep 17 00:00:00 2001 From: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com> Date: Wed, 25 Jun 2025 09:08:40 +0200 Subject: [PATCH 07/23] Backport PR #30212: [Doc]: fix bug in release notes for matplotlib v3.5.0 and v3.7.0 --- doc/api/prev_api_changes/api_changes_3.5.0/deprecations.rst | 2 +- doc/api/prev_api_changes/api_changes_3.7.0/removals.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 d10da55a97f8..742a18f04072 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 @@ -282,7 +282,7 @@ Miscellaneous deprecations - The *format* parameter of ``dviread.find_tex_file`` is deprecated (with no replacement). - ``FancyArrowPatch.get_path_in_displaycoord`` and - ``ConnectionPath.get_path_in_displaycoord`` are deprecated. The path in + ``ConnectionPatch.get_path_in_displaycoord`` are deprecated. 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 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 index 03239be31057..56b3ad5c253e 100644 --- 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 @@ -323,7 +323,7 @@ Miscellaneous removals - 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 + ``ConnectionPatch.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 From b1226396211d5280dcecf55929f2df3fd62cc8a0 Mon Sep 17 00:00:00 2001 From: Jody Klymak Date: Wed, 2 Jul 2025 07:40:25 -0700 Subject: [PATCH 08/23] Backport PR #30244: DOC: Recommend to use bare Figure instances for saving to file --- doc/users/faq.rst | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/doc/users/faq.rst b/doc/users/faq.rst index 592fff551099..87a1af03d96e 100644 --- a/doc/users/faq.rst +++ b/doc/users/faq.rst @@ -281,8 +281,23 @@ locators as desired because the two axes are independent. Generate images without having a window appear ---------------------------------------------- -Simply do not call `~matplotlib.pyplot.show`, and directly save the figure to -the desired format:: +The recommended approach since matplotlib 3.1 is to explicitly create a Figure +instance:: + + from matplotlib.figure import Figure + fig = Figure() + ax = fig.subplots() + ax.plot([1, 2, 3]) + fig.savefig('myfig.png') + +This prevents any interaction with GUI frameworks and the window manager. + +It's alternatively still possible to use the pyplot interface. Instead of +calling `matplotlib.pyplot.show`, call `matplotlib.pyplot.savefig`. + +Additionally, you must ensure to close the figure after saving it. Not +closing the figure is a memory leak, because pyplot keeps references +to all not-yet-shown figures:: import matplotlib.pyplot as plt plt.plot([1, 2, 3]) From 74d8632fa71aadc21037de776284e26aa4c2351d Mon Sep 17 00:00:00 2001 From: hannah Date: Fri, 11 Jul 2025 14:11:06 -0400 Subject: [PATCH 09/23] Backport PR #30289: DOC: Fix build with pybind11 3 --- doc/missing-references.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/missing-references.json b/doc/missing-references.json index 1a816d19f7cd..e3b23db6fbc8 100644 --- a/doc/missing-references.json +++ b/doc/missing-references.json @@ -261,8 +261,12 @@ "doc/api/_as_gen/mpl_toolkits.axisartist.floating_axes.rst:32::1" ], "numpy.float64": [ + "doc/docstring of matplotlib.ft2font.pybind11_detail_function_record_v1_system_libstdcpp_gxx_abi_1xxx_use_cxx11_abi_1.set_text:1", "doc/docstring of matplotlib.ft2font.PyCapsule.set_text:1" ], + "numpy.typing.NDArray": [ + "doc/docstring of matplotlib.ft2font.pybind11_detail_function_record_v1_system_libstdcpp_gxx_abi_1xxx_use_cxx11_abi_1.set_text:1" + ], "numpy.uint8": [ ":1" ] From b17b0623880de7b44d4b9625b34b7af33582846c Mon Sep 17 00:00:00 2001 From: Kyle Sunden Date: Thu, 31 Jul 2025 14:05:00 -0500 Subject: [PATCH 10/23] Zenodo v3.10.5 --- doc/_static/zenodo_cache/16644850.svg | 35 +++++++++++++++++++++++++++ doc/project/citing.rst | 3 +++ tools/cache_zenodo_svg.py | 1 + 3 files changed, 39 insertions(+) create mode 100644 doc/_static/zenodo_cache/16644850.svg diff --git a/doc/_static/zenodo_cache/16644850.svg b/doc/_static/zenodo_cache/16644850.svg new file mode 100644 index 000000000000..89910032da4e --- /dev/null +++ b/doc/_static/zenodo_cache/16644850.svg @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + DOI + + + DOI + + + 10.5281/zenodo.16644850 + + + 10.5281/zenodo.16644850 + + + \ No newline at end of file diff --git a/doc/project/citing.rst b/doc/project/citing.rst index 8b4c323229ca..249f568625db 100644 --- a/doc/project/citing.rst +++ b/doc/project/citing.rst @@ -32,6 +32,9 @@ By version .. START OF AUTOGENERATED +v3.10.5 + .. image:: ../_static/zenodo_cache/16644850.svg + :target: https://doi.org/10.5281/zenodo.16644850 v3.10.3 .. image:: ../_static/zenodo_cache/15375714.svg :target: https://doi.org/10.5281/zenodo.15375714 diff --git a/tools/cache_zenodo_svg.py b/tools/cache_zenodo_svg.py index 229e90efeb34..59d6fce55162 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.10.5": "16644850", "v3.10.3": "15375714", "v3.10.1": "14940554", "v3.10.0": "14464227", From e44495f9f940adc5003795386c70675595908262 Mon Sep 17 00:00:00 2001 From: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com> Date: Sun, 24 Aug 2025 08:26:54 +0200 Subject: [PATCH 11/23] Backport PR #30451: doc: factor out quick install tab for reuse --- doc/index.rst | 55 +++-------------------------- doc/install/index.rst | 7 +++- doc/install/quick_install.inc.rst | 54 ++++++++++++++++++++++++++++ doc/users/getting_started/index.rst | 21 +---------- 4 files changed, 65 insertions(+), 72 deletions(-) create mode 100644 doc/install/quick_install.inc.rst diff --git a/doc/index.rst b/doc/index.rst index 74a183d6cd7b..c5b25b6d37aa 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -14,59 +14,12 @@ and interactive visualizations. Install ======= -.. tab-set:: - :class: sd-width-content-min +.. include:: install/quick_install.inc.rst - .. tab-item:: pip +.. toctree:: + :hidden: - .. code-block:: bash - - pip install matplotlib - - .. tab-item:: conda - - .. code-block:: bash - - conda install -c conda-forge matplotlib - - .. tab-item:: pixi - - .. code-block:: bash - - pixi add matplotlib - - .. tab-item:: uv - - .. code-block:: bash - - uv add matplotlib - - .. warning:: - - If you install Python with ``uv`` then the ``tkagg`` backend - will not be available because python-build-standalone (used by uv - to distribute Python) does not contain tk bindings that are usable by - Matplotlib (see `this issue`_ for details). If you want Matplotlib - to be able to display plots in a window, you should install one of - the other :ref:`supported GUI frameworks `, - e.g. - - .. code-block:: bash - - uv add matplotlib pyside6 - - .. _this issue: https://github.com/astral-sh/uv/issues/6893#issuecomment-2565965851 - - .. tab-item:: other - - .. rst-class:: section-toc - .. toctree:: - :maxdepth: 2 - - install/index - -For more detailed instructions, see the -:doc:`installation guide `. + install/index Learn ===== diff --git a/doc/install/index.rst b/doc/install/index.rst index 2d9e724e6a73..eb5e02f98868 100644 --- a/doc/install/index.rst +++ b/doc/install/index.rst @@ -5,6 +5,9 @@ Installation ************ +.. include:: quick_install.inc.rst + +.. _install-official: Install an official release =========================== @@ -35,6 +38,7 @@ precompiled wheel for your OS and Python. animations and a larger selection of file formats, you can install :ref:`optional dependencies `. +.. _install-third-party: Third-party distributions ========================= @@ -81,7 +85,7 @@ you can install Matplotlib via your package manager, e.g.: .. redirect-from:: /users/installing/installing_source -.. _install_from_source: +.. _install-nightly-build: Install a nightly build ======================= @@ -101,6 +105,7 @@ scientific-python-nightly-wheels as the package index to query: --extra-index-url https://pypi.org/simple \ matplotlib +.. _install-source: Install from source =================== diff --git a/doc/install/quick_install.inc.rst b/doc/install/quick_install.inc.rst new file mode 100644 index 000000000000..2e75b332f6ed --- /dev/null +++ b/doc/install/quick_install.inc.rst @@ -0,0 +1,54 @@ +.. set of quick install commands for reuse across docs + +.. tab-set:: + :class: sd-width-content-min + + .. tab-item:: pip + + .. code-block:: bash + + pip install matplotlib + + .. tab-item:: conda + + .. code-block:: bash + + conda install -c conda-forge matplotlib + + .. tab-item:: pixi + + .. code-block:: bash + + pixi add matplotlib + + .. tab-item:: uv + + .. code-block:: bash + + uv add matplotlib + + .. warning:: + + If you install Python with ``uv`` then the ``tkagg`` backend + will not be available because python-build-standalone (used by uv + to distribute Python) does not contain tk bindings that are usable by + Matplotlib (see `this issue`_ for details). If you want Matplotlib + to be able to display plots in a window, you should install one of + the other :ref:`supported GUI frameworks `, + e.g. + + .. code-block:: bash + + uv add matplotlib pyside6 + + .. _this issue: https://github.com/astral-sh/uv/issues/6893#issuecomment-2565965851 + + .. tab-item:: other + + :ref:`install-official` + + :ref:`install-third-party` + + :ref:`install-nightly-build` + + :ref:`install-source` diff --git a/doc/users/getting_started/index.rst b/doc/users/getting_started/index.rst index ac896687979d..dfbbd615b5cd 100644 --- a/doc/users/getting_started/index.rst +++ b/doc/users/getting_started/index.rst @@ -4,26 +4,7 @@ Getting started Installation quick-start ------------------------ -.. grid:: 1 1 2 2 - - .. grid-item:: - - Install using `pip `__: - - .. code-block:: bash - - pip install matplotlib - - .. grid-item:: - - Install using `conda `__: - - .. code-block:: bash - - conda install -c conda-forge matplotlib - -Further details are available in the :doc:`Installation Guide `. - +.. include:: /install/quick_install.inc.rst Draw a first plot ----------------- From 3305482033e63ac1d7cce4418407d11164aea612 Mon Sep 17 00:00:00 2001 From: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com> Date: Sun, 24 Aug 2025 08:26:54 +0200 Subject: [PATCH 12/23] Backport PR #30451: doc: factor out quick install tab for reuse --- doc/index.rst | 55 +++-------------------------- doc/install/index.rst | 7 +++- doc/install/quick_install.inc.rst | 54 ++++++++++++++++++++++++++++ doc/users/getting_started/index.rst | 21 +---------- 4 files changed, 65 insertions(+), 72 deletions(-) create mode 100644 doc/install/quick_install.inc.rst diff --git a/doc/index.rst b/doc/index.rst index 74a183d6cd7b..c5b25b6d37aa 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -14,59 +14,12 @@ and interactive visualizations. Install ======= -.. tab-set:: - :class: sd-width-content-min +.. include:: install/quick_install.inc.rst - .. tab-item:: pip +.. toctree:: + :hidden: - .. code-block:: bash - - pip install matplotlib - - .. tab-item:: conda - - .. code-block:: bash - - conda install -c conda-forge matplotlib - - .. tab-item:: pixi - - .. code-block:: bash - - pixi add matplotlib - - .. tab-item:: uv - - .. code-block:: bash - - uv add matplotlib - - .. warning:: - - If you install Python with ``uv`` then the ``tkagg`` backend - will not be available because python-build-standalone (used by uv - to distribute Python) does not contain tk bindings that are usable by - Matplotlib (see `this issue`_ for details). If you want Matplotlib - to be able to display plots in a window, you should install one of - the other :ref:`supported GUI frameworks `, - e.g. - - .. code-block:: bash - - uv add matplotlib pyside6 - - .. _this issue: https://github.com/astral-sh/uv/issues/6893#issuecomment-2565965851 - - .. tab-item:: other - - .. rst-class:: section-toc - .. toctree:: - :maxdepth: 2 - - install/index - -For more detailed instructions, see the -:doc:`installation guide `. + install/index Learn ===== diff --git a/doc/install/index.rst b/doc/install/index.rst index 2d9e724e6a73..eb5e02f98868 100644 --- a/doc/install/index.rst +++ b/doc/install/index.rst @@ -5,6 +5,9 @@ Installation ************ +.. include:: quick_install.inc.rst + +.. _install-official: Install an official release =========================== @@ -35,6 +38,7 @@ precompiled wheel for your OS and Python. animations and a larger selection of file formats, you can install :ref:`optional dependencies `. +.. _install-third-party: Third-party distributions ========================= @@ -81,7 +85,7 @@ you can install Matplotlib via your package manager, e.g.: .. redirect-from:: /users/installing/installing_source -.. _install_from_source: +.. _install-nightly-build: Install a nightly build ======================= @@ -101,6 +105,7 @@ scientific-python-nightly-wheels as the package index to query: --extra-index-url https://pypi.org/simple \ matplotlib +.. _install-source: Install from source =================== diff --git a/doc/install/quick_install.inc.rst b/doc/install/quick_install.inc.rst new file mode 100644 index 000000000000..2e75b332f6ed --- /dev/null +++ b/doc/install/quick_install.inc.rst @@ -0,0 +1,54 @@ +.. set of quick install commands for reuse across docs + +.. tab-set:: + :class: sd-width-content-min + + .. tab-item:: pip + + .. code-block:: bash + + pip install matplotlib + + .. tab-item:: conda + + .. code-block:: bash + + conda install -c conda-forge matplotlib + + .. tab-item:: pixi + + .. code-block:: bash + + pixi add matplotlib + + .. tab-item:: uv + + .. code-block:: bash + + uv add matplotlib + + .. warning:: + + If you install Python with ``uv`` then the ``tkagg`` backend + will not be available because python-build-standalone (used by uv + to distribute Python) does not contain tk bindings that are usable by + Matplotlib (see `this issue`_ for details). If you want Matplotlib + to be able to display plots in a window, you should install one of + the other :ref:`supported GUI frameworks `, + e.g. + + .. code-block:: bash + + uv add matplotlib pyside6 + + .. _this issue: https://github.com/astral-sh/uv/issues/6893#issuecomment-2565965851 + + .. tab-item:: other + + :ref:`install-official` + + :ref:`install-third-party` + + :ref:`install-nightly-build` + + :ref:`install-source` diff --git a/doc/users/getting_started/index.rst b/doc/users/getting_started/index.rst index ac896687979d..dfbbd615b5cd 100644 --- a/doc/users/getting_started/index.rst +++ b/doc/users/getting_started/index.rst @@ -4,26 +4,7 @@ Getting started Installation quick-start ------------------------ -.. grid:: 1 1 2 2 - - .. grid-item:: - - Install using `pip `__: - - .. code-block:: bash - - pip install matplotlib - - .. grid-item:: - - Install using `conda `__: - - .. code-block:: bash - - conda install -c conda-forge matplotlib - -Further details are available in the :doc:`Installation Guide `. - +.. include:: /install/quick_install.inc.rst Draw a first plot ----------------- From f25ceed326766d8824d2474d6125f2b6537ed18a Mon Sep 17 00:00:00 2001 From: Ian Thomas Date: Wed, 27 Aug 2025 08:57:57 +0100 Subject: [PATCH 13/23] Backport PR #30476: ci: Remove cibuildwheel override for win_arm64/Py3.14 --- .github/workflows/cibuildwheel.yml | 4 ---- pyproject.toml | 8 -------- 2 files changed, 12 deletions(-) diff --git a/.github/workflows/cibuildwheel.yml b/.github/workflows/cibuildwheel.yml index 4284f7037e1a..c72ab67fd43c 100644 --- a/.github/workflows/cibuildwheel.yml +++ b/.github/workflows/cibuildwheel.yml @@ -151,10 +151,6 @@ jobs: CIBW_ENABLE: "cpython-freethreading cpython-prerelease" CIBW_ARCHS: ${{ matrix.cibw_archs }} CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28 - CIBW_BEFORE_TEST: >- - python -m pip install - --index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple - --upgrade --pre --only-binary=:all: contourpy numpy pillow - name: Build wheels for CPython 3.13 uses: pypa/cibuildwheel@95d2f3a92fbf80abe066b09418bbf128a8923df2 # v3.0.1 diff --git a/pyproject.toml b/pyproject.toml index 5666016f0508..e6d1abaf530b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -85,14 +85,6 @@ local_scheme = "node-and-date" parentdir_prefix_version = "matplotlib-" fallback_version = "0.0+UNKNOWN" -# FIXME: Remove this override once dependencies are available on PyPI. -[[tool.cibuildwheel.overrides]] -select = "*-win_arm64" -before-test = """\ - pip install --pre \ - --index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple \ - contourpy numpy""" - [tool.isort] known_pydata = "numpy, matplotlib.pyplot" known_firstparty = "matplotlib,mpl_toolkits" From e1e13605fd5dc7fea6589a19b9884db48498ceef Mon Sep 17 00:00:00 2001 From: Kyle Sunden Date: Thu, 28 Aug 2025 13:30:11 -0500 Subject: [PATCH 14/23] Backport PR #30394: ENH: Gracefully handle python-build-standalone ImportError with Tk --- lib/matplotlib/backends/_backend_tk.py | 32 ++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/lib/matplotlib/backends/_backend_tk.py b/lib/matplotlib/backends/_backend_tk.py index eaf868fd8bec..813e0c60620f 100644 --- a/lib/matplotlib/backends/_backend_tk.py +++ b/lib/matplotlib/backends/_backend_tk.py @@ -22,8 +22,36 @@ TimerBase, ToolContainerBase, cursors, _Mode, MouseButton, CloseEvent, KeyEvent, LocationEvent, MouseEvent, ResizeEvent) from matplotlib._pylab_helpers import Gcf -from . import _tkagg -from ._tkagg import TK_PHOTO_COMPOSITE_OVERLAY, TK_PHOTO_COMPOSITE_SET + +try: + from . import _tkagg + from ._tkagg import TK_PHOTO_COMPOSITE_OVERLAY, TK_PHOTO_COMPOSITE_SET +except ImportError as e: + # catch incompatibility of python-build-standalone with Tk + cause1 = getattr(e, '__cause__', None) + cause2 = getattr(cause1, '__cause__', None) + if (isinstance(cause1, ImportError) and + isinstance(cause2, AttributeError) and + "'_tkinter' has no attribute '__file__'" in str(cause2)): + + is_uv_python = "/uv/python" in (os.path.realpath(sys.executable)) + if is_uv_python: + raise ImportError( + "Failed to import tkagg backend. You appear to be using an outdated " + "version of uv's managed Python distribution which is not compatible " + "with Tk. Please upgrade to the latest uv version, then update " + "Python with: `uv python upgrade --reinstall`" + ) from e + else: + raise ImportError( + "Failed to import tkagg backend. This is likely caused by using a " + "Python executable based on python-build-standalone, which is not " + "compatible with Tk. Recent versions of python-build-standalone " + "should be compatible with Tk. Please update your python version " + "or select another backend." + ) from e + else: + raise _log = logging.getLogger(__name__) From a55b817f019c0b2a6550fa8d255a821605651ed7 Mon Sep 17 00:00:00 2001 From: Kyle Sunden Date: Fri, 29 Aug 2025 15:20:22 -0500 Subject: [PATCH 15/23] Backport PR #30484: FIX: be more cautious about checking widget size --- lib/matplotlib/backends/backend_qt.py | 2 +- requirements/testing/all.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/matplotlib/backends/backend_qt.py b/lib/matplotlib/backends/backend_qt.py index dd614e516de5..d0aded5fff63 100644 --- a/lib/matplotlib/backends/backend_qt.py +++ b/lib/matplotlib/backends/backend_qt.py @@ -517,7 +517,7 @@ def _draw_idle(self): if not self._draw_pending: return self._draw_pending = False - if self.height() <= 0 or self.width() <= 0: + if _isdeleted(self) or self.height() <= 0 or self.width() <= 0: return try: self.draw() diff --git a/requirements/testing/all.txt b/requirements/testing/all.txt index e386924a9b67..a41073bdf47e 100644 --- a/requirements/testing/all.txt +++ b/requirements/testing/all.txt @@ -6,7 +6,7 @@ coverage!=6.3 psutil pytest!=4.6.0,!=5.4.0,!=8.1.0 pytest-cov -pytest-rerunfailures +pytest-rerunfailures!=16.0 pytest-timeout pytest-xdist pytest-xvfb From 4b794954750f7a1218c9d0c032ec30ba7a6088e6 Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Fri, 29 Aug 2025 17:30:11 -0400 Subject: [PATCH 16/23] Backport PR #30486: doc: Update warnings about python-build-standalone --- doc/install/index.rst | 19 ++++++++++++++----- doc/install/quick_install.inc.rst | 17 ++++++++--------- 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/doc/install/index.rst b/doc/install/index.rst index eb5e02f98868..429e4bdaf60d 100644 --- a/doc/install/index.rst +++ b/doc/install/index.rst @@ -28,11 +28,20 @@ precompiled wheel for your OS and Python. .. note:: - The following backends work out of the box: Agg, ps, pdf, svg - - Python is typically shipped with tk bindings which are used by - TkAgg. Notably, python-build-standalone – used by ``uv`` – does - not include tk bindings that are usable by Matplotlib. + The following non-interactive backends work out of the box: Agg, + ps, pdf, svg + + The TkAgg interactive backend also typically works out of the box. + It requires Tk bindings, which are usually provided via the Python + standard library's ``tkinter`` module. On some OSes, you may need + to install a separate package like ``python3-tk`` to add this + component of the standard library. + + Some tools like ``uv`` make use of Python builds from the + python-build-standalone project, which only gained usable Tk + bindings recently (August 2025). If you are having trouble with the + TkAgg backend, ensure you have an up-to-date build, e.g. ``uv self + update && uv python upgrade --reinstall``. For support of other GUI frameworks, LaTeX rendering, saving animations and a larger selection of file formats, you can diff --git a/doc/install/quick_install.inc.rst b/doc/install/quick_install.inc.rst index 2e75b332f6ed..0604a3c8fe75 100644 --- a/doc/install/quick_install.inc.rst +++ b/doc/install/quick_install.inc.rst @@ -29,20 +29,19 @@ .. warning:: - If you install Python with ``uv`` then the ``tkagg`` backend - will not be available because python-build-standalone (used by uv - to distribute Python) does not contain tk bindings that are usable by - Matplotlib (see `this issue`_ for details). If you want Matplotlib - to be able to display plots in a window, you should install one of - the other :ref:`supported GUI frameworks `, - e.g. + uv usually installs its own versions of Python from the + python-build-standalone project, and only recent versions of those + Python builds (August 2025) work properly with the ``tkagg`` backend + for displaying plots in a window. Please make sure you are using uv + 0.8.7 or newer (update with e.g. ``uv self update``) and that your + bundled Python installs are up to date (with ``uv python upgrade + --reinstall``). Alternatively, you can use one of the other + :ref:`supported GUI frameworks `, e.g. .. code-block:: bash uv add matplotlib pyside6 - .. _this issue: https://github.com/astral-sh/uv/issues/6893#issuecomment-2565965851 - .. tab-item:: other :ref:`install-official` From 25a97fd721edeee7ef2916cdbb79e050187f3d11 Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Fri, 29 Aug 2025 17:30:11 -0400 Subject: [PATCH 17/23] Backport PR #30486: doc: Update warnings about python-build-standalone --- doc/install/index.rst | 19 ++++++++++++++----- doc/install/quick_install.inc.rst | 17 ++++++++--------- 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/doc/install/index.rst b/doc/install/index.rst index eb5e02f98868..429e4bdaf60d 100644 --- a/doc/install/index.rst +++ b/doc/install/index.rst @@ -28,11 +28,20 @@ precompiled wheel for your OS and Python. .. note:: - The following backends work out of the box: Agg, ps, pdf, svg - - Python is typically shipped with tk bindings which are used by - TkAgg. Notably, python-build-standalone – used by ``uv`` – does - not include tk bindings that are usable by Matplotlib. + The following non-interactive backends work out of the box: Agg, + ps, pdf, svg + + The TkAgg interactive backend also typically works out of the box. + It requires Tk bindings, which are usually provided via the Python + standard library's ``tkinter`` module. On some OSes, you may need + to install a separate package like ``python3-tk`` to add this + component of the standard library. + + Some tools like ``uv`` make use of Python builds from the + python-build-standalone project, which only gained usable Tk + bindings recently (August 2025). If you are having trouble with the + TkAgg backend, ensure you have an up-to-date build, e.g. ``uv self + update && uv python upgrade --reinstall``. For support of other GUI frameworks, LaTeX rendering, saving animations and a larger selection of file formats, you can diff --git a/doc/install/quick_install.inc.rst b/doc/install/quick_install.inc.rst index 2e75b332f6ed..0604a3c8fe75 100644 --- a/doc/install/quick_install.inc.rst +++ b/doc/install/quick_install.inc.rst @@ -29,20 +29,19 @@ .. warning:: - If you install Python with ``uv`` then the ``tkagg`` backend - will not be available because python-build-standalone (used by uv - to distribute Python) does not contain tk bindings that are usable by - Matplotlib (see `this issue`_ for details). If you want Matplotlib - to be able to display plots in a window, you should install one of - the other :ref:`supported GUI frameworks `, - e.g. + uv usually installs its own versions of Python from the + python-build-standalone project, and only recent versions of those + Python builds (August 2025) work properly with the ``tkagg`` backend + for displaying plots in a window. Please make sure you are using uv + 0.8.7 or newer (update with e.g. ``uv self update``) and that your + bundled Python installs are up to date (with ``uv python upgrade + --reinstall``). Alternatively, you can use one of the other + :ref:`supported GUI frameworks `, e.g. .. code-block:: bash uv add matplotlib pyside6 - .. _this issue: https://github.com/astral-sh/uv/issues/6893#issuecomment-2565965851 - .. tab-item:: other :ref:`install-official` From d3365af7e461b3c4bebb0351a06809ad503a3db9 Mon Sep 17 00:00:00 2001 From: Kyle Sunden Date: Fri, 29 Aug 2025 18:05:48 -0500 Subject: [PATCH 18/23] Github stats v3.10.6 --- doc/users/github_stats.rst | 130 ++++------------ .../prev_whats_new/github_stats_3.10.5.rst | 142 ++++++++++++++++++ 2 files changed, 174 insertions(+), 98 deletions(-) create mode 100644 doc/users/prev_whats_new/github_stats_3.10.5.rst diff --git a/doc/users/github_stats.rst b/doc/users/github_stats.rst index e28b39088994..84c2cc5867fd 100644 --- a/doc/users/github_stats.rst +++ b/doc/users/github_stats.rst @@ -1,33 +1,29 @@ .. _github-stats: -GitHub statistics for 3.10.5 (Jul 31, 2025) +GitHub statistics for 3.10.6 (Aug 29, 2025) =========================================== -GitHub statistics for 2024/12/14 (tag: v3.10.0) - 2025/07/31 +GitHub statistics for 2024/12/14 (tag: v3.10.0) - 2025/08/29 These lists are automatically generated, and may be incomplete or contain duplicates. -We closed 18 issues and merged 67 pull requests. -The full list can be seen `on GitHub `__ +We closed 4 issues and merged 19 pull requests. +The full list can be seen `on GitHub `__ -The following 36 authors contributed 371 commits. +The following 31 authors contributed 380 commits. +* Alan Burlot * Antony Lee -* Brian Christian -* chrisjbillington * Christine P. Chai -* Clément Robert * David Stansby * dependabot[bot] +* Doron Behar * Elliott Sales de Andrade * G.D. McBain * Greg Lucas * hannah * hu-xiaonan * Ian Thomas -* ianlv -* IdiotCoffee -* Ines Cachola * Inês Cachola * Jody Klymak * Jouni K. Seppänen @@ -41,7 +37,6 @@ The following 36 authors contributed 371 commits. * Qian Zhang * Raphael Erik Hviding * Roman -* Roman A * Ruth Comer * saikarna913 * Scott Shambaugh @@ -51,95 +46,34 @@ The following 36 authors contributed 371 commits. GitHub issues and pull requests: -Pull Requests (67): +Pull Requests (19): -* :ghpull:`30357`: CIBW updates: fix pypy sections, update cibw version -* :ghpull:`30356`: Manual Backport PR #30195 on branch v3.10.x (ci: Enable wheel builds on Python 3.14) -* :ghpull:`30352`: Backport PR #28554 on branch v3.10.x (BLD: Enable wheels on Windows-on-ARM) -* :ghpull:`30353`: Backport PR #30345 on branch v3.10.x (qt: Use better devicePixelRatio event to refresh scaling) -* :ghpull:`30350`: Backport PR #30344 on branch v3.10.x (Support fractional HiDPI in GTK4 backend) -* :ghpull:`30277`: Backport PR #30271 on branch v3.10.x (Reduce pause time in interactive timer test) -* :ghpull:`30351`: Backport PR #30327 on branch v3.10.x (FIX Update Axes limits from Axes.add_collection(... autolim=True)) -* :ghpull:`30345`: qt: Use better devicePixelRatio event to refresh scaling -* :ghpull:`28554`: BLD: Enable wheels on Windows-on-ARM -* :ghpull:`30292`: Backport PR #30237: Add explicit ``**options: Any`` for ``add_subplot`` m… -* :ghpull:`29935`: Backport PR #29908 on branch v3.10.x (TST: Use text placeholders for empty legends) -* :ghpull:`30327`: FIX Update Axes limits from Axes.add_collection(... autolim=True) -* :ghpull:`30344`: Support fractional HiDPI in GTK4 backend -* :ghpull:`30326`: Backport PR #30321 on branch v3.10.x (Fix type annotation for Axes.get_legend() to include None) -* :ghpull:`30321`: Fix type annotation for Axes.get_legend() to include None -* :ghpull:`30287`: Backport PR #30286 on branch v3.10.x (Fix whitespace in _axes.py error message) -* :ghpull:`30288`: Backport PR #30283 on branch v3.10.x (changed the FAQ link to point to the correct path) -* :ghpull:`30293`: Backport PR #30289 on branch v3.10.x (DOC: Fix build with pybind11 3) -* :ghpull:`30283`: changed the FAQ link to point to the correct path -* :ghpull:`30286`: Fix whitespace in _axes.py error message -* :ghpull:`30271`: Reduce pause time in interactive timer test -* :ghpull:`30269`: Backport PR #30186 on branch v3.10.x (Fix figure legend when drawing stackplots) -* :ghpull:`30186`: Fix figure legend when drawing stackplots -* :ghpull:`30268`: Backport PR #30233 on branch v3.10.x (Check that stem input is 1D) -* :ghpull:`30233`: Check that stem input is 1D -* :ghpull:`30259`: Backport PR #30256 on branch v3.10.x (Time out in _get_executable_info) -* :ghpull:`30256`: Time out in _get_executable_info -* :ghpull:`30237`: Add explicit ``**options: Any`` for ``add_subplot`` method -* :ghpull:`30253`: Backport PR #30243 on branch v3.10.x (Fix FancyArrow rendering for zero-length arrows) -* :ghpull:`30243`: Fix FancyArrow rendering for zero-length arrows -* :ghpull:`30250`: Backport PR #30244 on branch v3.10.x (DOC: Recommend to use bare Figure instances for saving to file) -* :ghpull:`30247`: Backport PR #30246 on branch v3.10.x (chore: remove redundant words in comment) -* :ghpull:`30246`: chore: remove redundant words in comment -* :ghpull:`30240`: Backport PR #30236 on branch v3.10.x (Copy-edit the docstring of AuxTransformBox.) -* :ghpull:`30236`: Copy-edit the docstring of AuxTransformBox. -* :ghpull:`30234`: Backport PR #30209 on branch v3.10.x (Clean up Qt socket notifier to avoid spurious interrupt handler calls) -* :ghpull:`30209`: Clean up Qt socket notifier to avoid spurious interrupt handler calls -* :ghpull:`30195`: ci: Enable wheel builds on Python 3.14 -* :ghpull:`30229`: Backport PR #30221 on branch v3.10.x (BUG: fix future incompatibility with Pillow 13) -* :ghpull:`30221`: BUG: fix future incompatibility with Pillow 13 -* :ghpull:`30228`: Backport PR #30098 on branch v3.10.x (Fix label_outer in the presence of colorbars.) -* :ghpull:`30227`: Backport PR #30223 on branch v3.10.x (Polar log scale: fix inner patch boundary and spine location) -* :ghpull:`30098`: Fix label_outer in the presence of colorbars. -* :ghpull:`30223`: Polar log scale: fix inner patch boundary and spine location -* :ghpull:`30217`: Backport PR #30198 on branch v3.10.x (Implement Path.__deepcopy__ avoiding infinite recursion) -* :ghpull:`30198`: Implement Path.__deepcopy__ avoiding infinite recursion -* :ghpull:`30213`: Backport PR #30212 on branch v3.10.x ([Doc]: fix bug in release notes for matplotlib v3.5.0 and v3.7.0) -* :ghpull:`30189`: Backport PR #30180 on branch v3.10.x (DOC: expand polar example) -* :ghpull:`30167`: Backport PR #30162 on branch v3.10.x (TST: Fix runtime error checking NaN input to format_cursor_data) -* :ghpull:`30162`: TST: Fix runtime error checking NaN input to format_cursor_data -* :ghpull:`30146`: Backport PR #30144 on branch v3.10.x (js: Fix externally-controlled format strings) -* :ghpull:`30144`: js: Fix externally-controlled format strings -* :ghpull:`30140`: Backport PR #30118 on branch v3.10.x (CI: Skip jobs on forks) -* :ghpull:`30120`: Backport PR #30114 on branch v3.10.x (Fix _is_tensorflow_array.) -* :ghpull:`30122`: Backport PR #30119 on branch v3.10.x (Add some types to _mathtext.py) -* :ghpull:`30119`: Add some types to _mathtext.py -* :ghpull:`30114`: Fix _is_tensorflow_array. -* :ghpull:`30106`: Backport PR #30089 on branch v3.10.x (FIX: fix submerged margins algorithm being applied twice) -* :ghpull:`30089`: FIX: fix submerged margins algorithm being applied twice -* :ghpull:`30101`: Backport PR #30096 on branch v3.10.x (Fix OffsetBox custom picker) -* :ghpull:`30096`: Fix OffsetBox custom picker -* :ghpull:`30081`: Backport PR #30079 on branch v3.10.x (FIX: cast legend handles to list) -* :ghpull:`30079`: FIX: cast legend handles to list -* :ghpull:`30057`: Backport PR #29895 on branch v3.10.x (The 'lines.markeredgecolor' now doesn't interfere on the color of errorbar caps)" -* :ghpull:`29895`: The 'lines.markeredgecolor' now doesn't interfere on the color of errorbar caps -* :ghpull:`30033`: Backport PR #30029 on branch v3.10.x (Update diagram in subplots_adjust documentation to clarify parameters) +* :ghpull:`30487`: Backport PR #30484 on branch v3.10.x (FIX: be more cautious about checking widget size) +* :ghpull:`30484`: FIX: be more cautious about checking widget size +* :ghpull:`30481`: Backport PR #30394 on branch v3.10.x (ENH: Gracefully handle python-build-standalone ImportError with Tk) +* :ghpull:`30477`: Backport PR #30476 on branch v3.10.x (ci: Remove cibuildwheel override for win_arm64/Py3.14) +* :ghpull:`30394`: ENH: Gracefully handle python-build-standalone ImportError with Tk +* :ghpull:`30476`: ci: Remove cibuildwheel override for win_arm64/Py3.14 +* :ghpull:`30461`: Backport PR #30451 on branch v3.10.x (doc: factor out quick install tab for reuse) +* :ghpull:`30448`: Backport PR #30412 on branch v3.10.x ({Check,Radio}Buttons: Improve docs of label_props) +* :ghpull:`30412`: {Check,Radio}Buttons: Improve docs of label_props +* :ghpull:`30445`: Backport PR #30444 on branch v3.10.x (Small correction of a typo in the galleries: axis instead of axes) +* :ghpull:`30444`: Small correction of a typo in the galleries: axis instead of axes +* :ghpull:`30430`: Backport PR #30426 on branch v3.10.x (Fix a race condition in TexManager.make_dvi.) +* :ghpull:`30434`: Backport PR #30426: Fix a race condition in TexManager.make_dvi & make_png. +* :ghpull:`30431`: Use pathlib in texmanager. +* :ghpull:`30428`: Backport PR #30399 on branch v3.10.x (Qt: Fix HiDPI handling on X11/Windows) +* :ghpull:`30426`: Fix a race condition in TexManager.make_dvi. +* :ghpull:`30399`: Qt: Fix HiDPI handling on X11/Windows +* :ghpull:`30415`: Backport PR #30414 on branch v3.10.x (DOC: update Cartopy url) +* :ghpull:`30414`: DOC: update Cartopy url -Issues (18): +Issues (4): -* :ghissue:`30370`: [Bug]: matplotlib simple example fails in Python 3.14 -* :ghissue:`30218`: [Bug]: Rendering on Wayland with fractional scaling looks bad -* :ghissue:`30318`: [Bug]: type annotation of ``Axes.get_legend()`` misses ``None`` -* :ghissue:`30169`: [Doc]: Incorrect FAQ Link on Tutorials Page -* :ghissue:`30285`: [Bug]: Missing whitespace in _axes.py error message -* :ghissue:`30280`: [Bug]: Pillow 11.3 raises a deprecation warning when using TkAgg -* :ghissue:`30158`: [Bug]: Stackplot in SubFigure raises when drawing Legend -* :ghissue:`30216`: [Bug]: stem complaining about PyTorch's Tensor -* :ghissue:`30242`: [Bug]: Cannot create empty FancyArrow (expired numpy deprecation) -* :ghissue:`30249`: [Bug]: DeprecationWarning from Pillow 11.3.0 about 'mode' parameter of PIL.Image.fromarray() -* :ghissue:`29688`: [Bug]: "Bad file descriptor" raised repeatedly when plt.pause() interrupted in IPython -* :ghissue:`27305`: [Bug]: Axes.label_outer() does not work when there is a colorbar -* :ghissue:`30179`: [Bug]: Inner border is not rendered correctly when using log-scale and polar projection. -* :ghissue:`29157`: FUTURE BUG: reconsider how we deep-copy path objects -* :ghissue:`30152`: [Bug]: Test pipeline failure on windows -* :ghissue:`30076`: [Bug]: Layout Managers are confused by complex arrangement of sub-figures and gridspec's -* :ghissue:`30078`: [Bug]: legend no longer works with itertools.chain -* :ghissue:`29780`: [Bug]: Setting 'lines.markeredgecolor' affects color of errorbar caps. +* :ghissue:`29618`: [Bug]: FigureCanvasQT is seemingly prematurely freed under certain conditions +* :ghissue:`30390`: [ENH]: Gracefully handle python-build-standalone ImportError +* :ghissue:`30420`: [ENH]: Support parallel plotting +* :ghissue:`30386`: BUG: Qt hi-dpi regression on windows and X11 with mpl 3.10.5 Previous GitHub statistics diff --git a/doc/users/prev_whats_new/github_stats_3.10.5.rst b/doc/users/prev_whats_new/github_stats_3.10.5.rst new file mode 100644 index 000000000000..319086baebe5 --- /dev/null +++ b/doc/users/prev_whats_new/github_stats_3.10.5.rst @@ -0,0 +1,142 @@ +.. _github-stats-3_10_5: + +GitHub statistics for 3.10.5 (Jul 31, 2025) +=========================================== + +GitHub statistics for 2024/12/14 (tag: v3.10.0) - 2025/07/31 + +These lists are automatically generated, and may be incomplete or contain duplicates. + +We closed 18 issues and merged 67 pull requests. +The full list can be seen `on GitHub `__ + +The following 36 authors contributed 371 commits. + +* Antony Lee +* Brian Christian +* chrisjbillington +* Christine P. Chai +* Clément Robert +* David Stansby +* dependabot[bot] +* Elliott Sales de Andrade +* G.D. McBain +* Greg Lucas +* hannah +* hu-xiaonan +* Ian Thomas +* ianlv +* IdiotCoffee +* Ines Cachola +* Inês Cachola +* Jody Klymak +* Jouni K. Seppänen +* Khushi_29 +* Kyle Sunden +* Lumberbot (aka Jack) +* N R Navaneet +* Nathan G. Wiseman +* Oscar Gustafsson +* Praful Gulani +* Qian Zhang +* Raphael Erik Hviding +* Roman +* Roman A +* Ruth Comer +* saikarna913 +* Scott Shambaugh +* Thomas A Caswell +* Tim Hoffmann +* Trygve Magnus Ræder + +GitHub issues and pull requests: + +Pull Requests (67): + +* :ghpull:`30357`: CIBW updates: fix pypy sections, update cibw version +* :ghpull:`30356`: Manual Backport PR #30195 on branch v3.10.x (ci: Enable wheel builds on Python 3.14) +* :ghpull:`30352`: Backport PR #28554 on branch v3.10.x (BLD: Enable wheels on Windows-on-ARM) +* :ghpull:`30353`: Backport PR #30345 on branch v3.10.x (qt: Use better devicePixelRatio event to refresh scaling) +* :ghpull:`30350`: Backport PR #30344 on branch v3.10.x (Support fractional HiDPI in GTK4 backend) +* :ghpull:`30277`: Backport PR #30271 on branch v3.10.x (Reduce pause time in interactive timer test) +* :ghpull:`30351`: Backport PR #30327 on branch v3.10.x (FIX Update Axes limits from Axes.add_collection(... autolim=True)) +* :ghpull:`30345`: qt: Use better devicePixelRatio event to refresh scaling +* :ghpull:`28554`: BLD: Enable wheels on Windows-on-ARM +* :ghpull:`30292`: Backport PR #30237: Add explicit ``**options: Any`` for ``add_subplot`` m… +* :ghpull:`29935`: Backport PR #29908 on branch v3.10.x (TST: Use text placeholders for empty legends) +* :ghpull:`30327`: FIX Update Axes limits from Axes.add_collection(... autolim=True) +* :ghpull:`30344`: Support fractional HiDPI in GTK4 backend +* :ghpull:`30326`: Backport PR #30321 on branch v3.10.x (Fix type annotation for Axes.get_legend() to include None) +* :ghpull:`30321`: Fix type annotation for Axes.get_legend() to include None +* :ghpull:`30287`: Backport PR #30286 on branch v3.10.x (Fix whitespace in _axes.py error message) +* :ghpull:`30288`: Backport PR #30283 on branch v3.10.x (changed the FAQ link to point to the correct path) +* :ghpull:`30293`: Backport PR #30289 on branch v3.10.x (DOC: Fix build with pybind11 3) +* :ghpull:`30283`: changed the FAQ link to point to the correct path +* :ghpull:`30286`: Fix whitespace in _axes.py error message +* :ghpull:`30271`: Reduce pause time in interactive timer test +* :ghpull:`30269`: Backport PR #30186 on branch v3.10.x (Fix figure legend when drawing stackplots) +* :ghpull:`30186`: Fix figure legend when drawing stackplots +* :ghpull:`30268`: Backport PR #30233 on branch v3.10.x (Check that stem input is 1D) +* :ghpull:`30233`: Check that stem input is 1D +* :ghpull:`30259`: Backport PR #30256 on branch v3.10.x (Time out in _get_executable_info) +* :ghpull:`30256`: Time out in _get_executable_info +* :ghpull:`30237`: Add explicit ``**options: Any`` for ``add_subplot`` method +* :ghpull:`30253`: Backport PR #30243 on branch v3.10.x (Fix FancyArrow rendering for zero-length arrows) +* :ghpull:`30243`: Fix FancyArrow rendering for zero-length arrows +* :ghpull:`30250`: Backport PR #30244 on branch v3.10.x (DOC: Recommend to use bare Figure instances for saving to file) +* :ghpull:`30247`: Backport PR #30246 on branch v3.10.x (chore: remove redundant words in comment) +* :ghpull:`30246`: chore: remove redundant words in comment +* :ghpull:`30240`: Backport PR #30236 on branch v3.10.x (Copy-edit the docstring of AuxTransformBox.) +* :ghpull:`30236`: Copy-edit the docstring of AuxTransformBox. +* :ghpull:`30234`: Backport PR #30209 on branch v3.10.x (Clean up Qt socket notifier to avoid spurious interrupt handler calls) +* :ghpull:`30209`: Clean up Qt socket notifier to avoid spurious interrupt handler calls +* :ghpull:`30195`: ci: Enable wheel builds on Python 3.14 +* :ghpull:`30229`: Backport PR #30221 on branch v3.10.x (BUG: fix future incompatibility with Pillow 13) +* :ghpull:`30221`: BUG: fix future incompatibility with Pillow 13 +* :ghpull:`30228`: Backport PR #30098 on branch v3.10.x (Fix label_outer in the presence of colorbars.) +* :ghpull:`30227`: Backport PR #30223 on branch v3.10.x (Polar log scale: fix inner patch boundary and spine location) +* :ghpull:`30098`: Fix label_outer in the presence of colorbars. +* :ghpull:`30223`: Polar log scale: fix inner patch boundary and spine location +* :ghpull:`30217`: Backport PR #30198 on branch v3.10.x (Implement Path.__deepcopy__ avoiding infinite recursion) +* :ghpull:`30198`: Implement Path.__deepcopy__ avoiding infinite recursion +* :ghpull:`30213`: Backport PR #30212 on branch v3.10.x ([Doc]: fix bug in release notes for matplotlib v3.5.0 and v3.7.0) +* :ghpull:`30189`: Backport PR #30180 on branch v3.10.x (DOC: expand polar example) +* :ghpull:`30167`: Backport PR #30162 on branch v3.10.x (TST: Fix runtime error checking NaN input to format_cursor_data) +* :ghpull:`30162`: TST: Fix runtime error checking NaN input to format_cursor_data +* :ghpull:`30146`: Backport PR #30144 on branch v3.10.x (js: Fix externally-controlled format strings) +* :ghpull:`30144`: js: Fix externally-controlled format strings +* :ghpull:`30140`: Backport PR #30118 on branch v3.10.x (CI: Skip jobs on forks) +* :ghpull:`30120`: Backport PR #30114 on branch v3.10.x (Fix _is_tensorflow_array.) +* :ghpull:`30122`: Backport PR #30119 on branch v3.10.x (Add some types to _mathtext.py) +* :ghpull:`30119`: Add some types to _mathtext.py +* :ghpull:`30114`: Fix _is_tensorflow_array. +* :ghpull:`30106`: Backport PR #30089 on branch v3.10.x (FIX: fix submerged margins algorithm being applied twice) +* :ghpull:`30089`: FIX: fix submerged margins algorithm being applied twice +* :ghpull:`30101`: Backport PR #30096 on branch v3.10.x (Fix OffsetBox custom picker) +* :ghpull:`30096`: Fix OffsetBox custom picker +* :ghpull:`30081`: Backport PR #30079 on branch v3.10.x (FIX: cast legend handles to list) +* :ghpull:`30079`: FIX: cast legend handles to list +* :ghpull:`30057`: Backport PR #29895 on branch v3.10.x (The 'lines.markeredgecolor' now doesn't interfere on the color of errorbar caps)" +* :ghpull:`29895`: The 'lines.markeredgecolor' now doesn't interfere on the color of errorbar caps +* :ghpull:`30033`: Backport PR #30029 on branch v3.10.x (Update diagram in subplots_adjust documentation to clarify parameters) + +Issues (18): + +* :ghissue:`30370`: [Bug]: matplotlib simple example fails in Python 3.14 +* :ghissue:`30218`: [Bug]: Rendering on Wayland with fractional scaling looks bad +* :ghissue:`30318`: [Bug]: type annotation of ``Axes.get_legend()`` misses ``None`` +* :ghissue:`30169`: [Doc]: Incorrect FAQ Link on Tutorials Page +* :ghissue:`30285`: [Bug]: Missing whitespace in _axes.py error message +* :ghissue:`30280`: [Bug]: Pillow 11.3 raises a deprecation warning when using TkAgg +* :ghissue:`30158`: [Bug]: Stackplot in SubFigure raises when drawing Legend +* :ghissue:`30216`: [Bug]: stem complaining about PyTorch's Tensor +* :ghissue:`30242`: [Bug]: Cannot create empty FancyArrow (expired numpy deprecation) +* :ghissue:`30249`: [Bug]: DeprecationWarning from Pillow 11.3.0 about 'mode' parameter of PIL.Image.fromarray() +* :ghissue:`29688`: [Bug]: "Bad file descriptor" raised repeatedly when plt.pause() interrupted in IPython +* :ghissue:`27305`: [Bug]: Axes.label_outer() does not work when there is a colorbar +* :ghissue:`30179`: [Bug]: Inner border is not rendered correctly when using log-scale and polar projection. +* :ghissue:`29157`: FUTURE BUG: reconsider how we deep-copy path objects +* :ghissue:`30152`: [Bug]: Test pipeline failure on windows +* :ghissue:`30076`: [Bug]: Layout Managers are confused by complex arrangement of sub-figures and gridspec's +* :ghissue:`30078`: [Bug]: legend no longer works with itertools.chain +* :ghissue:`29780`: [Bug]: Setting 'lines.markeredgecolor' affects color of errorbar caps. From b2358e7a537205b29ab0810b4bd94f036b3086dc Mon Sep 17 00:00:00 2001 From: Kyle Sunden Date: Fri, 29 Aug 2025 18:13:43 -0500 Subject: [PATCH 19/23] Release prep v3.10.6 --- doc/_static/switcher.json | 4 ++-- doc/users/release_notes.rst | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/_static/switcher.json b/doc/_static/switcher.json index 7f4913137693..2d02ec01ae56 100644 --- a/doc/_static/switcher.json +++ b/doc/_static/switcher.json @@ -1,7 +1,7 @@ [ { "name": "3.10 (stable)", - "version": "3.10.5", + "version": "3.10.6", "url": "https://matplotlib.org/stable/", "preferred": true }, @@ -12,7 +12,7 @@ }, { "name": "3.9", - "version": "3.9.3", + "version": "3.9.4", "url": "https://matplotlib.org/3.9.4/" }, { diff --git a/doc/users/release_notes.rst b/doc/users/release_notes.rst index 4888e35948c7..1ca483ab15a2 100644 --- a/doc/users/release_notes.rst +++ b/doc/users/release_notes.rst @@ -21,6 +21,7 @@ Version 3.10 ../api/prev_api_changes/api_changes_3.10.1.rst ../api/prev_api_changes/api_changes_3.10.0.rst github_stats.rst + prev_whats_new/github_stats_3.10.5.rst prev_whats_new/github_stats_3.10.3.rst prev_whats_new/github_stats_3.10.1.rst prev_whats_new/github_stats_3.10.0.rst From 5cd38c3edcdf0792d0e6aded280a9b7a7de6146f Mon Sep 17 00:00:00 2001 From: Kyle Sunden Date: Fri, 29 Aug 2025 18:21:02 -0500 Subject: [PATCH 20/23] REL: v3.10.6 This is a bugfix release in the 3.10.x series. Highlights from this release include: - Fix regression of hi-dpi support for Qt - Fix race condition in TexManager.make_dvi & make_png - Various documentation and other bugfixes From 1d52624ff79f0bd9c57fedd1ed334dad47ee4a03 Mon Sep 17 00:00:00 2001 From: Kyle Sunden Date: Fri, 29 Aug 2025 18:26:35 -0500 Subject: [PATCH 21/23] REL: bump from v3.10.6 From 22c649b6a4362f09a1080e0d46519639c022a590 Mon Sep 17 00:00:00 2001 From: Kyle Sunden Date: Fri, 29 Aug 2025 18:35:39 -0500 Subject: [PATCH 22/23] Zenodo v3.10.6 --- doc/_static/zenodo_cache/16999430.svg | 35 +++++++++++++++++++++++++++ doc/project/citing.rst | 3 +++ tools/cache_zenodo_svg.py | 1 + 3 files changed, 39 insertions(+) create mode 100644 doc/_static/zenodo_cache/16999430.svg diff --git a/doc/_static/zenodo_cache/16999430.svg b/doc/_static/zenodo_cache/16999430.svg new file mode 100644 index 000000000000..44c448643e91 --- /dev/null +++ b/doc/_static/zenodo_cache/16999430.svg @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + DOI + + + DOI + + + 10.5281/zenodo.16999430 + + + 10.5281/zenodo.16999430 + + + \ No newline at end of file diff --git a/doc/project/citing.rst b/doc/project/citing.rst index 249f568625db..ae2061e7349c 100644 --- a/doc/project/citing.rst +++ b/doc/project/citing.rst @@ -32,6 +32,9 @@ By version .. START OF AUTOGENERATED +v3.10.6 + .. image:: ../_static/zenodo_cache/16999430.svg + :target: https://doi.org/10.5281/zenodo.16999430 v3.10.5 .. image:: ../_static/zenodo_cache/16644850.svg :target: https://doi.org/10.5281/zenodo.16644850 diff --git a/tools/cache_zenodo_svg.py b/tools/cache_zenodo_svg.py index 59d6fce55162..c6783dd9f19d 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.10.6": "16999430", "v3.10.5": "16644850", "v3.10.3": "15375714", "v3.10.1": "14940554", From 4383c87ac5006d3d5ab6f6b99e30334cb0ba93e5 Mon Sep 17 00:00:00 2001 From: Kyle Sunden Date: Tue, 2 Sep 2025 16:00:33 -0500 Subject: [PATCH 23/23] Revert 3.9 link --- doc/_static/switcher.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/_static/switcher.json b/doc/_static/switcher.json index 2d02ec01ae56..c71f2c8c4859 100644 --- a/doc/_static/switcher.json +++ b/doc/_static/switcher.json @@ -12,8 +12,8 @@ }, { "name": "3.9", - "version": "3.9.4", - "url": "https://matplotlib.org/3.9.4/" + "version": "3.9.3", + "url": "https://matplotlib.org/3.9.3/" }, { "name": "3.8",