diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d42ac6ea00a2..282b015fcbf1 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -48,7 +48,7 @@ jobs: matrix: include: - name-suffix: "(Minimum Versions)" - os: ubuntu-20.04 + os: ubuntu-22.04 python-version: '3.10' extra-requirements: '-c requirements/testing/minver.txt' delete-font-cache: true @@ -57,22 +57,9 @@ jobs: pyqt6-ver: '==6.2.0 PyQt6-Qt6==6.2.0' pyside2-ver: '==5.15.2.1' pyside6-ver: '==6.2.0' - - os: ubuntu-20.04 - python-version: '3.10' - # One CI run tests ipython/matplotlib-inline before backend mapping moved to mpl - extra-requirements: - -r requirements/testing/extra.txt - "ipython==7.29.0" - "ipykernel==5.5.6" - "matplotlib-inline<0.1.7" - CFLAGS: "-fno-lto" # Ensure that disabling LTO works. - # https://github.com/matplotlib/matplotlib/pull/26052#issuecomment-1574595954 - # https://www.riverbankcomputing.com/pipermail/pyqt/2023-November/045606.html - pyqt6-ver: '!=6.5.1,!=6.6.0,!=6.7.1' - # https://bugreports.qt.io/projects/PYSIDE/issues/PYSIDE-2346 - pyside6-ver: '!=6.5.1' - os: ubuntu-22.04 python-version: '3.11' + CFLAGS: "-fno-lto" # Ensure that disabling LTO works. # https://www.riverbankcomputing.com/pipermail/pyqt/2023-November/045606.html pyqt6-ver: '!=6.6.0' # https://bugreports.qt.io/projects/PYSIDE/issues/PYSIDE-2346 @@ -103,10 +90,14 @@ jobs: pyside6-ver: '!=6.5.1' - os: macos-14 # This runner is on M1 (arm64) chips. python-version: '3.12' + # https://github.com/matplotlib/matplotlib/issues/29732 + pygobject-ver: '<3.52.0' # https://bugreports.qt.io/projects/PYSIDE/issues/PYSIDE-2346 pyside6-ver: '!=6.5.1' - os: macos-14 # This runner is on M1 (arm64) chips. python-version: '3.13' + # https://github.com/matplotlib/matplotlib/issues/29732 + pygobject-ver: '<3.52.0' # https://bugreports.qt.io/projects/PYSIDE/issues/PYSIDE-2346 pyside6-ver: '!=6.5.1' @@ -176,11 +167,7 @@ jobs: texlive-luatex \ texlive-pictures \ texlive-xetex - if [[ "${{ matrix.os }}" = ubuntu-20.04 ]]; then - sudo apt-get install -yy --no-install-recommends libopengl0 - else # ubuntu-22.04 - sudo apt-get install -yy --no-install-recommends gir1.2-gtk-4.0 - fi + sudo apt-get install -yy --no-install-recommends gir1.2-gtk-4.0 ;; macOS) brew update @@ -270,7 +257,7 @@ jobs: # (sometimes, the install appears to be successful but shared # libraries cannot be loaded at runtime, so an actual import is a # better check). - python -m pip install --upgrade pycairo 'cairocffi>=0.8' PyGObject && + python -m pip install --upgrade pycairo 'cairocffi>=0.8' 'PyGObject${{ matrix.pygobject-ver }}' && ( python -c 'import gi; gi.require_version("Gtk", "4.0"); from gi.repository import Gtk' && echo 'PyGObject 4 is available' || echo 'PyGObject 4 is not available' diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 0c891fe42fef..cfd4f65dc775 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -62,7 +62,7 @@ stages: vmImage: 'macOS-latest' python.version: '3.11' Windows_py310: - vmImage: 'windows-2019' # keep one job pinned to the oldest image + vmImage: 'windows-2022' # keep one job pinned to the oldest image python.version: '3.10' Windows_py311: vmImage: 'windows-latest' @@ -181,50 +181,22 @@ stages: VS=$(ls -d /c/Program\ Files*/Microsoft\ Visual\ Studio/*/Enterprise) echo "Visual Studio: ${VS}" DIR="$VS/Common7/IDE/Extensions/Microsoft/CodeCoverage.Console" - if [[ -d $DIR ]]; then - # This is for MSVC 2022 (on windows-latest). - TOOL="$DIR/Microsoft.CodeCoverage.Console.exe" - for f in build/cp*/src/*.pyd; do - echo $f - echo "==============================" - "$TOOL" instrument $f --session-id $SESSION_ID \ - --log-level Verbose --log-file instrument.log - cat instrument.log - rm instrument.log - done - echo "Starting $TOOL in server mode" - "$TOOL" collect \ - --session-id $SESSION_ID --server-mode \ - --output-format cobertura --output extensions.xml \ - --log-level Verbose --log-file extensions.log & - VS_VER=2022 - else - DIR="$VS"/Team\ Tools/Dynamic\ Code\ Coverage\ Tools/amd64 - if [[ -d $DIR ]]; then - # This is for MSVC 2019 (on windows-2019). - VSINSTR="$VS"/Team\ Tools/Performance\ Tools/vsinstr.exe - for f in build/cp*/src/*.pyd; do - "$VSINSTR" $f -Verbose -Coverage - done - TOOL="$DIR/CodeCoverage.exe" - cat > extensions.config << EOF - - true - - - .*\\.*\.pyd - - - - EOF - echo "Starting $TOOL in server mode" - "$TOOL" collect \ - -config:extensions.config -session:$SESSION_ID \ - -output:extensions.coverage -verbose & - echo "Started $TOOL" - VS_VER=2019 - fi - fi + # This is for MSVC 2022 (on windows-latest). + TOOL="$DIR/Microsoft.CodeCoverage.Console.exe" + for f in build/cp*/src/*.pyd; do + echo $f + echo "==============================" + "$TOOL" instrument $f --session-id $SESSION_ID \ + --log-level Verbose --log-file instrument.log + cat instrument.log + rm instrument.log + done + echo "Starting $TOOL in server mode" + "$TOOL" collect \ + --session-id $SESSION_ID --server-mode \ + --output-format cobertura --output extensions.xml \ + --log-level Verbose --log-file extensions.log & + VS_VER=2022 echo "##vso[task.setvariable variable=VS_COVERAGE_TOOL]$TOOL" fi PYTHONFAULTHANDLER=1 pytest -rfEsXR -n 2 \ diff --git a/doc/_embedded_plots/figure_subplots_adjust.py b/doc/_embedded_plots/figure_subplots_adjust.py index b4b8d7d32a3d..d32a029fe05d 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") diff --git a/doc/_static/mpl.css b/doc/_static/mpl.css index 9049ddbd8334..022c9c9d63e5 100644 --- a/doc/_static/mpl.css +++ b/doc/_static/mpl.css @@ -207,3 +207,15 @@ div.wide-table table th.stub { .section-toc.toctree-wrapper li>ul{ padding-inline-start:0; } + +.sidebar-cheatsheets { + margin-bottom: 3em; +} + +.sidebar-cheatsheets > h3 { + margin-top: 0; +} + +.sidebar-cheatsheets > img { + width: 100%; +} diff --git a/doc/_static/switcher.json b/doc/_static/switcher.json index 27451fd05657..33729cb5f0a5 100644 --- a/doc/_static/switcher.json +++ b/doc/_static/switcher.json @@ -1,7 +1,7 @@ [ { "name": "3.10 (stable)", - "version": "3.10.0", + "version": "3.10.3", "url": "https://matplotlib.org/stable/", "preferred": true }, 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/_templates/cheatsheet_sidebar.html b/doc/_templates/cheatsheet_sidebar.html index 3f2b7c4f4db1..2ca6548ddd4d 100644 --- a/doc/_templates/cheatsheet_sidebar.html +++ b/doc/_templates/cheatsheet_sidebar.html @@ -1,6 +1,6 @@