diff --git a/.github/workflows/cibuildwheel.yml b/.github/workflows/cibuildwheel.yml index 6920b4cee2de..fd8dc309a61c 100644 --- a/.github/workflows/cibuildwheel.yml +++ b/.github/workflows/cibuildwheel.yml @@ -143,7 +143,7 @@ jobs: path: dist/ - name: Build wheels for CPython 3.14 - uses: pypa/cibuildwheel@63fd63b352a9a8bdcc24791c9dbee952ee9a8abc # v3.3.0 + uses: pypa/cibuildwheel@298ed2fb2c105540f5ed055e8a6ad78d82dd3a7e # v3.3.1 with: package-dir: dist/${{ needs.build_sdist.outputs.SDIST_NAME }} env: @@ -153,7 +153,7 @@ jobs: CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28 - name: Build wheels for CPython 3.13 - uses: pypa/cibuildwheel@63fd63b352a9a8bdcc24791c9dbee952ee9a8abc # v3.3.0 + uses: pypa/cibuildwheel@298ed2fb2c105540f5ed055e8a6ad78d82dd3a7e # v3.3.1 with: package-dir: dist/${{ needs.build_sdist.outputs.SDIST_NAME }} env: @@ -162,7 +162,7 @@ jobs: CIBW_ARCHS: ${{ matrix.cibw_archs }} - name: Build wheels for CPython 3.12 - uses: pypa/cibuildwheel@63fd63b352a9a8bdcc24791c9dbee952ee9a8abc # v3.3.0 + uses: pypa/cibuildwheel@298ed2fb2c105540f5ed055e8a6ad78d82dd3a7e # v3.3.1 with: package-dir: dist/${{ needs.build_sdist.outputs.SDIST_NAME }} env: @@ -170,7 +170,7 @@ jobs: CIBW_ARCHS: ${{ matrix.cibw_archs }} - name: Build wheels for CPython 3.11 - uses: pypa/cibuildwheel@63fd63b352a9a8bdcc24791c9dbee952ee9a8abc # v3.3.0 + uses: pypa/cibuildwheel@298ed2fb2c105540f5ed055e8a6ad78d82dd3a7e # v3.3.1 with: package-dir: dist/${{ needs.build_sdist.outputs.SDIST_NAME }} env: @@ -178,7 +178,7 @@ jobs: CIBW_ARCHS: ${{ matrix.cibw_archs }} - name: Build wheels for PyPy - uses: pypa/cibuildwheel@63fd63b352a9a8bdcc24791c9dbee952ee9a8abc # v3.3.0 + uses: pypa/cibuildwheel@298ed2fb2c105540f5ed055e8a6ad78d82dd3a7e # v3.3.1 with: package-dir: dist/${{ needs.build_sdist.outputs.SDIST_NAME }} env: diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e066f6d9d296..28e2fcacb4ae 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -73,6 +73,8 @@ jobs: pygobject-ver: '<3.52.0' - os: ubuntu-24.04 python-version: '3.12' + - os: ubuntu-24.04 + python-version: '3.14' - os: ubuntu-24.04-arm python-version: '3.12' - os: macos-14 # This runner is on M1 (arm64) chips. @@ -87,6 +89,10 @@ jobs: python-version: '3.13' # https://github.com/matplotlib/matplotlib/issues/29732 pygobject-ver: '<3.52.0' + - os: macos-15 # This runner is on M1 (arm64) chips. + python-version: '3.14' + # https://github.com/matplotlib/matplotlib/issues/29732 + pygobject-ver: '<3.52.0' steps: - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 @@ -264,8 +270,8 @@ jobs: # Even though PySide2 wheels can be installed on Python 3.12+, they are broken and since PySide2 is # deprecated, they are unlikely to be fixed. For the same deprecation reason, there are no wheels # on M1 macOS, so don't bother there either. - if [[ "${{ matrix.os }}" != 'macos-14' - && "${{ matrix.python-version }}" != '3.12' && "${{ matrix.python-version }}" != '3.13' ]]; then + if [[ "${{ matrix.os }}" != 'macos-14' && "${{ matrix.python-version }}" == '3.11' + ]]; then python -mpip install --upgrade pyside2 && python -c 'import PySide2.QtCore' && echo 'PySide2 is available' || diff --git a/.gitignore b/.gitignore index 9389a1612b14..0460152a792f 100644 --- a/.gitignore +++ b/.gitignore @@ -104,6 +104,10 @@ __conda_version__.txt lib/png.lib lib/z.lib +# uv files # +############ +uv.lock + # Environments # ################ .env diff --git a/doc/_static/switcher.json b/doc/_static/switcher.json index 3912afd8a17d..36e743db21b8 100644 --- a/doc/_static/switcher.json +++ b/doc/_static/switcher.json @@ -1,7 +1,7 @@ [ { "name": "3.10 (stable)", - "version": "3.10.7", + "version": "3.10.8", "url": "https://matplotlib.org/stable/", "preferred": true }, diff --git a/doc/api/artist_api.rst b/doc/api/artist_api.rst index 0ca3fb364c41..f256d2b7164e 100644 --- a/doc/api/artist_api.rst +++ b/doc/api/artist_api.rst @@ -122,6 +122,7 @@ Figure and Axes Artist.set_figure Artist.get_figure + Artist.figure Children -------- diff --git a/doc/api/axes_api.rst b/doc/api/axes_api.rst index f5af8744a2bc..1868794dd921 100644 --- a/doc/api/axes_api.rst +++ b/doc/api/axes_api.rst @@ -628,6 +628,8 @@ Other Axes.get_transformed_clip_path_and_affine Axes.has_data Axes.set + Axes.get_figure + Axes.figure Axes.remove .. autoclass:: matplotlib.axes.Axes.ArtistList diff --git a/doc/api/matplotlib_configuration_api.rst b/doc/api/matplotlib_configuration_api.rst index d5dc60c80613..b2fafc08e5fc 100644 --- a/doc/api/matplotlib_configuration_api.rst +++ b/doc/api/matplotlib_configuration_api.rst @@ -24,8 +24,24 @@ Default values and styling ========================== .. py:data:: rcParams + :type: RcParams + + The global configuration settings for Matplotlib. + + This is a dictionary-like variable that stores the current configuration + settings. Many of the values control styling, but others control + various aspects of Matplotlib's behavior. + + See :doc:`/users/explain/configuration` for a full list of config + parameters. + + See :ref:`customizing` for usage information. + + Notes + ----- + This object is also available as ``plt.rcParams`` via the + `matplotlib.pyplot` module (which by convention is imported as ``plt``). - An instance of `RcParams` for handling default Matplotlib values. .. autoclass:: RcParams :no-members: diff --git a/doc/api/next_api_changes/behavior/28437-CH.rst b/doc/api/next_api_changes/behavior/28437-CH.rst index 6121dfec8163..bb303bbe9d3b 100644 --- a/doc/api/next_api_changes/behavior/28437-CH.rst +++ b/doc/api/next_api_changes/behavior/28437-CH.rst @@ -2,7 +2,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ When passing and array to ``imshow(..., alpha=...)``, the parameter was silently ignored -if the image data was a RGB or RBGA image or if :rc:`interpolation_state` +if the image data was an RGB or RBGA image or if :rc:`image.interpolation_stage` resolved to "rbga". This is now fixed, and the alpha array overwrites any previous transparency information. diff --git a/doc/api/next_api_changes/behavior/30824-AYS.rst b/doc/api/next_api_changes/behavior/30824-AYS.rst new file mode 100644 index 000000000000..a190bd537126 --- /dev/null +++ b/doc/api/next_api_changes/behavior/30824-AYS.rst @@ -0,0 +1,6 @@ +Bivariate colormaps now fully span the intended range of colors +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Bivariate colormaps generated by ``SegmentedBivarColormap`` (e.g., ``BiOrangeBlue``) +from a set of input colors now fully span that range of colors. There had been a bug +with the numerical interpolation such that the colormap did not actually include the +first or last colors. diff --git a/doc/api/prev_api_changes/api_changes_3.10.1.rst b/doc/api/prev_api_changes/api_changes_3.10.1.rst index 26d43ddf8b17..71a2f71efc94 100644 --- a/doc/api/prev_api_changes/api_changes_3.10.1.rst +++ b/doc/api/prev_api_changes/api_changes_3.10.1.rst @@ -8,7 +8,7 @@ Behaviour ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ When passing and array to ``imshow(..., alpha=...)``, the parameter was silently ignored -if the image data was a RGB or RBGA image or if :rc:`interpolation_state` +if the image data was an RGB or RBGA image or if :rc:`image.interpolation_stage` resolved to "rbga". This is now fixed, and the alpha array overwrites any previous transparency information. diff --git a/doc/api/widgets_api.rst b/doc/api/widgets_api.rst index 014361e70377..739b0f8931e0 100644 --- a/doc/api/widgets_api.rst +++ b/doc/api/widgets_api.rst @@ -2,11 +2,53 @@ ``matplotlib.widgets`` ********************** -.. inheritance-diagram:: matplotlib.widgets +.. currentmodule:: matplotlib.widgets + +.. automodule:: matplotlib.widgets + :no-members: + :no-undoc-members: + + +Widget classes +============== + +.. inheritance-diagram:: matplotlib.widgets.Widget :parts: 1 + :private-bases: + :include-subclasses: +.. autosummary:: + :toctree: _as_gen + :template: autosummary.rst + :nosignatures: -.. automodule:: matplotlib.widgets - :members: - :undoc-members: - :show-inheritance: + Widget + AxesWidget + Cursor + MultiCursor + Button + CheckButtons + RadioButtons + SliderBase + Slider + RangeSlider + TextBox + _SelectorWidget + RectangleSelector + EllipseSelector + Lasso + LassoSelector + PolygonSelector + SpanSelector + SubplotTool + +Helper classes +============== + +.. autosummary:: + :toctree: _as_gen + :nosignatures: + + LockDraw + ToolHandles + ToolLineHandles diff --git a/doc/devel/development_workflow.rst b/doc/devel/development_workflow.rst index c0300acf1f7f..c26b5eb9ae4e 100644 --- a/doc/devel/development_workflow.rst +++ b/doc/devel/development_workflow.rst @@ -40,7 +40,7 @@ workflow is: #. Start a new *feature branch* from ``upstream/main``:: - git checkout -b my-feature upstream/main + git checkout -b my-new-feature upstream/main #. When you're done editing, e.g., ``lib/matplotlib/collections.py``, record your changes in Git:: @@ -49,7 +49,7 @@ workflow is: #. Push the changes to your GitHub fork:: - git push -u origin my-feature + git push -u origin my-new-feature .. _update-mirror-main: @@ -250,15 +250,15 @@ If you notice you messed up after the rebase:: If you forgot to make a backup branch:: # look at the reflog of the branch - git reflog show cool-feature + git reflog show my-new-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 + 8630830 my-new-feature@{0}: commit: BUG: io: close file handles immediately + 278dd2a my-new-feature@{1}: rebase finished: refs/heads/my-new-feature onto 11ee694744f2552d + 26aa21a my-new-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} + git reset --hard my-new-feature@{2} .. _rewriting-commit-history: @@ -276,73 +276,85 @@ 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. + $ git log --oneline + b7e99a8659 (HEAD -> my-new-feature) Fix some remaining bugs + 8a5de78b17 Modify it so that it works + 34448c69eb Fix a few bugs + disable + 9a5d1ca186 First implementation + d1da6fbf0b (upstream/main) Merge pull request #30778 from timhoffm/decorator-tracebackhide + 6ad937ad83 Merge pull request #30838 from has2k1/fix-numpy-integer-markers ... -and ``6ad92e5`` is the last commit in the ``cool-feature`` branch. Suppose we +and ``b7e99a8659`` is the most recent commit in the ``my-new-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. +* Rewrite the commit message for ``9a5d1ca186`` to something more specific. +* Combine the commits ``34448c69eb``, ``8a5de78b17``, ``b7e99a8659`` 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 + git rebase -i d1da6fbf0b 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 + pick 9a5d1ca186 First implementation + pick 34448c69eb Fix a few bugs + disable + pick 8a5de78b17 Modify it so that it works + pick b7e99a8659 Fix some remaining bugs - # Rebase 6ad92e5..eadc391 onto 6ad92e5 + # Rebase d1da6fbf0b..b7e99a8659 onto d1da6fbf0b (4 commands) # # 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 + # 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 [-C | -c] = like "squash" but keep only the previous + # commit's log message, unless -C is used, in which case + # keep only this commit's message; -c is same as -C but + # opens the editor + # x, exec = run command (the rest of the line) using shell + # b, break = stop here (continue rebase later with 'git rebase --continue') + # d, drop = remove commit + # l, label