8000 Merge branch 'v3.10.1-doc' into v3.10.x · matplotlib/matplotlib@c0bc118 · GitHub
[go: up one dir, main page]

Skip to content

Commit c0bc118

Browse files
committed
Merge branch 'v3.10.1-doc' into v3.10.x
2 parents 939037f + 035a5d2 commit c0bc118

File tree

17 files changed

+257
-111
lines changed

17 files changed

+257
-111
lines changed

.github/workflows/tests.yml

Lines changed: 8 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
matrix:
4949
include:
5050
- name-suffix: "(Minimum Versions)"
51-
os: ubuntu-20.04
51+
os: ubuntu-22.04
5252
python-version: '3.10'
5353
extra-requirements: '-c requirements/testing/minver.txt'
5454
delete-font-cache: true
@@ -57,22 +57,9 @@ jobs:
5757
pyqt6-ver: '==6.2.0 PyQt6-Qt6==6.2.0'
5858
pyside2-ver: '==5.15.2.1'
5959
pyside6-ver: '==6.2.0'
60-
- os: ubuntu-20.04
61-
python-version: '3.10'
62-
# One CI run tests ipython/matplotlib-inline before backend mapping moved to mpl
63-
extra-requirements:
64-
-r requirements/testing/extra.txt
65-
"ipython==7.29.0"
66-
"ipykernel==5.5.6"
67-
"matplotlib-inline<0.1.7"
68-
CFLAGS: "-fno-lto" # Ensure that disabling LTO works.
69-
# https://github.com/matplotlib/matplotlib/pull/26052#issuecomment-1574595954
70-
# https://www.riverbankcomputing.com/pipermail/pyqt/2023-November/045606.html
71-
pyqt6-ver: '!=6.5.1,!=6.6.0,!=6.7.1'
72-
# https://bugreports.qt.io/projects/PYSIDE/issues/PYSIDE-2346
73-
pyside6-ver: '!=6.5.1'
7460
- os: ubuntu-22.04
7561
python-version: '3.11'
62+
CFLAGS: "-fno-lto" # Ensure that disabling LTO works.
7663
# https://www.riverbankcomputing.com/pipermail/pyqt/2023-November/045606.html
7764
pyqt6-ver: '!=6.6.0'
7865
# https://bugreports.qt.io/projects/PYSIDE/issues/PYSIDE-2346
@@ -103,10 +90,14 @@ jobs:
10390
pyside6-ver: '!=6.5.1'
10491
- os: macos-14 # This runner is on M1 (arm64) chips.
10592
python-version: '3.12'
93+
# https://github.com/matplotlib/matplotlib/issues/29732
94+
pygobject-ver: '<3.52.0'
10695
# https://bugreports.qt.io/projects/PYSIDE/issues/PYSIDE-2346
10796
pyside6-ver: '!=6.5.1'
10897
- os: macos-14 # This runner is on M1 (arm64) chips.
10998
python-version: '3.13'
99+
# https://github.com/matplotlib/matplotlib/issues/29732
100+
pygobject-ver: '<3.52.0'
110101
# https://bugreports.qt.io/projects/PYSIDE/issues/PYSIDE-2346
111102
pyside6-ver: '!=6.5.1'
112103

@@ -176,11 +167,7 @@ jobs:
176167
texlive-luatex \
177168
texlive-pictures \
178169
texlive-xetex
179-
if [[ "${{ matrix.os }}" = ubuntu-20.04 ]]; then
180-
sudo apt-get install -yy --no-install-recommends libopengl0
181-
else # ubuntu-22.04
182-
sudo apt-get install -yy --no-install-recommends gir1.2-gtk-4.0
183-
fi
170+
sudo apt-get install -yy --no-install-recommends gir1.2-gtk-4.0
184171
;;
185172
macOS)
186173
brew update
@@ -270,7 +257,7 @@ jobs:
270257
# (sometimes, the install appears to be successful but shared
271258
# libraries cannot be loaded at runtime, so an actual import is a
272259
# better check).
273-
python -m pip install --upgrade pycairo 'cairocffi>=0.8' PyGObject &&
260+
python -m pip install --upgrade pycairo 'cairocffi>=0.8' 'PyGObject${{ matrix.pygobject-ver }}' &&
274261
(
275262
python -c 'import gi; gi.require_version("Gtk", "4.0"); from gi.repository import Gtk' &&
276263
echo 'PyGObject 4 is available' || echo 'PyGObject 4 is not available'

doc/_static/mpl.css

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,3 +207,15 @@ div.wide-table table th.stub {
207207
.section-toc.toctree-wrapper li>ul{
208208
padding-inline-start:0;
209209
}
210+
211+
.sidebar-cheatsheets {
212+
margin-bottom: 3em;
213+
}
214+
215+
.sidebar-cheatsheets > h3 {
216+
margin-top: 0;
217+
}
218+
219+
.sidebar-cheatsheets > img {
220+
width: 100%;
221+
}

doc/_static/zenodo_cache/14940554.svg

Lines changed: 35 additions & 0 deletions
Loading

doc/_templates/cheatsheet_sidebar.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
<div class="sidebar-cheatsheets">
3-
<h3>Matplotlib cheatsheets</h3>
3+
<h3>Cheatsheets</h3>
44
<a href="https://matplotlib.org/cheatsheets/">
55
<img src="_static/mpl_cheatsheet1.png"
66
alt="Matplotlib cheatsheets"

doc/index.rst

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,34 @@ Install
2929
3030
conda install -c conda-forge matplotlib
3131
32+
.. tab-item:: pixi
33+
34+
.. code-block:: bash
35+
36+
pixi add matplotlib
37+
38+
.. tab-item:: uv
39+
40+
.. code-block:: bash
41+
42+
uv add matplotlib
43+
44+
.. warning::
45+
46+
If you install Python with ``uv`` then the ``tkagg`` backend
47+
will not be available because python-build-standalone (used by uv
48+
to distribute Python) does not contain tk bindings that are usable by
49+
Matplotlib (see `this issue`_ for details). If you want Matplotlib
50+
to be able to display plots in a window, you should install one of
51+
the other :ref:`supported GUI frameworks <optional_dependencies>`,
52+
e.g.
53+
54+
.. code-block:: bash
55+
56+
uv add matplotlib pyside6
57+
58+
.. _this issue: https://github.com/astral-sh/uv/issues/6893#issuecomment-2565965851
59+
3260
.. tab-item:: other
3361

3462
.. rst-class:: section-toc

doc/install/index.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ precompiled wheel for your OS and Python.
2828
The following backends work out of the box: Agg, ps, pdf, svg
2929

3030
Python is typically shipped with tk bindings which are used by
31-
TkAgg.
31+
TkAgg. Notably, python-build-standalone – used by ``uv`` – does
32+
not include tk bindings that are usable by Matplotlib.
3233

3334
For support of other GUI frameworks, LaTeX rendering, saving
3435
animations and a larger selection of file formats, you can

doc/project/citing.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ By version
3232
.. START OF AUTOGENERATED
3333
3434
35+
v3.10.1
36+
.. image:: ../_static/zenodo_cache/14940554.svg
37+
:target: https://doi.org/10.5281/zenodo.14940554
3538
v3.10.0
3639
.. image:: ../_static/zenodo_cache/14464227.svg
3740
:target: https://doi.org/10.5281/zenodo.14464227

environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ dependencies:
5353
# testing
5454
- black<24
5555
- coverage
56-
- flake8>=3.8
56+
- flake8>=3.8,<7.2
5757
- flake8-docstrings>=1.4.0
5858
- gtk4
5959
- ipykernel

galleries/examples/scales/logit_demo.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,20 @@
44
===========
55
66
Examples of plots with logit axes.
7+
8+
This example visualises how ``set_yscale("logit")`` works on probability plots
9+
by generating three distributions: normal, laplacian, and cauchy in one plot.
10+
11+
The advantage of logit scale is that it effectively spreads out values close to 0 and 1.
12+
13+
In a linear scale plot, probability values near 0 and 1 appear compressed,
14+
making it difficult to see differences in those regions.
15+
16+
In a logit scale plot, the transformation expands these regions,
17+
making the graph cleaner and easier to compare across different probability values.
18+
19+
This makes the logit scale especially useful when visalising probabilities in logistic
20+
regression, classification models, and cumulative distribution functions.
721
"""
822

923
import math

galleries/examples/shapes_and_collections/hatch_style_reference.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,7 @@ def hatches_plot(ax, h):
6262
# - `matplotlib.patches.Rectangle`
6363
# - `matplotlib.axes.Axes.add_patch`
6464
# - `matplotlib.axes.Axes.text`
65+
#
66+
# .. tags::
67+
#
68+
# purpose: reference

0 commit comments

Comments
 (0)
0