Skip to content

Merge branch 'v3.4.x' into master #19681

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 107 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
107 commits
Select commit Hold shift + click to select a range
fc351f4
DOC: Update GitHub stats for 3.4.0.
QuLogic Feb 19, 2021
04f78b8
REL: v3.4.0rc1
QuLogic Feb 19, 2021
e4a9fbf
BLD: bump branch away from tag
QuLogic Feb 19, 2021
a0ba17e
Backport PR #19532: Add note on interaction between text wrapping and…
timhoffm Feb 19, 2021
0f6bf77
Backport PR #19545: Replace references to pygtk by pygobject in docs.
timhoffm Feb 20, 2021
126cd95
Merge pull request #19549 from meeseeksmachine/auto-backport-of-pr-19…
jklymak Feb 20, 2021
4bf0577
Merge pull request #19542 from meeseeksmachine/auto-backport-of-pr-19…
jklymak Feb 20, 2021
00d98fa
Backport PR #19567: DOC: fix typos
tacaswell Feb 25, 2021
3bcb006
Backport PR #19456: Doc implement reredirects
anntzer Feb 25, 2021
a89d28b
Merge pull request #19579 from meeseeksmachine/auto-backport-of-pr-19…
tacaswell Feb 25, 2021
eb46343
Merge pull request #19580 from meeseeksmachine/auto-backport-of-pr-19…
tacaswell Feb 25, 2021
49e5837
Backport PR #19587: DOC: fix plot_date doc
timhoffm Feb 26, 2021
599fd40
Merge pull request #19592 from meeseeksmachine/auto-backport-of-pr-19…
jklymak Feb 26, 2021
4cc6c7c
Backport PR #19589: Changes linestyle parameter of flierprops
jklymak Feb 26, 2021
25515bc
Merge pull request #19595 from meeseeksmachine/auto-backport-of-pr-19…
dstansby Feb 27, 2021
2bf32ec
Backport PR #19546: Move unrendered README.wx to thirdpartypackages/i…
timhoffm Feb 20, 2021
a0b2949
Backport PR #19597: Fix IPython import issue
QuLogic Mar 1, 2021
630eab8
Backport PR #19583: FIX: check for a set during color conversion
QuLogic Mar 1, 2021
0e4cb23
Merge pull request #19613 from meeseeksmachine/auto-backport-of-pr-19…
QuLogic Mar 1, 2021
0ca12de
Backport PR #19577: Fix "return"->"enter" mapping in key names.
jklymak Feb 26, 2021
a057e30
Backport PR #19571: Fail early when setting Text color to a non-color…
timhoffm Feb 27, 2021
3c11289
Merge pull request #19614 from meeseeksmachine/auto-backport-of-pr-19…
QuLogic Mar 2, 2021
caa20cc
Merge pull request #19615 from meeseeksmachine/auto-backport-of-pr-19…
QuLogic Mar 2, 2021
6730d55
Merge pull request #19617 from meeseeksmachine/auto-backport-of-pr-19…
tacaswell Mar 2, 2021
b4870ee
Merge pull request #19616 from meeseeksmachine/auto-backport-of-pr-19…
QuLogic Mar 2, 2021
a8ce1a4
Backport PR #19548: Increase tolerances for other arches.
tacaswell Mar 3, 2021
ed2827a
Backport PR #19596: Fix for issue 17769: wx interactive figure close …
tacaswell Mar 3, 2021
7a3b3b6
Merge pull request #19630 from meeseeksmachine/auto-backport-of-pr-19…
QuLogic Mar 3, 2021
c8591c6
Merge pull request #19629 from meeseeksmachine/auto-backport-of-pr-19…
QuLogic Mar 3, 2021
1c0c680
Backport PR #19582: Add kerning to single-byte strings in PDFs
QuLogic Mar 4, 2021
70efef0
Backport PR #19632: Fix handling of warn keyword in in Figure.show.
QuLogic Mar 4, 2021
637bb74
Merge pull request #19637 from meeseeksmachine/auto-backport-of-pr-19…
tacaswell Mar 4, 2021
f8305e5
Merge pull request #19638 from meeseeksmachine/auto-backport-of-pr-19…
tacaswell Mar 4, 2021
62783af
Backport PR #19639: FIX: do not allow single element list of str in s…
QuLogic Mar 4, 2021
84b9a88
Merge pull request #19640 from meeseeksmachine/auto-backport-of-pr-19…
QuLogic Mar 4, 2021
5c536dc
Backport PR #19611: Fix double picks.
QuLogic Mar 5, 2021
6414315
Merge pull request #19644 from meeseeksmachine/auto-backport-of-pr-19…
QuLogic Mar 5, 2021
a05c21f
Backport PR #19645: Fix comment in RectangleSelector
tacaswell Mar 5, 2021
84e525d
Backport PR #19643: Don't turn check_for_pgf into public API.
tacaswell Mar 5, 2021
fc362fc
Backport PR #19625: Restore _AxesStack to track a Figure's Axes order.
jklymak Mar 5, 2021
8dc9a2f
Merge pull request #19648 from meeseeksmachine/auto-backport-of-pr-19…
QuLogic Mar 6, 2021
7bde7fd
Merge pull request #19647 from meeseeksmachine/auto-backport-of-pr-19…
QuLogic Mar 6, 2021
df253bc
Merge pull request #19650 from meeseeksmachine/auto-backport-of-pr-19…
QuLogic Mar 6, 2021
7dd6029
Backport PR #19618: FIX: make the cache in font_manager._get_font key…
QuLogic Mar 6, 2021
b1efe69
Merge pull request #19651 from meeseeksmachine/auto-backport-of-pr-19…
QuLogic Mar 6, 2021
9e11b92
Backport PR #19649: Use globals() instead of locals() for adding colo…
anntzer Mar 6, 2021
59b32af
Merge pull request #19652 from meeseeksmachine/auto-backport-of-pr-19…
dstansby Mar 6, 2021
f906502
Backport PR #19663: ENH: add a copy method to colormaps
QuLogic Mar 9, 2021
4a283e5
Backport PR #19661: Fix CoC link
QuLogic Mar 8, 2021
2cc43e1
Merge pull request #19668 from meeseeksmachine/auto-backport-of-pr-19…
QuLogic Mar 9, 2021
3953935
Merge pull request #19669 from meeseeksmachine/auto-backport-of-pr-19…
QuLogic Mar 9, 2021
0f58558
Backport PR #19671: Fix crash in early window raise in gtk3.
QuLogic Mar 10, 2021
4f55c20
Merge pull request #19678 from meeseeksmachine/auto-backport-of-pr-19…
QuLogic Mar 10, 2021
25a1fa1
DOC: Update GitHub stats for 3.4.0.
QuLogic Mar 11, 2021
4ec747d
REL: v3.4.0rc2
QuLogic Mar 11, 2021
6498226
BLD: bump branch away from tag
QuLogic Mar 11, 2021
a267513
Backport PR #19402: Build aarch64 wheels
tacaswell Mar 10, 2021
5bad75a
Merge pull request #19680 from meeseeksmachine/auto-backport-of-pr-19…
QuLogic Mar 11, 2021
9822230
DOC: Update GitHub stats for 3.4.0.
QuLogic Mar 11, 2021
3193f34
REL: v3.4.0rc3
QuLogic Mar 11, 2021
d6d78a5
BLD: bump branch away from tag
QuLogic Mar 11, 2021
41fc69d
Backport PR #19665: Changed FormatStrFormatter documentation to inclu…
The-Inky Mar 10, 2021
736ac0c
Merge pull request #19696 from meeseeksmachine/auto-backport-of-pr-19…
QuLogic Mar 13, 2021
4c7db09
Backport PR #19690: Only warn about existing redirects if content dif…
jklymak Mar 13, 2021
09c2648
Merge pull request #19697 from meeseeksmachine/auto-backport-of-pr-19…
QuLogic Mar 13, 2021
86cdc4c
Backport PR #19695: DOC: Increase size of headings
timhoffm Mar 13, 2021
bb72d72
Merge pull request #19699 from meeseeksmachine/auto-backport-of-pr-19…
timhoffm Mar 14, 2021
0e0cc72
Backport PR #19709: Fix arrow_guide.py typo
timhoffm Mar 15, 2021
3e4318f
Merge pull request #19711 from meeseeksmachine/auto-backport-of-pr-19…
QuLogic Mar 15, 2021
5b59bbb
Backport PR #19707: DOC: fix dx in Arrow guide
dstansby Mar 15, 2021
fae007b
Merge pull request #19712 from meeseeksmachine/auto-backport-of-pr-19…
QuLogic Mar 16, 2021
31e862d
DOC: Prepare What's new page for 3.4.0.
QuLogic Mar 16, 2021
ba2c694
DOC: Add more plots to What's new for 3.4.
QuLogic Mar 16, 2021
12d0754
Move image.cmap what's new to rcParams section.
QuLogic Mar 17, 2021
0057b42
Backport PR #19505: Move some advanced documentation away from Instal…
story645 Mar 17, 2021
b4efc2f
DOC: Add additional what's new entries.
QuLogic Mar 18, 2021
878db27
Merge pull request #19726 from meeseeksmachine/auto-backport-of-pr-19…
QuLogic Mar 18, 2021
d687d0f
Backport PR #19741: Only override pickradius when picker is not a bool.
tacaswell Mar 19, 2021
8d72bd3
Merge pull request #19742 from meeseeksmachine/auto-backport-of-pr-19…
QuLogic Mar 19, 2021
8acfd0a
Merge pull request #19713 from QuLogic/whatsnew-v340
tacaswell Mar 19, 2021
e849cfc
DOC: Move 3.4.0 development docs to final location.
QuLogic Mar 11, 2021
fa6c7e1
DOC: Set 3.4.0 API changes to be current version.
QuLogic Mar 11, 2021
64c25c2
DOC: Move 3.4.0 removal docs to final location.
QuLogic Mar 11, 2021
7f0296f
DOC: Move 3.4.0 behaviour change docs to final location.
QuLogic Mar 12, 2021
1239dd4
Backport PR #19746: Fix resizing in nbAgg.
jklymak Mar 22, 2021
4822f7d
DOC: Move 3.4.0 deprecation docs to final location.
QuLogic Mar 12, 2021
d81d15d
DOC: Add an API note about Qhull changes.
QuLogic Mar 18, 2021
171f2bd
Merge pull request #19761 from meeseeksmachine/auto-backport-of-pr-19…
tacaswell Mar 24, 2021
7e64b28
Merge pull request #19689 from QuLogic/api-docs-v340
tacaswell Mar 24, 2021
9bb6b1e
Backport PR #19762: FIX: do not report that webagg supports blitting
QuLogic Mar 24, 2021
411ee0a
Merge pull request #19764 from meeseeksmachine/auto-backport-of-pr-19…
timhoffm Mar 24, 2021
841b43c
Backport PR #19766: Set colormap modification removal to 3.6.
anntzer Mar 25, 2021
51b8ebc
Merge pull request #19767 from meeseeksmachine/auto-backport-of-pr-19…
tacaswell Mar 25, 2021
887ec5f
Backport PR #19739: Changed 'python -mpip' to 'python -m pip' for con…
jklymak Mar 21, 2021
b0e73d0
Backport PR #19757: Fixed python -mpip typo
jklymak Mar 22, 2021
705123c
Merge pull request #19770 from meeseeksmachine/auto-backport-of-pr-19…
QuLogic Mar 25, 2021
d9c63f4
Merge pull request #19771 from meeseeksmachine/auto-backport-of-pr-19…
QuLogic Mar 25, 2021
b46c7c5
Backport PR #19535: Fix example's BasicUnit array conversion.
tacaswell Mar 25, 2021
bdb7774
Merge pull request #19772 from meeseeksmachine/auto-backport-of-pr-19…
QuLogic Mar 25, 2021
8f2f97a
Fix deprecation for imread on URLs.
QuLogic Mar 25, 2021
dffe59f
Merge pull request #19775 from QuLogic/fix-imread-deprecation
QuLogic Mar 26, 2021
7aaf43b
DOC: Update GitHub stats for 3.4.0.
QuLogic Mar 26, 2021
53ba85e
REL: v3.4.0
QuLogic Mar 26, 2021
7747a1e
BLD: bump branch away from tag
QuLogic Mar 26, 2021
cb03754
DOC: Add Zenodo DOI for 3.4.0.
QuLogic Mar 26, 2021
daadab5
Backport PR #19719: Respect antialiasing settings in cairo backends a…
timhoffm Mar 17, 2021
81c2a22
Merge pull request #19783 from meeseeksmachine/auto-backport-of-pr-19…
timhoffm Mar 27, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ install:
- conda install -c conda-forge pywin32
- echo %PYTHON_VERSION% %TARGET_ARCH%
# Install dependencies from PyPI.
- python -mpip install --upgrade -r requirements/testing/all.txt %EXTRAREQS% %PINNEDVERS%
- python -m pip install --upgrade -r requirements/testing/all.txt %EXTRAREQS% %PINNEDVERS%
# Install optional dependencies from PyPI.
# Sphinx is needed to run sphinxext tests
- python -mpip install --upgrade sphinx
- python -m pip install --upgrade sphinx
# Show the installed packages + versions
- conda list

Expand Down
13 changes: 7 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ commands:
- run:
name: Upgrade pip, setuptools, wheel
command: |
python -mpip install --upgrade --user pip
python -mpip install --upgrade --user wheel
python -mpip install --upgrade --user setuptools
python -m pip install --upgrade --user pip
python -m pip install --upgrade --user wheel
python -m pip install --upgrade --user setuptools

deps-install:
parameters:
Expand All @@ -67,14 +67,15 @@ commands:
- run:
name: Install Python dependencies
command: |
python -mpip install --user numpy<< parameters.numpy_version >> codecov coverage
python -mpip install --user -r requirements/doc/doc-requirements.txt
python -m pip install --user \
numpy<< parameters.numpy_version >> codecov coverage \
-r requirements/doc/doc-requirements.txt

mpl-install:
steps:
- run:
name: Install Matplotlib
command: python -mpip install --user -ve .
command: python -m pip install --user -ve .

doc-build:
steps:
Expand Down
45 changes: 39 additions & 6 deletions .github/workflows/cibuildwheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,24 @@ jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
env:
min-numpy-version: "1.16.0"
min-numpy-hash: "04/b6/d7faa70a3e3eac39f943cc6a6a64ce378259677de516bd899dd9eb8f9b32"
strategy:
matrix:
os: [ubuntu-18.04, windows-latest, macos-latest]
cibw_archs: ["auto"]
include:
- os: ubuntu-18.04
cibw_archs: "aarch64"

steps:
- name: Set up QEMU
if: matrix.cibw_archs == 'aarch64'
uses: docker/setup-qemu-action@v1
with:
platforms: arm64

- uses: actions/checkout@v2
with:
fetch-depth: 0
Expand All @@ -26,9 +39,26 @@ jobs:
with:
python-version: '3.7'

- uses: actions/cache@v2
id: numpy-cache
with:
path: numpy-aarch64-cache/
key: numpy-${{ matrix.cibw_archs }}-cache-${{ env.min-numpy-version }}

- name: Install cibuildwheel
run: |
python -m pip install cibuildwheel==1.6.3
python -m pip install cibuildwheel==1.9.0

- name: Build minimum NumPy for aarch64
if: matrix.cibw_archs == 'aarch64' && steps.numpy-cache.outputs.cache-hit != 'true'
run: |
wget https://files.pythonhosted.org/packages/${{ env.min-numpy-hash }}/numpy-${{ env.min-numpy-version }}.zip
unzip numpy-${{ env.min-numpy-version }}.zip
cd numpy-${{ env.min-numpy-version }}
python -m cibuildwheel --output-dir ../numpy-aarch64-cache
env:
CIBW_BUILD: "cp36-* cp37-* cp38-*"
CIBW_ARCHS: aarch64

- name: Copy setup.cfg to configure wheel
run: |
Expand All @@ -43,17 +73,18 @@ jobs:
CIBW_MANYLINUX_I686_IMAGE: manylinux1
CIBW_BEFORE_BUILD: pip install certifi numpy==1.19.3
MPL_DISABLE_FH4: "yes"
CIBW_ARCHS: ${{ matrix.cibw_archs }}

- name: Build wheels for CPython
run: |
python -m cibuildwheel --output-dir dist
env:
CIBW_BUILD: "cp3?-*"
CIBW_SKIP: "cp35-* cp36-* cp39-*"
CIBW_BUILD: "cp37-* cp38-*"
CIBW_MANYLINUX_X86_64_IMAGE: manylinux1
CIBW_MANYLINUX_I686_IMAGE: manylinux1
CIBW_BEFORE_BUILD: pip install certifi numpy==1.16
CIBW_BEFORE_BUILD: pip install certifi; pip install --find-links=numpy-aarch64-cache/ numpy==${{ env.min-numpy-version }}
MPL_DISABLE_FH4: "yes"
CIBW_ARCHS: ${{ matrix.cibw_archs }}

- name: Build wheels for CPython 3.6
run: |
Expand All @@ -62,8 +93,9 @@ jobs:
CIBW_BUILD: "cp36-*"
CIBW_MANYLINUX_X86_64_IMAGE: manylinux1
CIBW_MANYLINUX_I686_IMAGE: manylinux1
CIBW_BEFORE_BUILD: pip install certifi numpy==1.16
CIBW_BEFORE_BUILD: pip install certifi; pip install --find-links=numpy-aarch64-cache/ numpy==${{ env.min-numpy-version }}
MPL_DISABLE_FH4: "yes"
CIBW_ARCHS: ${{ matrix.cibw_archs }}
if: >
startsWith(github.ref, 'refs/heads/v3.3') ||
startsWith(github.ref, 'refs/tags/v3.3')
Expand All @@ -73,7 +105,8 @@ jobs:
python -m cibuildwheel --output-dir dist
env:
CIBW_BUILD: "pp3?-*"
CIBW_BEFORE_BUILD: pip install certifi numpy==1.16
CIBW_BEFORE_BUILD: pip install certifi numpy==${{ env.min-numpy-version }}
CIBW_ARCHS: ${{ matrix.cibw_archs }}
if: >
runner.os != 'Windows' && (
startsWith(github.ref, 'refs/heads/v3.3') ||
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,17 +137,17 @@ jobs:
run: |
# Upgrade pip and setuptools and wheel to get as clean an install as
# possible.
python -mpip install --upgrade pip setuptools wheel
python -m pip install --upgrade pip setuptools wheel

# Install dependencies from PyPI.
python -mpip install --upgrade $PRE \
python -m pip install --upgrade $PRE \
cycler kiwisolver numpy pillow pyparsing python-dateutil \
-r requirements/testing/all.txt \
${{ matrix.extra-requirements }}

# Install optional dependencies from PyPI.
# Sphinx is needed to run sphinxext tests
python -mpip install --upgrade sphinx
python -m pip install --upgrade sphinx

# GUI toolkits are pip-installable only for some versions of Python
# so don't fail if we can't install them. Make it easier to check
Expand All @@ -160,8 +160,8 @@ jobs:
# pycairo 1.20+ requires a new version of Cairo, unavailable on
# Ubuntu 16.04, so PyGObject must be installed without build
# isolation in order to pick up the lower pre-installed version.
python -mpip install --upgrade 'pycairo<1.20.0' 'cairocffi>=0.8' &&
python -mpip install --upgrade --no-build-isolation PyGObject &&
python -m pip install --upgrade 'pycairo<1.20.0' 'cairocffi>=0.8' &&
python -m pip install --upgrade --no-build-isolation PyGObject &&
python -c 'import gi; gi.require_version("Gtk", "3.0"); from gi.repository import Gtk' &&
echo 'PyGObject is available' ||
echo 'PyGObject is not available'
Expand All @@ -170,16 +170,16 @@ jobs:
# Sept 2020) for either pyqt5 (there are only wheels for 10.13+) or
# pyside2 (the latest version (5.13.2) with 10.12 wheels has a
# fatal to us bug, it was fixed in 5.14.0 which has 10.13 wheels)
python -mpip install --upgrade pyqt5${{ matrix.pyqt5-ver }} &&
python -m pip install --upgrade pyqt5${{ matrix.pyqt5-ver }} &&
python -c 'import PyQt5.QtCore' &&
echo 'PyQt5 is available' ||
echo 'PyQt5 is not available'
python -mpip install --upgrade pyside2 &&
python -m pip install --upgrade pyside2 &&
python -c 'import PySide2.QtCore' &&
echo 'PySide2 is available' ||
echo 'PySide2 is not available'
fi
python -mpip install --upgrade \
python -m pip install --upgrade \
-f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-16.04 \
wxPython &&
python -c 'import wx' &&
Expand All @@ -199,7 +199,7 @@ jobs:

# All dependencies must have been pre-installed, so that the minver
# constraints are held.
python -mpip install --no-deps -e .
python -m pip install --no-deps -e .

if [[ "${{ runner.os }}" != 'macOS' ]]; then
unset CPPFLAGS
Expand Down
155 changes: 4 additions & 151 deletions INSTALL.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ precompiled wheel for your OS and Python.
TkAgg.

For support of other GUI frameworks, LaTeX rendering, saving
animations and a larger selection of file formats, you need to
install :ref:`additional dependencies <install_requirements>`.
animations and a larger selection of file formats, you can
install :ref:`optional_dependencies`.

Although not required, we suggest also installing ``IPython`` for
interactive use. To easily install a complete Scientific Python
Expand Down Expand Up @@ -73,6 +73,8 @@ If you are interested in contributing to Matplotlib development,
running the latest source code, or just like to build everything
yourself, it is not difficult to build Matplotlib from source.

First you need to install the :ref:`dependencies`.

A C compiler is required. Typically, on Linux, you will need ``gcc``, which
should be installed using your distribution's package manager; on macOS, you
will need xcode_; on Windows, you will need Visual Studio 2015 or later.
Expand Down Expand Up @@ -135,149 +137,6 @@ file will be particularly useful to those packaging Matplotlib.

.. _setup.cfg: https://raw.githubusercontent.com/matplotlib/matplotlib/master/setup.cfg.template

.. _install_requirements:

Dependencies
------------

Matplotlib will automatically install dependencies when you install with
``pip``, so this section is mostly for your reference.

Matplotlib requires the following dependencies:

* `Python <https://www.python.org/downloads/>`_ (>= 3.7)
* `NumPy <https://numpy.org>`_ (>= 1.16)
* `setuptools <https://setuptools.readthedocs.io/en/latest/>`_
* `cycler <https://matplotlib.org/cycler/>`_ (>= 0.10.0)
* `dateutil <https://pypi.org/project/python-dateutil>`_ (>= 2.7)
* `kiwisolver <https://github.com/nucleic/kiwi>`_ (>= 1.0.1)
* `Pillow <https://pillow.readthedocs.io/en/latest/>`_ (>= 6.2)
* `pyparsing <https://pypi.org/project/pyparsing/>`_ (>=2.2.1)

Optionally, you can also install a number of packages to enable better user
interface toolkits. See :ref:`what-is-a-backend` for more details on the
optional Matplotlib backends and the capabilities they provide.

* Tk_ (>= 8.3, != 8.6.0 or 8.6.1): for the Tk-based backends.
* PyQt4_ (>= 4.6) or PySide_ (>= 1.0.3) [#]_: for the Qt4-based backends.
* PyQt5_ or PySide2_: for the Qt5-based backends.
* PyGObject_: for the GTK3-based backends [#]_.
* wxPython_ (>= 4) [#]_: for the wx-based backends.
* pycairo_ (>= 1.11.0) or cairocffi_ (>= 0.8): for the GTK3 and/or cairo-based
backends.
* Tornado_: for the WebAgg backend.

.. _Tk: https://docs.python.org/3/library/tk.html
.. _PyQt4: https://pypi.org/project/PyQt4
.. _PySide: https://pypi.org/project/PySide
.. _PyQt5: https://pypi.org/project/PyQt5
.. _PySide2: https://pypi.org/project/PySide2
.. _PyGObject: https://pygobject.readthedocs.io/en/latest/
.. _wxPython: https://www.wxpython.org/
.. _pycairo: https://pycairo.readthedocs.io/en/latest/
.. _cairocffi: https://cairocffi.readthedocs.io/en/latest/
.. _Tornado: https://pypi.org/project/tornado

.. [#] PySide cannot be pip-installed on Linux (but can be conda-installed).
.. [#] If using pip (and not conda), PyGObject must be built from source; see
https://pygobject.readthedocs.io/en/latest/devguide/dev_environ.html.
.. [#] If using pip (and not conda) on Linux, wxPython wheels must be manually
downloaded from https://wxpython.org/pages/downloads/.

For better support of animation output format and image file formats, LaTeX,
etc., you can install the following:

* `ffmpeg <https://www.ffmpeg.org/>`_: for saving movies.
* `ImageMagick <https://www.imagemagick.org/script/index.php>`_: for saving
animated gifs.
* `LaTeX <https://www.latex-project.org/>`_ (with `cm-super
<https://ctan.org/pkg/cm-super>`__ ) and `GhostScript (>=9.0)
<https://ghostscript.com/download/>`_ : for rendering text with
LaTeX.
* `fontconfig <https://www.fontconfig.org>`_ (>= 2.7): for detection of system
fonts on Linux.

FreeType and Qhull
------------------

Matplotlib depends on FreeType_ (>= 2.3), a font rendering library, and on
Qhull_ (>= 2020.2), a library for computing triangulations. By default,
Matplotlib downloads and builds its own copies of FreeType (this is necessary
to run the test suite, because different versions of FreeType rasterize
characters differently) and of Qhull. As an exception, Matplotlib defaults to
the system version of FreeType on AIX.

.. _FreeType: https://www.freetype.org/
.. _Qhull: http://www.qhull.org/

To force Matplotlib to use a copy of FreeType or Qhull already installed in
your system, create a :file:`setup.cfg` file with the following contents:

.. code-block:: cfg

[libs]
system_freetype = true
system_qhull = true

before running ``python -m pip install .``.

In this case, you need to install the FreeType and Qhull library and headers.
This can be achieved using a package manager, e.g. for FreeType:

.. code-block:: sh

# Pick ONE of the following:
sudo apt install libfreetype6-dev # Debian/Ubuntu
sudo dnf install freetype-devel # Fedora
brew install freetype # macOS with Homebrew
conda install freetype # conda, any OS

(adapt accordingly for Qhull).

On Linux and macOS, it is also recommended to install pkg-config_, a helper
tool for locating FreeType:

.. code-block:: sh

# Pick ONE of the following:
sudo apt install pkg-config # Debian/Ubuntu
sudo dnf install pkgconf # Fedora
brew install pkg-config # macOS with Homebrew
conda install pkg-config # conda
# Or point the PKG_CONFIG environment variable to the path to pkg-config:
export PKG_CONFIG=...

.. _pkg-config: https://www.freedesktop.org/wiki/Software/pkg-config/

If not using pkg-config (in particular on Windows), you may need to set the
include path (to the library headers) and link path (to the libraries)
explicitly, if they are not in standard locations. This can be done using
standard environment variables -- on Linux and OSX:

.. code-block:: sh

export CFLAGS='-I/directory/containing/ft2build.h'
export LDFLAGS='-L/directory/containing/libfreetype.so'

and on Windows:

.. code-block:: bat

set CL=/IC:\directory\containing\ft2build.h
set LINK=/LIBPATH:C:\directory\containing\freetype.lib

.. note::

Matplotlib always uses its own copies of the following libraries:

- ``Agg``: the Anti-Grain Geometry C++ rendering engine;
- ``ttconv``: a TrueType font utility.

If you go this route but need to reset and rebuild to change your settings,
remember to clear your artifacts before re-building::

git clean -xfd

Building on Windows
-------------------

Expand All @@ -286,9 +145,3 @@ Visual Studio 2015 or later.

If you are building your own Matplotlib wheels (or sdists), note that any DLLs
that you copy into the source tree will be packaged too.

Conda packages
--------------

The conda packaging scripts for Matplotlib are available at
https://github.com/conda-forge/matplotlib-feedstock.
Loading