diff --git a/.appveyor.yml b/.appveyor.yml
index 0e8e0a553fd4..63801100307d 100644
--- a/.appveyor.yml
+++ b/.appveyor.yml
@@ -11,6 +11,8 @@ branches:
clone_depth: 50
+image: Visual Studio 2017
+
environment:
global:
@@ -18,20 +20,14 @@ environment:
PYTHONIOENCODING: UTF-8
PYTEST_ARGS: -raR --numprocesses=auto --timeout=300 --durations=25
--cov-report= --cov=lib --log-level=DEBUG
- PINNEDVERS: "pyzmq!=21.0.0 pyzmq!=22.0.0"
matrix:
- # In theory we could use a single CONDA_INSTALL_LOCN because we construct
- # the envs anyway. But using one for the right python version hopefully
- # making things faster due to package caching.
- - PYTHON_VERSION: "3.7"
- CONDA_INSTALL_LOCN: "C:\\Miniconda37-x64"
- TEST_ALL: "no"
- EXTRAREQS: "-r requirements/testing/extra.txt"
- PYTHON_VERSION: "3.8"
- CONDA_INSTALL_LOCN: "C:\\Miniconda37-x64"
+ CONDA_INSTALL_LOCN: "C:\\Miniconda3-x64"
+ TEST_ALL: "no"
+ - PYTHON_VERSION: "3.9"
+ CONDA_INSTALL_LOCN: "C:\\Miniconda3-x64"
TEST_ALL: "no"
- EXTRAREQS: "-r requirements/testing/extra.txt"
# We always use a 64-bit machine, but can build x86 distributions
# with the PYTHON_ARCH variable
@@ -55,17 +51,13 @@ install:
- conda config --prepend channels conda-forge
# For building, use a new environment
- - conda create -q -n test-environment python=%PYTHON_VERSION% tk
- - activate test-environment
- # pull pywin32 from conda because on py38 there is something wrong with finding
- # the dlls when insalled from pip
+ # Add python version to environment
+ # `^ ` escapes spaces for indentation
+ - echo ^ ^ - python=%PYTHON_VERSION% >> environment.yml
+ - conda env create -f environment.yml
+ - activate mpl-dev
- conda install -c conda-forge pywin32
- echo %PYTHON_VERSION% %TARGET_ARCH%
- # Install dependencies from PyPI.
- - 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 -m pip install --upgrade sphinx
# Show the installed packages + versions
- conda list
@@ -89,23 +81,13 @@ test_script:
- echo The following args are passed to pytest %PYTEST_ARGS%
- pytest %PYTEST_ARGS%
-after_test:
- # After the tests were a success, build wheels.
- # Hide the output, the copied files really clutter the build log...
- - 'python setup.py bdist_wheel > NUL:'
- - dir dist\
- - echo finished...
-
artifacts:
- - path: dist\*
- name: packages
-
- path: result_images\*
name: result_images
type: zip
on_finish:
- - pip install codecov
+ - conda install codecov
- codecov -e PYTHON_VERSION PLATFORM
on_failure:
diff --git a/.circleci/config.yml b/.circleci/config.yml
index e70b1befe053..9c1f09172060 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -9,6 +9,34 @@ version: 2.1
#
commands:
+ check-skip:
+ steps:
+ - run:
+ name: Check-skip
+ command: |
+ export git_log=$(git log --max-count=1 --pretty=format:"%B" | tr "\n" " ")
+ echo "Got commit message:"
+ echo "${git_log}"
+ if [[ -v CIRCLE_PULL_REQUEST ]] && ([[ "$git_log" == *"[skip circle]"* ]] || [[ "$git_log" == *"[circle skip]"* ]]); then
+ echo "Skip detected, exiting job ${CIRCLE_JOB} for PR ${CIRCLE_PULL_REQUEST}."
+ circleci-agent step halt;
+ fi
+
+ merge:
+ steps:
+ - run:
+ name: Merge with upstream
+ command: |
+ if ! git remote -v | grep upstream; then
+ git remote add upstream https://github.com/matplotlib/matplotlib.git
+ fi
+ git fetch upstream
+ if [[ "$CIRCLE_BRANCH" != "main" ]] && \
+ [[ "$CIRCLE_PR_NUMBER" != "" ]]; then
+ echo "Merging ${CIRCLE_PR_NUMBER}"
+ git pull --ff-only upstream "refs/pull/${CIRCLE_PR_NUMBER}/merge"
+ fi
+
apt-install:
steps:
- run:
@@ -27,10 +55,12 @@ commands:
texlive-latex-recommended \
texlive-pictures \
texlive-xetex \
+ ttf-wqy-zenhei \
graphviz \
fonts-crosextra-carlito \
fonts-freefont-otf \
fonts-humor-sans \
+ fonts-noto-cjk \
optipng
fonts-install:
@@ -56,9 +86,9 @@ commands:
command: |
python -m pip install --upgrade --user pip
python -m pip install --upgrade --user wheel
- python -m pip install --upgrade --user setuptools
+ python -m pip install --upgrade --user 'setuptools!=60.6.0'
- deps-install:
+ doc-deps-install:
parameters:
numpy_version:
type: string
@@ -67,6 +97,8 @@ commands:
- run:
name: Install Python dependencies
command: |
+ python -m pip install --no-deps --user \
+ git+https://github.com/matplotlib/mpl-sphinx-theme.git
python -m pip install --user \
numpy<< parameters.numpy_version >> codecov coverage \
-r requirements/doc/doc-requirements.txt
@@ -75,7 +107,22 @@ commands:
steps:
- run:
name: Install Matplotlib
- command: python -m pip install --user -ve .
+ command: |
+ if [[ "$CIRCLE_BRANCH" == v*-doc ]]; then
+ # The v*-doc branches must build against the specified release.
+ version=${CIRCLE_BRANCH%-doc}
+ version=${version#v}
+ python -m pip install matplotlib==${version}
+ else
+ python -m pip install --user -ve .
+ fi
+ - save_cache:
+ key: build-deps-1
+ paths:
+ # FreeType 2.6.1 tarball.
+ - ~/.cache/matplotlib/0a3c7dfbda6da1e8fce29232e8e96d987ababbbf71ebc8c75659e4132c367014
+ # Qhull 2020.2 tarball.
+ - ~/.cache/matplotlib/b5c2d7eb833278881b952c8a52d20179eab87766b00b865000469a45c1838b7e
doc-build:
steps:
@@ -88,15 +135,14 @@ commands:
command: |
# Set epoch to date of latest tag.
export SOURCE_DATE_EPOCH="$(git log -1 --format=%at $(git describe --abbrev=0))"
- # Include analytics only when deploying to devdocs.
- if [ "$CIRCLE_PROJECT_USERNAME" != "matplotlib" ] || \
- [ "$CIRCLE_BRANCH" != "master" ] || \
- [[ "$CIRCLE_PULL_REQUEST" == https://github.com/matplotlib/matplotlib/pull/* ]]; then
- export ANALYTICS=False
- else
- export ANALYTICS=True
+ # Set release mode only when deploying to devdocs.
+ if [ "$CIRCLE_PROJECT_USERNAME" = "matplotlib" ] && \
+ [ "$CIRCLE_BRANCH" = "main" ] && \
+ [ "$CIRCLE_PR_NUMBER" = "" ]; then
+ export RELEASE_TAG='-t release'
fi
- make html O="-T -Ainclude_analytics=$ANALYTICS"
+ mkdir -p logs
+ make html O="-T $RELEASE_TAG -j4 -w /tmp/sphinxerrorswarnings.log"
rm -r build/html/_sources
working_directory: doc
- save_cache:
@@ -104,11 +150,51 @@ commands:
paths:
- doc/build/doctrees
+ doc-show-errors-warnings:
+ steps:
+ - run:
+ name: Extract possible build errors and warnings
+ command: |
+ (grep "WARNING\|ERROR" /tmp/sphinxerrorswarnings.log ||
+ echo "No errors or warnings")
+ # Save logs as an artifact, and convert from absolute paths to
+ # repository-relative paths.
+ sed "s~$PWD/~~" /tmp/sphinxerrorswarnings.log > \
+ doc/logs/sphinx-errors-warnings.log
+ when: always
+ - store_artifacts:
+ path: doc/logs/sphinx-errors-warnings.log
+
+ doc-show-deprecations:
+ steps:
+ - run:
+ name: Extract possible deprecation warnings in examples and tutorials
+ command: |
+ (grep -rl DeprecationWarning doc/build/html/gallery ||
+ echo "No deprecation warnings in gallery")
+ (grep -rl DeprecationWarning doc/build/html/plot_types ||
+ echo "No deprecation warnings in plot_types")
+ (grep -rl DeprecationWarning doc/build/html/tutorials ||
+ echo "No deprecation warnings in tutorials")
+ # Save deprecations that are from this absolute directory, and
+ # convert to repository-relative paths.
+ (grep -Ero --no-filename "$PWD/.+DeprecationWarning.+$" \
+ doc/build/html/{gallery,plot_types,tutorials} || echo) | \
+ sed "s~$PWD/~~" > doc/logs/sphinx-deprecations.log
+ when: always
+ - store_artifacts:
+ path: doc/logs/sphinx-deprecations.log
+
doc-bundle:
steps:
- run:
name: Bundle sphinx-gallery documentation artifacts
- command: tar cf doc/build/sphinx-gallery-files.tar.gz doc/api/_as_gen doc/gallery doc/tutorials
+ command: >
+ tar cf doc/build/sphinx-gallery-files.tar.gz
+ doc/api/_as_gen
+ doc/gallery
+ doc/plot_types
+ doc/tutorials
when: always
- store_artifacts:
path: doc/build/sphinx-gallery-files.tar.gz
@@ -119,70 +205,37 @@ commands:
#
jobs:
- docs-python37:
- docker:
- - image: circleci/python:3.7
- steps:
- - checkout
-
- - apt-install
- - fonts-install
- - pip-install
-
- - deps-install
- - mpl-install
-
- - doc-build
-
- - doc-bundle
-
- - store_artifacts:
- path: doc/build/html
-
- docs-python38-min:
- docker:
- - image: circleci/python:3.8
- steps:
- - checkout
-
- - apt-install
- - fonts-install
- - pip-install
-
- - deps-install:
- numpy_version: "==1.16.0"
- - mpl-install
-
- - doc-build
-
- - doc-bundle
-
- - store_artifacts:
- path: doc/build/html
-
docs-python38:
docker:
- - image: circleci/python:3.8
+ - image: cimg/python:3.8
+ resource_class: large
steps:
- checkout
+ - check-skip
+ - merge
- apt-install
- fonts-install
- pip-install
- - deps-install
- mpl-install
+ - doc-deps-install
- doc-build
+ - doc-show-errors-warnings
+ - doc-show-deprecations
- doc-bundle
- store_artifacts:
path: doc/build/html
+ - store_test_results:
+ path: doc/build/test-results
- add_ssh_keys:
fingerprints:
- - "78:13:59:08:61:a9:e5:09:af:df:3a:d8:89:c2:84:c0"
+ - "be:c3:c1:d8:fb:a1:0e:37:71:72:d7:a3:40:13:8f:14"
+
- deploy:
name: "Deploy new docs"
command: ./.circleci/deploy-docs.sh
@@ -195,6 +248,6 @@ workflows:
version: 2
build:
jobs:
- - docs-python37
+ # NOTE: If you rename this job, then you must update the `if` condition
+ # and `circleci-jobs` option in `.github/workflows/circleci.yml`.
- docs-python38
- - docs-python38-min
diff --git a/.circleci/deploy-docs.sh b/.circleci/deploy-docs.sh
index 83037d2561a4..8801d5fd073e 100755
--- a/.circleci/deploy-docs.sh
+++ b/.circleci/deploy-docs.sh
@@ -3,10 +3,10 @@
set -e
if [ "$CIRCLE_PROJECT_USERNAME" != "matplotlib" ] || \
- [ "$CIRCLE_BRANCH" != "master" ] || \
+ [ "$CIRCLE_BRANCH" != "main" ] || \
[[ "$CIRCLE_PULL_REQUEST" == https://github.com/matplotlib/matplotlib/pull/* ]]; then
echo "Not uploading docs for ${CIRCLE_SHA1}"\
- "from non-master branch (${CIRCLE_BRANCH})"\
+ "from non-main branch (${CIRCLE_BRANCH})"\
"or pull request (${CIRCLE_PULL_REQUEST})"\
"or non-Matplotlib org (${CIRCLE_PROJECT_USERNAME})."
exit
diff --git a/.circleci/fetch_doc_logs.py b/.circleci/fetch_doc_logs.py
new file mode 100644
index 000000000000..40452cea7792
--- /dev/null
+++ b/.circleci/fetch_doc_logs.py
@@ -0,0 +1,63 @@
+"""
+Download artifacts from CircleCI for a documentation build.
+
+This is run by the :file:`.github/workflows/circleci.yml` workflow in order to
+get the warning/deprecation logs that will be posted on commits as checks. Logs
+are downloaded from the :file:`docs/logs` artifact path and placed in the
+:file:`logs` directory.
+
+Additionally, the artifact count for a build is produced as a workflow output,
+by appending to the file specified by :env:`GITHUB_OUTPUT`.
+
+If there are no logs, an "ERROR" message is printed, but this is not fatal, as
+the initial 'status' workflow runs when the build has first started, and there
+are naturally no artifacts at that point.
+
+This script should be run by passing the CircleCI build URL as its first
+argument. In the GitHub Actions workflow, this URL comes from
+``github.event.target_url``.
+"""
+import json
+import os
+from pathlib import Path
+import sys
+from urllib.parse import urlparse
+from urllib.request import urlopen
+
+
+if len(sys.argv) != 2:
+ print('USAGE: fetch_doc_results.py CircleCI-build-url')
+ sys.exit(1)
+
+target_url = urlparse(sys.argv[1])
+*_, organization, repository, build_id = target_url.path.split('/')
+print(f'Fetching artifacts from {organization}/{repository} for {build_id}')
+
+artifact_url = (
+ f'https://circleci.com/api/v2/project/gh/'
+ f'{organization}/{repository}/{build_id}/artifacts'
+)
+print(artifact_url)
+with urlopen(artifact_url) as response:
+ artifacts = json.load(response)
+artifact_count = len(artifacts['items'])
+print(f'Found {artifact_count} artifacts')
+
+with open(os.environ['GITHUB_OUTPUT'], 'w+') as fd:
+ fd.write(f'count={artifact_count}\n')
+
+logs = Path('logs')
+logs.mkdir(exist_ok=True)
+
+found = False
+for item in artifacts['items']:
+ path = item['path']
+ if path.startswith('doc/logs/'):
+ path = Path(path).name
+ print(f'Downloading {path} from {item["url"]}')
+ with urlopen(item['url']) as response:
+ (logs / path).write_bytes(response.read())
+ found = True
+
+if not found:
+ print('ERROR: Did not find any artifact logs!')
diff --git a/.flake8 b/.flake8
index ec89adb38b2e..490ea57d9891 100644
--- a/.flake8
+++ b/.flake8
@@ -1,5 +1,5 @@
[flake8]
-max-line-length = 79
+max-line-length = 88
select =
# flake8 default
C90, E, F, W,
@@ -16,8 +16,8 @@ ignore =
# flake8 default
E121,E123,E126,E226,E24,E704,W503,W504,
# Additional ignores:
- E122, E127, E131,
- E265, E266,
+ E127, E131,
+ E266,
E305, E306,
E722, E741,
F841,
@@ -35,7 +35,6 @@ exclude =
doc/gallery
doc/tutorials
# External files.
- versioneer.py
tools/gh_api.py
tools/github_stats.py
.tox
@@ -43,52 +42,31 @@ exclude =
per-file-ignores =
setup.py: E402
- setupext.py: E501
tests.py: F401
- tools/subset.py: E221, E251, E261, E302, E501
-
- lib/matplotlib/__init__.py: F401
+ lib/matplotlib/__init__.py: E402, F401
lib/matplotlib/_api/__init__.py: F401
- lib/matplotlib/_cm.py: E202, E203, E302
+ lib/matplotlib/_cm.py: E122, E202, E203, E302
lib/matplotlib/_mathtext.py: E221, E251
- lib/matplotlib/_mathtext_data.py: E203, E261
- lib/matplotlib/animation.py: F401
+ lib/matplotlib/_mathtext_data.py: E122, E203, E261
lib/matplotlib/_animation_data.py: E501
lib/matplotlib/axes/__init__.py: F401, F403
- lib/matplotlib/axes/_axes.py: F401
- lib/matplotlib/backends/backend_*.py: F401
+ lib/matplotlib/backends/backend_template.py: F401
lib/matplotlib/backends/qt_editor/formlayout.py: F401, F403
- lib/matplotlib/cbook/__init__.py: F401
- lib/matplotlib/cbook/deprecation.py: F401
- lib/matplotlib/font_manager.py: E221, E251, E501
+ lib/matplotlib/font_manager.py: E501
lib/matplotlib/image.py: F401, F403
- lib/matplotlib/lines.py: F401
lib/matplotlib/mathtext.py: E221, E251
lib/matplotlib/pylab.py: F401, F403
lib/matplotlib/pyplot.py: F401, F811
- lib/matplotlib/style/__init__.py: F401
- lib/matplotlib/testing/conftest.py: F401
- lib/matplotlib/tests/conftest.py: F401
- lib/matplotlib/tests/test_backend_qt.py: F401
lib/matplotlib/tests/test_mathtext.py: E501
- lib/matplotlib/text.py: F401
lib/matplotlib/transforms.py: E201, E202, E203
- lib/matplotlib/tri/__init__.py: F401, F403
- lib/matplotlib/tri/triinterpolate.py: E201, E221
- lib/mpl_toolkits/axes_grid/*: F401, F403
- lib/mpl_toolkits/axes_grid1/__init__.py: F401
+ lib/matplotlib/tri/_triinterpolate.py: E201, E221
lib/mpl_toolkits/axes_grid1/axes_size.py: E272
lib/mpl_toolkits/axisartist/__init__.py: F401
lib/mpl_toolkits/axisartist/angle_helper.py: E221
- lib/mpl_toolkits/axisartist/axes_divider.py: F401
- lib/mpl_toolkits/axisartist/axes_rgb.py: F401
- lib/mpl_toolkits/axisartist/axislines.py: F401
- lib/mpl_toolkits/mplot3d/__init__.py: F401
- lib/mpl_toolkits/tests/conftest.py: F401
lib/pylab.py: F401, F403
- doc/conf.py: E402, E501
+ doc/conf.py: E402
tutorials/advanced/path_tutorial.py: E402
tutorials/advanced/patheffects_guide.py: E402
tutorials/advanced/transforms_tutorial.py: E402, E501
@@ -97,15 +75,16 @@ per-file-ignores =
tutorials/colors/colormap-manipulation.py: E402
tutorials/intermediate/artists.py: E402
tutorials/intermediate/constrainedlayout_guide.py: E402
- tutorials/intermediate/gridspec.py: E402
tutorials/intermediate/legend_guide.py: E402
tutorials/intermediate/tight_layout_guide.py: E402
tutorials/introductory/customizing.py: E501
tutorials/introductory/images.py: E402, E501
tutorials/introductory/pyplot.py: E402, E501
tutorials/introductory/sample_plots.py: E501
- tutorials/introductory/usage.py: E501
- tutorials/text/annotations.py: E501
+ tutorials/introductory/quick_start.py: E703
+ tutorials/introductory/animation_tutorial.py: E501
+ tutorials/text/annotations.py: E402, E501
+ tutorials/text/mathtext.py: E501
tutorials/text/text_intro.py: E402
tutorials/text/text_props.py: E501
tutorials/text/usetex.py: E501
@@ -113,179 +92,27 @@ per-file-ignores =
tutorials/toolkits/axisartist.py: E501
examples/animation/frame_grabbing_sgskip.py: E402
- examples/axes_grid1/inset_locator_demo.py: E402
- examples/axes_grid1/scatter_hist_locatable_axes.py: E402
- examples/axisartist/demo_curvelinear_grid.py: E402
- examples/color/color_by_yvalue.py: E402
- examples/color/color_cycle_default.py: E402
- examples/color/color_cycler.py: E402
- examples/color/color_demo.py: E402
- examples/color/colorbar_basics.py: E402
- examples/color/colormap_reference.py: E402
- examples/color/custom_cmap.py: E402
- examples/color/named_colors.py: E402
- examples/images_contours_and_fields/affine_image.py: E402
- examples/images_contours_and_fields/barb_demo.py: E402
- examples/images_contours_and_fields/barcode_demo.py: E402
- examples/images_contours_and_fields/contour_corner_mask.py: E402
- examples/images_contours_and_fields/contour_demo.py: E402
- examples/images_contours_and_fields/contour_image.py: E402
- examples/images_contours_and_fields/contourf_demo.py: E402
- examples/images_contours_and_fields/contourf_hatching.py: E402
- examples/images_contours_and_fields/contourf_log.py: E402
- examples/images_contours_and_fields/demo_bboximage.py: E402
- examples/images_contours_and_fields/image_antialiasing.py: E402
- examples/images_contours_and_fields/image_clip_path.py: E402
- examples/images_contours_and_fields/image_demo.py: E402
- examples/images_contours_and_fields/image_masked.py: E402
- examples/images_contours_and_fields/image_transparency_blend.py: E402
- examples/images_contours_and_fields/image_zcoord.py: E402
- examples/images_contours_and_fields/interpolation_methods.py: E402
- examples/images_contours_and_fields/irregulardatagrid.py: E402
- examples/images_contours_and_fields/layer_images.py: E402
- examples/images_contours_and_fields/matshow.py: E402
- examples/images_contours_and_fields/multi_image.py: E402
- examples/images_contours_and_fields/pcolor_demo.py: E402
- examples/images_contours_and_fields/plot_streamplot.py: E402
- examples/images_contours_and_fields/quadmesh_demo.py: E402
- examples/images_contours_and_fields/quiver_demo.py: E402
- examples/images_contours_and_fields/quiver_simple_demo.py: E402
- examples/images_contours_and_fields/shading_example.py: E402
- examples/images_contours_and_fields/specgram_demo.py: E402
- examples/images_contours_and_fields/spy_demos.py: E402
- examples/images_contours_and_fields/tricontour_demo.py: E201, E402
- examples/images_contours_and_fields/tricontour_smooth_delaunay.py: E402
- examples/images_contours_and_fields/tricontour_smooth_user.py: E402
- examples/images_contours_and_fields/trigradient_demo.py: E402
- examples/images_contours_and_fields/triinterp_demo.py: E402
- examples/images_contours_and_fields/tripcolor_demo.py: E201, E402
- examples/images_contours_and_fields/triplot_demo.py: E201, E402
- examples/images_contours_and_fields/watermark_image.py: E402
- examples/lines_bars_and_markers/curve_error_band.py: E402
- examples/lines_bars_and_markers/errorbar_limits_simple.py: E402
- examples/lines_bars_and_markers/fill.py: E402
- examples/lines_bars_and_markers/fill_between_demo.py: E402
- examples/lines_bars_and_markers/filled_step.py: E402
- examples/lines_bars_and_markers/stairs_demo.py: E402
- examples/lines_bars_and_markers/horizontal_barchart_distribution.py: E402
- examples/lines_bars_and_markers/joinstyle.py: E402
- examples/lines_bars_and_markers/scatter_hist.py: E402
- examples/lines_bars_and_markers/scatter_piecharts.py: E402
- examples/lines_bars_and_markers/scatter_with_legend.py: E402
- examples/lines_bars_and_markers/span_regions.py: E402
- examples/lines_bars_and_markers/stem_plot.py: E402
- examples/lines_bars_and_markers/step_demo.py: E402
- examples/lines_bars_and_markers/timeline.py: E402
- examples/lines_bars_and_markers/xcorr_acorr_demo.py: E402
- examples/misc/agg_buffer.py: E402
- examples/misc/histogram_path.py: E402
+ examples/lines_bars_and_markers/marker_reference.py: E402
+ examples/images_contours_and_fields/tricontour_demo.py: E201
+ examples/images_contours_and_fields/tripcolor_demo.py: E201
+ examples/images_contours_and_fields/triplot_demo.py: E201
examples/misc/print_stdout_sgskip.py: E402
- examples/misc/rasterization_demo.py: E402
- examples/misc/svg_filter_line.py: E402
- examples/misc/svg_filter_pie.py: E402
examples/misc/table_demo.py: E201
- examples/mplot3d/surface3d.py: E402
- examples/pie_and_polar_charts/bar_of_pie.py: E402
- examples/pie_and_polar_charts/nested_pie.py: E402
- examples/pie_and_polar_charts/pie_and_donut_labels.py: E402
- examples/pie_and_polar_charts/pie_demo2.py: E402
- examples/pie_and_polar_charts/pie_features.py: E402
- examples/pie_and_polar_charts/polar_bar.py: E402
- examples/pie_and_polar_charts/polar_demo.py: E402
- examples/pie_and_polar_charts/polar_legend.py: E402
- examples/pie_and_polar_charts/polar_scatter.py: E402
- examples/pyplots/align_ylabels.py: E402
- examples/pyplots/annotate_transform.py: E251, E402
- examples/pyplots/annotation_basic.py: E402
- examples/pyplots/annotation_polar.py: E402
- examples/pyplots/auto_subplots_adjust.py: E302, E402
- examples/pyplots/axline.py: E402
- examples/pyplots/boxplot_demo_pyplot.py: E402
- examples/pyplots/dollar_ticks.py: E402
- examples/pyplots/fig_axes_customize_simple.py: E402
- examples/pyplots/fig_axes_labels_simple.py: E402
- examples/pyplots/fig_x.py: E402
- examples/pyplots/pyplot_formatstr.py: E402
- examples/pyplots/pyplot_mathtext.py: E402
- examples/pyplots/pyplot_scales.py: E402
- examples/pyplots/pyplot_simple.py: E402
- examples/pyplots/pyplot_text.py: E402
- examples/pyplots/pyplot_three.py: E402
- examples/pyplots/pyplot_two_subplots.py: E402
- examples/pyplots/text_commands.py: E402
- examples/pyplots/text_layout.py: E402
- examples/pyplots/whats_new_1_subplot3d.py: E402
- examples/pyplots/whats_new_98_4_fill_between.py: E402
- examples/pyplots/whats_new_98_4_legend.py: E402
- examples/pyplots/whats_new_99_axes_grid.py: E402
- examples/pyplots/whats_new_99_mplot3d.py: E402
- examples/pyplots/whats_new_99_spines.py: E402
- examples/scales/power_norm.py: E402
- examples/scales/scales.py: E402
- examples/shapes_and_collections/artist_reference.py: E402
- examples/shapes_and_collections/collections.py: E402
- examples/shapes_and_collections/compound_path.py: E402
- examples/shapes_and_collections/dolphin.py: E402
- examples/shapes_and_collections/donut.py: E402
- examples/shapes_and_collections/ellipse_collection.py: E402
- examples/shapes_and_collections/ellipse_demo.py: E402
- examples/shapes_and_collections/fancybox_demo.py: E402
- examples/shapes_and_collections/hatch_demo.py: E402
- examples/shapes_and_collections/hatch_style_reference.py: E402
- examples/shapes_and_collections/line_collection.py: E402
- examples/shapes_and_collections/marker_path.py: E402
- examples/shapes_and_collections/patch_collection.py: E402
- examples/shapes_and_collections/path_patch.py: E402
- examples/shapes_and_collections/quad_bezier.py: E402
- examples/shapes_and_collections/scatter.py: E402
- examples/showcase/anatomy.py: E402
- examples/showcase/bachelors_degrees_by_gender.py: E402
- examples/showcase/firefox.py: E501
- examples/specialty_plots/anscombe.py: E402
- examples/specialty_plots/radar_chart.py: E402
- examples/specialty_plots/sankey_basics.py: E402
- examples/specialty_plots/sankey_links.py: E402
- examples/specialty_plots/sankey_rankine.py: E402
- examples/specialty_plots/skewt.py: E402
examples/style_sheets/bmh.py: E501
- examples/style_sheets/ggplot.py: E501
examples/style_sheets/plot_solarizedlight2.py: E501
- examples/subplots_axes_and_figures/axes_margins.py: E402
- examples/subplots_axes_and_figures/axes_zoom_effect.py: E402
- examples/subplots_axes_and_figures/custom_figure_class.py: E402
examples/subplots_axes_and_figures/demo_constrained_layout.py: E402
- examples/subplots_axes_and_figures/demo_tight_layout.py: E402, E501
- examples/subplots_axes_and_figures/figure_size_units.py: E402
- examples/subplots_axes_and_figures/secondary_axis.py: E402
- examples/subplots_axes_and_figures/two_scales.py: E402
- examples/subplots_axes_and_figures/zoom_inset_axes.py: E402
- examples/text_labels_and_annotations/date_index_formatter.py: E402
- examples/text_labels_and_annotations/demo_text_rotation_mode.py: E402
examples/text_labels_and_annotations/custom_legends.py: E402
- examples/text_labels_and_annotations/fancyarrow_demo.py: E402
- examples/text_labels_and_annotations/font_family_rc_sgskip.py: E402
- examples/text_labels_and_annotations/font_file.py: E402
- examples/text_labels_and_annotations/legend.py: E402
- examples/text_labels_and_annotations/line_with_text.py: E402
- examples/text_labels_and_annotations/mathtext_asarray.py: E402
- examples/text_labels_and_annotations/tex_demo.py: E402
- examples/text_labels_and_annotations/watermark_text.py: E402
- examples/ticks_and_spines/custom_ticker1.py: E402
- examples/ticks_and_spines/date_concise_formatter.py: E402
- examples/ticks_and_spines/major_minor_demo.py: E402
- examples/ticks_and_spines/tick-formatters.py: E402
- examples/ticks_and_spines/tick_labels_from_values.py: E402
- examples/user_interfaces/canvasagg.py: E402
+ examples/ticks/date_concise_formatter.py: E402
+ examples/ticks/date_formatters_locators.py: F401
examples/user_interfaces/embedding_in_gtk3_panzoom_sgskip.py: E402
examples/user_interfaces/embedding_in_gtk3_sgskip.py: E402
- examples/user_interfaces/embedding_in_qt_sgskip.py: E402
- examples/user_interfaces/gtk_spreadsheet_sgskip.py: E402
- examples/user_interfaces/mathtext_wx_sgskip.py: E402
+ examples/user_interfaces/embedding_in_gtk4_panzoom_sgskip.py: E402
+ examples/user_interfaces/embedding_in_gtk4_sgskip.py: E402
+ examples/user_interfaces/gtk3_spreadsheet_sgskip.py: E402
+ examples/user_interfaces/gtk4_spreadsheet_sgskip.py: E402
examples/user_interfaces/mpl_with_glade3_sgskip.py: E402
- examples/user_interfaces/pylab_with_gtk_sgskip.py: E302, E402
+ examples/user_interfaces/pylab_with_gtk3_sgskip.py: E402
+ examples/user_interfaces/pylab_with_gtk4_sgskip.py: E402
examples/user_interfaces/toolmanager_sgskip.py: E402
- examples/userdemo/connectionstyle_demo.py: E402
- examples/userdemo/custom_boxstyle01.py: E402
examples/userdemo/pgf_preamble_sgskip.py: E402
- examples/widgets/*.py: E402
- examples/statistics/*.py: E402
+force-check = True
diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs
new file mode 100644
index 000000000000..33ff9446d8a6
--- /dev/null
+++ b/.git-blame-ignore-revs
@@ -0,0 +1,11 @@
+# style: end-of-file-fixer pre-commit hook
+c1a33a481b9c2df605bcb9bef9c19fe65c3dac21
+
+# style: trailing-whitespace pre-commit hook
+213061c0804530d04bbbd5c259f10dc8504e5b2b
+
+# style: check-docstring-first pre-commit hook
+046533797725293dfc2a6edb9f536b25f08aa636
+
+# chore: fix spelling errors
+686c9e5a413e31c46bb049407d5eca285bcab76d
diff --git a/.git_archival.txt b/.git_archival.txt
new file mode 100644
index 000000000000..3994ec0a83ea
--- /dev/null
+++ b/.git_archival.txt
@@ -0,0 +1,4 @@
+node: $Format:%H$
+node-date: $Format:%cI$
+describe-name: $Format:%(describe:tags=true)$
+ref-names: $Format:%D$
diff --git a/.gitattributes b/.gitattributes
index 8a1657abfab3..a0c2c8627af7 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1,5 +1,6 @@
* text=auto
+*.m diff=objc
*.ppm binary
*.svg binary
*.svg linguist-language=true
-lib/matplotlib/_version.py export-subst
+.git_archival.txt export-subst
diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml
index 2bef7ab95a56..5c9afed3c02b 100644
--- a/.github/FUNDING.yml
+++ b/.github/FUNDING.yml
@@ -1,3 +1,3 @@
# These are supported funding model platforms
-github: [numfocus]
+github: [matplotlib, numfocus]
custom: https://numfocus.org/donate-to-matplotlib
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
deleted file mode 100644
index 35a1beb9b2a6..000000000000
--- a/.github/ISSUE_TEMPLATE/bug_report.md
+++ /dev/null
@@ -1,54 +0,0 @@
----
-name: Bug Report
-about: Report a bug or issue with Matplotlib
----
-
-
-
-
-### Bug report
-
-**Bug summary**
-
-
-
-**Code for reproduction**
-
-
-
-```python
-# Paste your code here
-#
-#
-```
-
-**Actual outcome**
-
-
-
-```
-# If applicable, paste the console output here
-#
-#
-```
-
-**Expected outcome**
-
-
-
-
-**Matplotlib version**
-
- * Operating system:
- * Matplotlib version (`import matplotlib; print(matplotlib.__version__)`):
- * Matplotlib backend (`print(matplotlib.get_backend())`):
- * Python version:
- * Jupyter version (if applicable):
- * Other libraries:
-
-
-
-
diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml
new file mode 100644
index 000000000000..985762649b67
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/bug_report.yml
@@ -0,0 +1,86 @@
+name: Bug Report
+description: Report a bug or issue with Matplotlib.
+title: "[Bug]: "
+body:
+ - type: textarea
+ id: summary
+ attributes:
+ label: Bug summary
+ description: Describe the bug in 1-2 short sentences
+ placeholder:
+ value:
+ validations:
+ required: true
+ - type: textarea
+ id: reproduction
+ attributes:
+ label: Code for reproduction
+ description: |
+ If possible, please provide a minimum self-contained example.
+ placeholder: Paste your code here. This field is automatically formatted as Python code.
+ render: python
+ validations:
+ required: true
+ - type: textarea
+ id: actual
+ attributes:
+ label: Actual outcome
+ description: |
+ Paste the output produced by the code provided above, e.g.
+ console output, images/videos produced by the code, any relevant screenshots/screencasts, etc.
+ validations:
+ required: true
+ - type: textarea
+ id: expected
+ attributes:
+ label: Expected outcome
+ description: Describe (or provide a visual example of) the expected outcome from the code snippet.
+ validations:
+ required: true
+ - type: textarea
+ id: details
+ attributes:
+ label: Additional information
+ description: |
+ - What are the conditions under which this bug happens? input parameters, edge cases, etc?
+ - Has this worked in earlier versions?
+ - Do you know why this bug is happening?
+ - Do you maybe even know a fix?
+ - type: input
+ id: operating-system
+ attributes:
+ label: Operating system
+ description: Windows, OS/X, Arch, Debian, Ubuntu, etc.
+ - type: input
+ id: matplotlib-version
+ attributes:
+ label: Matplotlib Version
+ description: "From Python prompt: `import matplotlib; print(matplotlib.__version__)`"
+ validations:
+ required: true
+ - type: input
+ id: matplotlib-backend
+ attributes:
+ label: Matplotlib Backend
+ description: "From Python prompt: `import matplotlib; print(matplotlib.get_backend())`"
+ - type: input
+ id: python-version
+ attributes:
+ label: Python version
+ description: "In console: `python --version`"
+ - type: input
+ id: jupyter-version
+ attributes:
+ label: Jupyter version
+ description: "In console: `jupyter notebook --version` or `jupyter lab --version`"
+ - type: dropdown
+ id: install
+ attributes:
+ label: Installation
+ description: How did you install matplotlib?
+ options:
+ - pip
+ - conda
+ - Linux package manager
+ - from source (.tar.gz)
+ - git checkout
diff --git a/.github/ISSUE_TEMPLATE/documentation.md b/.github/ISSUE_TEMPLATE/documentation.md
deleted file mode 100644
index c0857f636db6..000000000000
--- a/.github/ISSUE_TEMPLATE/documentation.md
+++ /dev/null
@@ -1,35 +0,0 @@
----
-name: Documentation improvement
-about: Create a report to help us improve the documentation
-labels: Documentation
----
-
-
-
-
-### Problem
-
-
-
-
-### Suggested Improvement
-
-
-
-**Matplotlib version**
-
- * Operating system:
- * Matplotlib version: (`import matplotlib; print(matplotlib.__version__)`)
- * Matplotlib documentation version: (is listed under the logo)
\ No newline at end of file
diff --git a/.github/ISSUE_TEMPLATE/documentation.yml b/.github/ISSUE_TEMPLATE/documentation.yml
new file mode 100644
index 000000000000..ea0eb385baaf
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/documentation.yml
@@ -0,0 +1,32 @@
+name: Documentation
+description: Create a report to help us improve the documentation
+title: "[Doc]: "
+labels: [Documentation]
+body:
+ - type: input
+ id: link
+ attributes:
+ label: Documentation Link
+ description: |
+ Link to any documentation or examples that you are referencing.
+ Suggested improvements should be based on the development version of the docs: https://matplotlib.org/devdocs/
+ placeholder: https://matplotlib.org/devdocs/...
+ - type: textarea
+ id: problem
+ attributes:
+ label: Problem
+ description: What is missing, unclear, or wrong in the documentation?
+ placeholder: |
+ * I found [...] to be unclear because [...]
+ * [...] made me think that [...] when really it should be [...]
+ * There is no example showing how to do [...]
+ validations:
+ required: true
+ - type: textarea
+ id: improvement
+ attributes:
+ label: Suggested improvement
+ placeholder: |
+ * This line should be be changed to say [...]
+ * Include a paragraph explaining [...]
+ * Add a figure showing [...]
diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md
deleted file mode 100644
index 6ca57f1ce8fa..000000000000
--- a/.github/ISSUE_TEMPLATE/feature_request.md
+++ /dev/null
@@ -1,37 +0,0 @@
----
-name: Feature Request
-about: Suggest something to add to Matplotlib
-labels: New feature
----
-
-
-
-### Problem
-
-
-
-### Proposed Solution
-
-
-
-### Additional context and prior art
-
-
\ No newline at end of file
diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml
new file mode 100644
index 000000000000..5274c287569c
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/feature_request.yml
@@ -0,0 +1,25 @@
+name: Feature Request
+description: Suggest something to add to Matplotlib!
+title: "[ENH]: "
+labels: [New feature]
+body:
+ - type: markdown
+ attributes:
+ value: |
+ Please search the [issues](https://github.com/matplotlib/matplotlib/issues) for relevant feature requests before creating a new feature request.
+ - type: textarea
+ id: problem
+ attributes:
+ label: Problem
+ description: Briefly describe the problem this feature will solve. (2-4 sentences)
+ placeholder: |
+ * I'm always frustrated when [...] because [...]
+ * I would like it if [...] happened when I [...] because [...]
+ * Here is a sample image of what I am asking for [...]
+ validations:
+ required: true
+ - type: textarea
+ id: solution
+ attributes:
+ label: Proposed solution
+ description: Describe a way to accomplish the goals of this feature request.
diff --git a/.github/ISSUE_TEMPLATE/maintenance.md b/.github/ISSUE_TEMPLATE/maintenance.md
deleted file mode 100644
index a72282892d85..000000000000
--- a/.github/ISSUE_TEMPLATE/maintenance.md
+++ /dev/null
@@ -1,14 +0,0 @@
----
-name: Maintenance
-about: Help improve performance, usability and/or consistency.
-labels: Maintenance
----
-
-### Describe the issue
-
-**Summary**
-
-
-
-### Proposed fix
-
diff --git a/.github/ISSUE_TEMPLATE/maintenance.yml b/.github/ISSUE_TEMPLATE/maintenance.yml
new file mode 100644
index 000000000000..746ab55ef0e3
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/maintenance.yml
@@ -0,0 +1,17 @@
+name: Maintenance
+description: Help improve performance, usability and/or consistency.
+title: "[MNT]: "
+labels: [Maintenance]
+body:
+ - type: textarea
+ id: summary
+ attributes:
+ label: Summary
+ description: Please provide 1-2 short sentences that succinctly describes what could be improved.
+ validations:
+ required: true
+ - type: textarea
+ id: fix
+ attributes:
+ label: Proposed fix
+ description: Please describe how you think this could be improved.
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
index 6c3479d74741..9b2f5b5c7275 100644
--- a/.github/PULL_REQUEST_TEMPLATE.md
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -4,13 +4,15 @@
-- [ ] Has pytest style unit tests (and `pytest` passes).
-- [ ] Is [Flake 8](https://flake8.pycqa.org/en/latest/) compliant (run `flake8` on changed files to check).
-- [ ] New features are documented, with examples if plot related.
+**Documentation and Tests**
+- [ ] Has pytest style unit tests (and `pytest` passes)
- [ ] Documentation is sphinx and numpydoc compliant (the docs should [build](https://matplotlib.org/devel/documenting_mpl.html#building-the-docs) without error).
-- [ ] Conforms to Matplotlib style conventions (install `flake8-docstrings` and run `flake8 --docstring-convention=all`).
-- [ ] New features have an entry in `doc/users/next_whats_new/` (follow instructions in README.rst there).
-- [ ] API changes documented in `doc/api/next_api_changes/` (follow instructions in README.rst there).
+- [ ] New plotting related features are documented with examples.
+
+**Release Notes**
+- [ ] New features are marked with a `.. versionadded::` directive in the docstring and documented in `doc/users/next_whats_new/`
+- [ ] API changes are marked with a `.. versionchanged::` directive in the docstring and documented in `doc/api/next_api_changes/`
+- [ ] Release notes conform with instructions in `next_whats_new/README.rst` or `next_api_changes/README.rst`
+
+
diff --git a/doc/_static/switcher.json b/doc/_static/switcher.json
new file mode 100644
index 000000000000..b96977bdd725
--- /dev/null
+++ b/doc/_static/switcher.json
@@ -0,0 +1,37 @@
+[
+ {
+ "name": "3.7 (stable)",
+ "version": "stable",
+ "url": "https://matplotlib.org/stable/"
+ },
+ {
+ "name": "3.8 (dev)",
+ "version": "dev",
+ "url": "https://matplotlib.org/devdocs/"
+ },
+ {
+ "name": "3.6",
+ "version": "3.6.3",
+ "url": "https://matplotlib.org/3.6.3/"
+ },
+ {
+ "name": "3.5",
+ "version": "3.5.3",
+ "url": "https://matplotlib.org/3.5.3/"
+ },
+ {
+ "name": "3.4",
+ "version": "3.4.3",
+ "url": "https://matplotlib.org/3.4.3/"
+ },
+ {
+ "name": "3.3",
+ "version": "3.3.4",
+ "url": "https://matplotlib.org/3.3.4/"
+ },
+ {
+ "name": "2.2",
+ "version": "2.2.4",
+ "url": "https://matplotlib.org/2.2.4/"
+ }
+]
diff --git a/doc/_static/zenodo_cache/5194481.svg b/doc/_static/zenodo_cache/5194481.svg
new file mode 100644
index 000000000000..728ae0c15a6a
--- /dev/null
+++ b/doc/_static/zenodo_cache/5194481.svg
@@ -0,0 +1,35 @@
+
\ No newline at end of file
diff --git a/doc/_static/zenodo_cache/5706396.svg b/doc/_static/zenodo_cache/5706396.svg
new file mode 100644
index 000000000000..54718543c9c8
--- /dev/null
+++ b/doc/_static/zenodo_cache/5706396.svg
@@ -0,0 +1,35 @@
+
\ No newline at end of file
diff --git a/doc/_static/zenodo_cache/5773480.svg b/doc/_static/zenodo_cache/5773480.svg
new file mode 100644
index 000000000000..431dbd803973
--- /dev/null
+++ b/doc/_static/zenodo_cache/5773480.svg
@@ -0,0 +1,35 @@
+
\ No newline at end of file
diff --git a/doc/_static/zenodo_cache/6513224.svg b/doc/_static/zenodo_cache/6513224.svg
new file mode 100644
index 000000000000..fd54dfcb9abb
--- /dev/null
+++ b/doc/_static/zenodo_cache/6513224.svg
@@ -0,0 +1,35 @@
+
\ No newline at end of file
diff --git a/doc/_static/zenodo_cache/6982547.svg b/doc/_static/zenodo_cache/6982547.svg
new file mode 100644
index 000000000000..6eb000d892da
--- /dev/null
+++ b/doc/_static/zenodo_cache/6982547.svg
@@ -0,0 +1,35 @@
+
\ No newline at end of file
diff --git a/doc/_static/zenodo_cache/7084615.svg b/doc/_static/zenodo_cache/7084615.svg
new file mode 100644
index 000000000000..9bb362063414
--- /dev/null
+++ b/doc/_static/zenodo_cache/7084615.svg
@@ -0,0 +1,35 @@
+
\ No newline at end of file
diff --git a/doc/_static/zenodo_cache/7162185.svg b/doc/_static/zenodo_cache/7162185.svg
new file mode 100644
index 000000000000..ea0966377194
--- /dev/null
+++ b/doc/_static/zenodo_cache/7162185.svg
@@ -0,0 +1,35 @@
+
\ No newline at end of file
diff --git a/doc/_static/zenodo_cache/7275322.svg b/doc/_static/zenodo_cache/7275322.svg
new file mode 100644
index 000000000000..2d0fd408b504
--- /dev/null
+++ b/doc/_static/zenodo_cache/7275322.svg
@@ -0,0 +1,35 @@
+
\ No newline at end of file
diff --git a/doc/_static/zenodo_cache/7527665.svg b/doc/_static/zenodo_cache/7527665.svg
new file mode 100644
index 000000000000..3c3e0b7a8b2a
--- /dev/null
+++ b/doc/_static/zenodo_cache/7527665.svg
@@ -0,0 +1,35 @@
+
\ No newline at end of file
diff --git a/doc/_static/zenodo_cache/7637593.svg b/doc/_static/zenodo_cache/7637593.svg
new file mode 100644
index 000000000000..4e91dea5e805
--- /dev/null
+++ b/doc/_static/zenodo_cache/7637593.svg
@@ -0,0 +1,35 @@
+
\ No newline at end of file
diff --git a/doc/_templates/automodule.rst b/doc/_templates/automodule.rst
index e9f2a755d413..984c12e00d03 100644
--- a/doc/_templates/automodule.rst
+++ b/doc/_templates/automodule.rst
@@ -5,7 +5,7 @@
treat this separately (sphinx-doc/sphinx/issues/4874)
.. automodule:: {{ fullname }}
:members:
-
+
{% else %}
.. automodule:: {{ fullname }}
@@ -18,7 +18,7 @@
Classes
-------
-.. autosummary::
+.. autosummary::
:template: autosummary.rst
:toctree:
{% for item in classes %}{% if item not in ['zip', 'map', 'reduce'] %}
@@ -32,7 +32,7 @@ Classes
Functions
---------
-.. autosummary::
+.. autosummary::
:template: autosummary.rst
:toctree:
diff --git a/doc/_templates/autosummary.rst b/doc/_templates/autosummary.rst
index bf318f1d9aff..c5f90e87f016 100644
--- a/doc/_templates/autosummary.rst
+++ b/doc/_templates/autosummary.rst
@@ -7,7 +7,7 @@
{% if objtype in ['class'] %}
.. auto{{ objtype }}:: {{ objname }}
:show-inheritance:
- :special-members:
+ :special-members: __call__
{% else %}
.. auto{{ objtype }}:: {{ objname }}
diff --git a/doc/_templates/autosummary_class_only.rst b/doc/_templates/autosummary_class_only.rst
new file mode 100644
index 000000000000..6611f04f5c0d
--- /dev/null
+++ b/doc/_templates/autosummary_class_only.rst
@@ -0,0 +1,11 @@
+{{ fullname | escape | underline }}
+
+
+.. currentmodule:: {{ module }}
+
+
+{% if objtype in ['class'] %}
+.. auto{{ objtype }}:: {{ objname }}
+ :no-members:
+
+{% endif %}
diff --git a/doc/_templates/cheatsheet_sidebar.html b/doc/_templates/cheatsheet_sidebar.html
new file mode 100644
index 000000000000..3f2b7c4f4db1
--- /dev/null
+++ b/doc/_templates/cheatsheet_sidebar.html
@@ -0,0 +1,9 @@
+
+
diff --git a/doc/_templates/donate_sidebar.html b/doc/_templates/donate_sidebar.html
index fc7310b70088..071c92888c3c 100644
--- a/doc/_templates/donate_sidebar.html
+++ b/doc/_templates/donate_sidebar.html
@@ -1,6 +1,5 @@
-
-
-
-
-
-
diff --git a/doc/api/_enums_api.rst b/doc/api/_enums_api.rst
index c9e283305967..c38d535f3573 100644
--- a/doc/api/_enums_api.rst
+++ b/doc/api/_enums_api.rst
@@ -12,4 +12,3 @@
.. autoclass:: CapStyle
:members: demo
:exclude-members: butt, round, projecting, input_description
-
diff --git a/doc/api/afm_api.rst b/doc/api/afm_api.rst
index 7e6d307cca33..bcae04150909 100644
--- a/doc/api/afm_api.rst
+++ b/doc/api/afm_api.rst
@@ -2,7 +2,12 @@
``matplotlib.afm``
******************
-.. automodule:: matplotlib.afm
+.. attention::
+ This module is considered internal.
+
+ Its use is deprecated and it will be removed in a future version.
+
+.. automodule:: matplotlib._afm
:members:
:undoc-members:
:show-inheritance:
diff --git a/doc/api/animation_api.rst b/doc/api/animation_api.rst
index c8edde884046..d1b81e20b5c8 100644
--- a/doc/api/animation_api.rst
+++ b/doc/api/animation_api.rst
@@ -11,12 +11,16 @@
:local:
:backlinks: entry
+
Animation
=========
-The easiest way to make a live animation in matplotlib is to use one of the
+The easiest way to make a live animation in Matplotlib is to use one of the
`Animation` classes.
+.. inheritance-diagram:: matplotlib.animation.FuncAnimation matplotlib.animation.ArtistAnimation
+ :parts: 1
+
.. autosummary::
:toctree: _as_gen
:nosignatures:
@@ -29,10 +33,11 @@ In both cases it is critical to keep a reference to the instance
object. The animation is advanced by a timer (typically from the host
GUI framework) which the `Animation` object holds the only reference
to. If you do not hold a reference to the `Animation` object, it (and
-hence the timers), will be garbage collected which will stop the
+hence the timers) will be garbage collected which will stop the
animation.
-To save an animation to disk use `Animation.save` or `Animation.to_html5_video`
+To save an animation use `Animation.save`, `Animation.to_html5_video`,
+or `Animation.to_jshtml`.
See :ref:`ani_writer_classes` below for details about what movie formats are
supported.
@@ -46,9 +51,9 @@ supported.
The inner workings of `FuncAnimation` is more-or-less::
for d in frames:
- artists = func(d, *fargs)
- fig.canvas.draw_idle()
- fig.canvas.start_event_loop(interval)
+ artists = func(d, *fargs)
+ fig.canvas.draw_idle()
+ fig.canvas.start_event_loop(interval)
with details to handle 'blitting' (to dramatically improve the live
performance), to be non-blocking, not repeatedly start/stop the GUI
@@ -92,13 +97,18 @@ this hopefully minimalist example gives a sense of how ``init_func``
and ``func`` are used inside of `FuncAnimation` and the theory of how
'blitting' works.
+.. note::
+
+ The zorder of artists is not taken into account when 'blitting'
+ because the 'blitted' artists are always drawn on top.
+
The expected signature on ``func`` and ``init_func`` is very simple to
keep `FuncAnimation` out of your book keeping and plotting logic, but
this means that the callable objects you pass in must know what
artists they should be working on. There are several approaches to
handling this, of varying complexity and encapsulation. The simplest
approach, which works quite well in the case of a script, is to define the
-artist at a global scope and let Python sort things out. For example ::
+artist at a global scope and let Python sort things out. For example::
import numpy as np
import matplotlib.pyplot as plt
@@ -106,7 +116,7 @@ artist at a global scope and let Python sort things out. For example ::
fig, ax = plt.subplots()
xdata, ydata = [], []
- ln, = plt.plot([], [], 'ro')
+ ln, = ax.plot([], [], 'ro')
def init():
ax.set_xlim(0, 2*np.pi)
@@ -123,8 +133,36 @@ artist at a global scope and let Python sort things out. For example ::
init_func=init, blit=True)
plt.show()
-The second method is to use `functools.partial` to 'bind' artists to
-function. A third method is to use closures to build up the required
+The second method is to use `functools.partial` to pass arguments to the
+function::
+
+ import numpy as np
+ import matplotlib.pyplot as plt
+ from matplotlib.animation import FuncAnimation
+ from functools import partial
+
+ fig, ax = plt.subplots()
+ line1, = ax.plot([], [], 'ro')
+
+ def init():
+ ax.set_xlim(0, 2*np.pi)
+ ax.set_ylim(-1, 1)
+ return line1,
+
+ def update(frame, ln, x, y):
+ x.append(frame)
+ y.append(np.sin(frame))
+ ln.set_data(x, y)
+ return ln,
+
+ ani = FuncAnimation(
+ fig, partial(update, ln=line1, x=[], y=[]),
+ frames=np.linspace(0, 2*np.pi, 128),
+ init_func=init, blit=True)
+
+ plt.show()
+
+A third method is to use closures to build up the required
artists and functions. A fourth method is to create a class.
Examples
@@ -157,6 +195,10 @@ Examples
Writer Classes
==============
+.. inheritance-diagram:: matplotlib.animation.FFMpegFileWriter matplotlib.animation.FFMpegWriter matplotlib.animation.ImageMagickFileWriter matplotlib.animation.ImageMagickWriter matplotlib.animation.PillowWriter matplotlib.animation.HTMLWriter
+ :top-classes: matplotlib.animation.AbstractMovieWriter
+ :parts: 1
+
The provided writers fall into a few broad categories.
The Pillow writer relies on the Pillow library to write the animation, keeping
@@ -186,7 +228,6 @@ on all systems.
FFMpegWriter
ImageMagickWriter
- AVConvWriter
The file-based writers save temporary files for each frame which are stitched
into a single file at the end. Although slower, these writers can be easier to
@@ -198,18 +239,19 @@ debug.
FFMpegFileWriter
ImageMagickFileWriter
- AVConvFileWriter
-Fundamentally, a `MovieWriter` provides a way to grab sequential frames
-from the same underlying `~matplotlib.figure.Figure` object. The base
-class `MovieWriter` implements 3 methods and a context manager. The
-only difference between the pipe-based and file-based writers is in the
-arguments to their respective ``setup`` methods.
+The writer classes provide a way to grab sequential frames from the same
+underlying `~matplotlib.figure.Figure`. They all provide three methods that
+must be called in sequence:
-The ``setup()`` method is used to prepare the writer (possibly opening
-a pipe), successive calls to ``grab_frame()`` capture a single frame
-at a time and ``finish()`` finalizes the movie and writes the output
-file to disk. For example ::
+- `~.AbstractMovieWriter.setup` prepares the writer (e.g. opening a pipe).
+ Pipe-based and file-based writers take different arguments to ``setup()``.
+- `~.AbstractMovieWriter.grab_frame` can then be called as often as
+ needed to capture a single frame at a time
+- `~.AbstractMovieWriter.finish` finalizes the movie and writes the output
+ file to disk.
+
+Example::
moviewriter = MovieWriter(...)
moviewriter.setup(fig, 'my_movie.ext', dpi=100)
@@ -219,14 +261,14 @@ file to disk. For example ::
moviewriter.finish()
If using the writer classes directly (not through `Animation.save`), it is
-strongly encouraged to use the `~MovieWriter.saving` context manager ::
+strongly encouraged to use the `~.AbstractMovieWriter.saving` context manager::
with moviewriter.saving(fig, 'myfile.mp4', dpi=100):
for j in range(n):
update_figure(j)
moviewriter.grab_frame()
-to ensures that setup and cleanup are performed as necessary.
+to ensure that setup and cleanup are performed as necessary.
Examples
--------
@@ -283,21 +325,9 @@ and mixins
:toctree: _as_gen
:nosignatures:
- AVConvBase
FFMpegBase
ImageMagickBase
are provided.
See the source code for how to easily implement new `MovieWriter` classes.
-
-Inheritance Diagrams
-====================
-
-.. inheritance-diagram:: matplotlib.animation.FuncAnimation matplotlib.animation.ArtistAnimation
- :private-bases:
- :parts: 1
-
-.. inheritance-diagram:: matplotlib.animation.AVConvFileWriter matplotlib.animation.AVConvWriter matplotlib.animation.FFMpegFileWriter matplotlib.animation.FFMpegWriter matplotlib.animation.ImageMagickFileWriter matplotlib.animation.ImageMagickWriter
- :private-bases:
- :parts: 1
diff --git a/doc/api/api_changes.rst b/doc/api/api_changes.rst
deleted file mode 100644
index d64664e2ffdb..000000000000
--- a/doc/api/api_changes.rst
+++ /dev/null
@@ -1,42 +0,0 @@
-
-===========
-API Changes
-===========
-
-If updating Matplotlib breaks your scripts, this list may help you figure out
-what caused the breakage and how to fix it by updating your code.
-
-For API changes in older versions see
-
-.. toctree::
- :maxdepth: 1
-
- api_changes_old
-
-Changes for the latest version are listed below. For new features that were
-added to Matplotlib, see :ref:`whats-new`
-
-.. ifconfig:: releaselevel == 'dev'
-
- .. note::
-
- The list below is a table of contents of individual files from the
- most recent :file:`api_changes_X.Y` folder.
-
- When a release is made
-
- - The include directive below should be changed to point to the new file
- created in the previous step.
-
-
- .. toctree::
- :glob:
- :maxdepth: 1
-
- next_api_changes/behavior/*
- next_api_changes/deprecations/*
- next_api_changes/development/*
- next_api_changes/removals/*
-
-.. include:: prev_api_changes/api_changes_3.4.2.rst
-.. include:: prev_api_changes/api_changes_3.4.0.rst
diff --git a/doc/api/api_changes_old.rst b/doc/api/api_changes_old.rst
deleted file mode 100644
index ab9381680498..000000000000
--- a/doc/api/api_changes_old.rst
+++ /dev/null
@@ -1,11 +0,0 @@
-
-================
- Old API Changes
-================
-
-.. toctree::
- :glob:
- :reversed:
- :maxdepth: 1
-
- prev_api_changes/*
diff --git a/doc/api/artist_api.rst b/doc/api/artist_api.rst
index d77f27f0960f..3903bbd5924d 100644
--- a/doc/api/artist_api.rst
+++ b/doc/api/artist_api.rst
@@ -4,16 +4,17 @@
``matplotlib.artist``
*********************
-.. inheritance-diagram:: matplotlib.axes._axes.Axes matplotlib.axes._base._AxesBase matplotlib.axis.Axis matplotlib.axis.Tick matplotlib.axis.XAxis matplotlib.axis.XTick matplotlib.axis.YAxis matplotlib.axis.YTick matplotlib.collections.AsteriskPolygonCollection matplotlib.collections.BrokenBarHCollection matplotlib.collections.CircleCollection matplotlib.collections.Collection matplotlib.collections.EllipseCollection matplotlib.collections.EventCollection matplotlib.collections.LineCollection matplotlib.collections.PatchCollection matplotlib.collections.PathCollection matplotlib.collections.PolyCollection matplotlib.collections.QuadMesh matplotlib.collections.RegularPolyCollection matplotlib.collections.StarPolygonCollection matplotlib.collections.TriMesh matplotlib.collections._CollectionWithSizes matplotlib.contour.ClabelText matplotlib.figure.Figure matplotlib.image.AxesImage matplotlib.image.BboxImage matplotlib.image.FigureImage matplotlib.image.NonUniformImage matplotlib.image.PcolorImage matplotlib.image._ImageBase matplotlib.legend.Legend matplotlib.lines.Line2D matplotlib.offsetbox.AnchoredOffsetbox matplotlib.offsetbox.AnchoredText matplotlib.offsetbox.AnnotationBbox matplotlib.offsetbox.AuxTransformBox matplotlib.offsetbox.DrawingArea matplotlib.offsetbox.HPacker matplotlib.offsetbox.OffsetBox matplotlib.offsetbox.OffsetImage matplotlib.offsetbox.PackerBase matplotlib.offsetbox.PaddedBox matplotlib.offsetbox.TextArea matplotlib.offsetbox.VPacker matplotlib.patches.Arc matplotlib.patches.Arrow matplotlib.patches.Circle matplotlib.patches.CirclePolygon matplotlib.patches.ConnectionPatch matplotlib.patches.Ellipse matplotlib.patches.FancyArrow matplotlib.patches.FancyArrowPatch matplotlib.patches.FancyBboxPatch matplotlib.patches.Patch matplotlib.patches.PathPatch matplotlib.patches.StepPatch matplotlib.patches.Polygon matplotlib.patches.Rectangle matplotlib.patches.RegularPolygon matplotlib.patches.Shadow matplotlib.patches.Wedge matplotlib.projections.geo.AitoffAxes matplotlib.projections.geo.GeoAxes matplotlib.projections.geo.HammerAxes matplotlib.projections.geo.LambertAxes matplotlib.projections.geo.MollweideAxes matplotlib.projections.polar.PolarAxes matplotlib.quiver.Barbs matplotlib.quiver.Quiver matplotlib.quiver.QuiverKey matplotlib.spines.Spine matplotlib.table.Cell matplotlib.table.CustomCell matplotlib.table.Table matplotlib.text.Annotation matplotlib.text.Text
- :parts: 1
- :private-bases:
-
-
-
.. automodule:: matplotlib.artist
:no-members:
:no-undoc-members:
+Inheritance Diagrams
+====================
+
+.. inheritance-diagram:: matplotlib.axes._axes.Axes matplotlib.axes._base._AxesBase matplotlib.axis.Axis matplotlib.axis.Tick matplotlib.axis.XAxis matplotlib.axis.XTick matplotlib.axis.YAxis matplotlib.axis.YTick matplotlib.collections.AsteriskPolygonCollection matplotlib.collections.BrokenBarHCollection matplotlib.collections.CircleCollection matplotlib.collections.Collection matplotlib.collections.EllipseCollection matplotlib.collections.EventCollection matplotlib.collections.LineCollection matplotlib.collections.PatchCollection matplotlib.collections.PathCollection matplotlib.collections.PolyCollection matplotlib.collections.QuadMesh matplotlib.collections.RegularPolyCollection matplotlib.collections.StarPolygonCollection matplotlib.collections.TriMesh matplotlib.collections._CollectionWithSizes matplotlib.contour.ClabelText matplotlib.contour.ContourSet matplotlib.contour.QuadContourSet matplotlib.figure.FigureBase matplotlib.figure.Figure matplotlib.figure.SubFigure matplotlib.image.AxesImage matplotlib.image.BboxImage matplotlib.image.FigureImage matplotlib.image.NonUniformImage matplotlib.image.PcolorImage matplotlib.image._ImageBase matplotlib.legend.Legend matplotlib.lines.Line2D matplotlib.offsetbox.AnchoredOffsetbox matplotlib.offsetbox.AnchoredText matplotlib.offsetbox.AnnotationBbox matplotlib.offsetbox.AuxTransformBox matplotlib.offsetbox.DrawingArea matplotlib.offsetbox.HPacker matplotlib.offsetbox.OffsetBox matplotlib.offsetbox.OffsetImage matplotlib.offsetbox.PackerBase matplotlib.offsetbox.PaddedBox matplotlib.offsetbox.TextArea matplotlib.offsetbox.VPacker matplotlib.patches.Annulus matplotlib.patches.Arc matplotlib.patches.Arrow matplotlib.patches.Circle matplotlib.patches.CirclePolygon matplotlib.patches.ConnectionPatch matplotlib.patches.Ellipse matplotlib.patches.FancyArrow matplotlib.patches.FancyArrowPatch matplotlib.patches.FancyBboxPatch matplotlib.patches.Patch matplotlib.patches.PathPatch matplotlib.patches.Polygon matplotlib.patches.Rectangle matplotlib.patches.RegularPolygon matplotlib.patches.Shadow matplotlib.patches.StepPatch matplotlib.patches.Wedge matplotlib.projections.geo.AitoffAxes matplotlib.projections.geo.GeoAxes matplotlib.projections.geo.HammerAxes matplotlib.projections.geo.LambertAxes matplotlib.projections.geo.MollweideAxes matplotlib.projections.polar.PolarAxes matplotlib.projections.polar.RadialAxis matplotlib.projections.polar.RadialTick matplotlib.projections.polar.ThetaAxis matplotlib.projections.polar.ThetaTick matplotlib.quiver.Barbs matplotlib.quiver.Quiver matplotlib.quiver.QuiverKey matplotlib.spines.Spine matplotlib.table.Cell matplotlib.table.Table matplotlib.text.Annotation matplotlib.text.Text matplotlib.tri.TriContourSet
+ :parts: 1
+ :private-bases:
+
``Artist`` class
================
@@ -26,6 +27,7 @@ Interactive
-----------
.. autosummary::
+ :template: autosummary.rst
:toctree: _as_gen
:nosignatures:
@@ -34,10 +36,10 @@ Interactive
Artist.pchanged
Artist.get_cursor_data
Artist.format_cursor_data
+ Artist.set_mouseover
+ Artist.get_mouseover
Artist.mouseover
Artist.contains
- Artist.set_contains
- Artist.get_contains
Artist.pick
Artist.pickable
Artist.set_picker
@@ -47,6 +49,7 @@ Clipping
--------
.. autosummary::
+ :template: autosummary.rst
:toctree: _as_gen
:nosignatures:
@@ -61,6 +64,7 @@ Bulk Properties
---------------
.. autosummary::
+ :template: autosummary.rst
:toctree: _as_gen
:nosignatures:
@@ -73,6 +77,7 @@ Drawing
-------
.. autosummary::
+ :template: autosummary.rst
:toctree: _as_gen
:nosignatures:
@@ -100,12 +105,14 @@ Drawing
Artist.get_agg_filter
Artist.get_window_extent
+ Artist.get_tightbbox
Artist.get_transformed_clip_path_and_affine
Figure and Axes
---------------
.. autosummary::
+ :template: autosummary.rst
:toctree: _as_gen
:nosignatures:
@@ -120,6 +127,7 @@ Children
--------
.. autosummary::
+ :template: autosummary.rst
:toctree: _as_gen
:nosignatures:
@@ -130,6 +138,7 @@ Transform
---------
.. autosummary::
+ :template: autosummary.rst
:toctree: _as_gen
:nosignatures:
@@ -141,6 +150,7 @@ Units
-----
.. autosummary::
+ :template: autosummary.rst
:toctree: _as_gen
:nosignatures:
@@ -152,6 +162,7 @@ Metadata
--------
.. autosummary::
+ :template: autosummary.rst
:toctree: _as_gen
:nosignatures:
@@ -166,6 +177,7 @@ Miscellaneous
-------------
.. autosummary::
+ :template: autosummary.rst
:toctree: _as_gen
:nosignatures:
@@ -178,6 +190,7 @@ Functions
=========
.. autosummary::
+ :template: autosummary.rst
:toctree: _as_gen
:nosignatures:
diff --git a/doc/api/axes_api.rst b/doc/api/axes_api.rst
index 6024a79bd81c..8d0951626f72 100644
--- a/doc/api/axes_api.rst
+++ b/doc/api/axes_api.rst
@@ -2,6 +2,10 @@
``matplotlib.axes``
*******************
+The `~.axes.Axes` class represents one (sub-)plot in a figure. It contains the
+plotted data, axis ticks, labels, title, legend, etc. Its methods are the main
+interface for manipulating the plot.
+
.. currentmodule:: matplotlib.axes
.. contents:: Table of Contents
@@ -14,30 +18,15 @@
:no-members:
:no-undoc-members:
-Inheritance
-===========
-.. inheritance-diagram:: matplotlib.axes.Axes
- :private-bases:
-
The Axes class
==============
-.. autoclass:: Axes
- :no-members:
- :no-undoc-members:
- :show-inheritance:
-
-
-Subplots
-========
-
.. autosummary::
:toctree: _as_gen
- :template: autosummary.rst
+ :template: autosummary_class_only.rst
:nosignatures:
- SubplotBase
- subplot_class_factory
+ Axes
Plotting
========
@@ -295,7 +284,6 @@ Axis limits and direction
Axes.get_ylim
Axes.update_datalim
- Axes.update_datalim_bounds
Axes.set_xbound
Axes.get_xbound
@@ -314,6 +302,7 @@ Axis labels, title, and legend
Axes.get_xlabel
Axes.set_ylabel
Axes.get_ylabel
+ Axes.label_outer
Axes.set_title
Axes.get_title
@@ -485,6 +474,9 @@ Axes position
Axes.get_axes_locator
Axes.set_axes_locator
+ Axes.get_subplotspec
+ Axes.set_subplotspec
+
Axes.reset_position
Axes.get_position
@@ -607,3 +599,6 @@ Other
Axes.get_default_bbox_extra_artists
Axes.get_transformed_clip_path_and_affine
Axes.has_data
+ Axes.set
+
+.. autoclass:: matplotlib.axes.Axes.ArtistList
diff --git a/doc/api/axis_api.rst b/doc/api/axis_api.rst
index 4bc9ad0c6e89..e7da26a11706 100644
--- a/doc/api/axis_api.rst
+++ b/doc/api/axis_api.rst
@@ -41,7 +41,6 @@ Inheritance
:nosignatures:
Axis.clear
- Axis.cla
Axis.get_scale
@@ -101,6 +100,7 @@ Ticks, tick labels and Offset text
Axis.get_offset_text
Axis.get_tick_padding
+ Axis.get_tick_params
Axis.get_ticklabels
Axis.get_ticklines
Axis.get_ticklocs
@@ -151,6 +151,7 @@ Interactive
:nosignatures:
Axis.contains
+ Axis.pickradius
Axis.get_pickradius
Axis.set_pickradius
@@ -169,17 +170,6 @@ Units
Axis.update_units
-Incremental navigation
-----------------------
-
-.. autosummary::
- :toctree: _as_gen
- :template: autosummary.rst
- :nosignatures:
-
- Axis.pan
- Axis.zoom
-
XAxis Specific
--------------
@@ -192,6 +182,7 @@ XAxis Specific
XAxis.get_text_heights
XAxis.get_ticks_position
XAxis.set_ticks_position
+ XAxis.set_label_position
XAxis.tick_bottom
XAxis.tick_top
@@ -208,6 +199,7 @@ YAxis Specific
YAxis.get_ticks_position
YAxis.set_offset_position
YAxis.set_ticks_position
+ YAxis.set_label_position
YAxis.tick_left
YAxis.tick_right
@@ -266,8 +258,6 @@ specify a matching series of labels. Calling ``set_ticks`` makes a
:template: autosummary.rst
:nosignatures:
-
- Tick.apply_tickdir
Tick.get_loc
Tick.get_pad
Tick.get_pad_pixels
@@ -277,4 +267,5 @@ specify a matching series of labels. Calling ``set_ticks`` makes a
Tick.set_label1
Tick.set_label2
Tick.set_pad
+ Tick.set_url
Tick.update_position
diff --git a/doc/api/backend_agg_api.rst b/doc/api/backend_agg_api.rst
index 40c8cd4bce6a..752f348f8747 100644
--- a/doc/api/backend_agg_api.rst
+++ b/doc/api/backend_agg_api.rst
@@ -1,6 +1,6 @@
-
-:mod:`matplotlib.backends.backend_agg`
-======================================
+***********************************
+``matplotlib.backends.backend_agg``
+***********************************
.. automodule:: matplotlib.backends.backend_agg
:members:
diff --git a/doc/api/backend_bases_api.rst b/doc/api/backend_bases_api.rst
index 990a1a091f81..c98a6af3e05e 100644
--- a/doc/api/backend_bases_api.rst
+++ b/doc/api/backend_bases_api.rst
@@ -1,6 +1,6 @@
-
-:mod:`matplotlib.backend_bases`
-================================
+****************************
+``matplotlib.backend_bases``
+****************************
.. automodule:: matplotlib.backend_bases
:members:
diff --git a/doc/api/backend_cairo_api.rst b/doc/api/backend_cairo_api.rst
index 2623270c6781..66371ec6895c 100644
--- a/doc/api/backend_cairo_api.rst
+++ b/doc/api/backend_cairo_api.rst
@@ -1,6 +1,6 @@
-
-:mod:`matplotlib.backends.backend_cairo`
-========================================
+*************************************
+``matplotlib.backends.backend_cairo``
+*************************************
.. automodule:: matplotlib.backends.backend_cairo
:members:
diff --git a/doc/api/backend_gtk3_api.rst b/doc/api/backend_gtk3_api.rst
index 5e17df66d602..66c247555df4 100644
--- a/doc/api/backend_gtk3_api.rst
+++ b/doc/api/backend_gtk3_api.rst
@@ -1,16 +1,12 @@
-**NOTE** These backends are not documented here, to avoid adding a dependency
-to building the docs.
+**********************************************************************************
+``matplotlib.backends.backend_gtk3agg``, ``matplotlib.backends.backend_gtk3cairo``
+**********************************************************************************
+
+**NOTE** These :ref:`backends` are not documented here, to avoid adding a
+dependency to building the docs.
.. redirect-from:: /api/backend_gtk3agg_api
.. redirect-from:: /api/backend_gtk3cairo_api
-
-:mod:`matplotlib.backends.backend_gtk3agg`
-==========================================
-
.. module:: matplotlib.backends.backend_gtk3agg
-
-:mod:`matplotlib.backends.backend_gtk3cairo`
-============================================
-
.. module:: matplotlib.backends.backend_gtk3cairo
diff --git a/doc/api/backend_gtk4_api.rst b/doc/api/backend_gtk4_api.rst
new file mode 100644
index 000000000000..8f2e38d885a8
--- /dev/null
+++ b/doc/api/backend_gtk4_api.rst
@@ -0,0 +1,12 @@
+**********************************************************************************
+``matplotlib.backends.backend_gtk4agg``, ``matplotlib.backends.backend_gtk4cairo``
+**********************************************************************************
+
+**NOTE** These :ref:`backends` are not documented here, to avoid adding a
+dependency to building the docs.
+
+.. redirect-from:: /api/backend_gtk4agg_api
+.. redirect-from:: /api/backend_gtk4cairo_api
+
+.. module:: matplotlib.backends.backend_gtk4agg
+.. module:: matplotlib.backends.backend_gtk4cairo
diff --git a/doc/api/backend_managers_api.rst b/doc/api/backend_managers_api.rst
index faf4eda18de3..3e77e89dbbce 100644
--- a/doc/api/backend_managers_api.rst
+++ b/doc/api/backend_managers_api.rst
@@ -1,6 +1,6 @@
-
-:mod:`matplotlib.backend_managers`
-==================================
+*******************************
+``matplotlib.backend_managers``
+*******************************
.. automodule:: matplotlib.backend_managers
:members:
diff --git a/doc/api/backend_mixed_api.rst b/doc/api/backend_mixed_api.rst
index 7457f6684f94..61d770e56ccf 100644
--- a/doc/api/backend_mixed_api.rst
+++ b/doc/api/backend_mixed_api.rst
@@ -1,6 +1,6 @@
-
-:mod:`matplotlib.backends.backend_mixed`
-========================================
+*************************************
+``matplotlib.backends.backend_mixed``
+*************************************
.. automodule:: matplotlib.backends.backend_mixed
:members:
diff --git a/doc/api/backend_nbagg_api.rst b/doc/api/backend_nbagg_api.rst
index 977eabce8db0..6596f461bbf0 100644
--- a/doc/api/backend_nbagg_api.rst
+++ b/doc/api/backend_nbagg_api.rst
@@ -1,6 +1,6 @@
-
-:mod:`matplotlib.backends.backend_nbagg`
-========================================
+*************************************
+``matplotlib.backends.backend_nbagg``
+*************************************
.. automodule:: matplotlib.backends.backend_nbagg
:members:
diff --git a/doc/api/backend_pdf_api.rst b/doc/api/backend_pdf_api.rst
index ded143ddcf8d..014c3e6e5017 100644
--- a/doc/api/backend_pdf_api.rst
+++ b/doc/api/backend_pdf_api.rst
@@ -1,6 +1,6 @@
-
-:mod:`matplotlib.backends.backend_pdf`
-======================================
+***********************************
+``matplotlib.backends.backend_pdf``
+***********************************
.. automodule:: matplotlib.backends.backend_pdf
:members:
diff --git a/doc/api/backend_pgf_api.rst b/doc/api/backend_pgf_api.rst
index ec7440080eb0..9f90beb72a1b 100644
--- a/doc/api/backend_pgf_api.rst
+++ b/doc/api/backend_pgf_api.rst
@@ -1,6 +1,6 @@
-
-:mod:`matplotlib.backends.backend_pgf`
-======================================
+***********************************
+``matplotlib.backends.backend_pgf``
+***********************************
.. automodule:: matplotlib.backends.backend_pgf
:members:
diff --git a/doc/api/backend_ps_api.rst b/doc/api/backend_ps_api.rst
index 9d585be7a0ad..d9b07d961b4b 100644
--- a/doc/api/backend_ps_api.rst
+++ b/doc/api/backend_ps_api.rst
@@ -1,6 +1,6 @@
-
-:mod:`matplotlib.backends.backend_ps`
-=====================================
+**********************************
+``matplotlib.backends.backend_ps``
+**********************************
.. automodule:: matplotlib.backends.backend_ps
:members:
diff --git a/doc/api/backend_qt_api.rst b/doc/api/backend_qt_api.rst
index 90fe9bb95539..ebfeedceb6e1 100644
--- a/doc/api/backend_qt_api.rst
+++ b/doc/api/backend_qt_api.rst
@@ -1,27 +1,71 @@
-**NOTE** These backends are not documented here, to avoid adding a dependency
-to building the docs.
+******************************************************************************
+``matplotlib.backends.backend_qtagg``, ``matplotlib.backends.backend_qtcairo``
+******************************************************************************
+
+**NOTE** These :ref:`backends` are not (auto) documented here, to avoid adding
+a dependency to building the docs.
.. redirect-from:: /api/backend_qt4agg_api
.. redirect-from:: /api/backend_qt4cairo_api
.. redirect-from:: /api/backend_qt5agg_api
.. redirect-from:: /api/backend_qt5cairo_api
-:mod:`matplotlib.backends.backend_qt4agg`
-=========================================
+.. module:: matplotlib.backends.qt_compat
+.. module:: matplotlib.backends.backend_qt
+.. module:: matplotlib.backends.backend_qtagg
+.. module:: matplotlib.backends.backend_qtcairo
+.. module:: matplotlib.backends.backend_qt5agg
+.. module:: matplotlib.backends.backend_qt5cairo
+
+.. _QT_bindings:
-.. module:: matplotlib.backends.backend_qt4agg
+Qt Bindings
+-----------
-:mod:`matplotlib.backends.backend_qt4cairo`
-===========================================
+There are currently 2 actively supported Qt versions, Qt5 and Qt6, and two
+supported Python bindings per version -- `PyQt5
+`_ and `PySide2
+`_ for Qt5 and `PyQt6
+`_ and `PySide6
+`_ for Qt6 [#]_. Matplotlib's
+qtagg and qtcairo backends (``matplotlib.backends.backend_qtagg`` and
+``matplotlib.backend.backend_qtcairo``) support all these bindings, with common
+parts factored out in the ``matplotlib.backends.backend_qt`` module.
-.. module:: matplotlib.backends.backend_qt4cairo
+At runtime, these backends select the actual binding used as follows:
-:mod:`matplotlib.backends.backend_qt5agg`
-=========================================
+1. If a binding's ``QtCore`` subpackage is already imported, that binding is
+ selected (the order for the check is ``PyQt6``, ``PySide6``, ``PyQt5``,
+ ``PySide2``).
+2. If the :envvar:`QT_API` environment variable is set to one of "PyQt6",
+ "PySide6", "PyQt5", "PySide2" (case-insensitive), that binding is selected.
+ (See also the documentation on :ref:`environment-variables`.)
+3. Otherwise, the first available backend in the order ``PyQt6``, ``PySide6``,
+ ``PyQt5``, ``PySide2`` is selected.
-.. module:: matplotlib.backends.backend_qt5agg
+In the past, Matplotlib used to have separate backends for each version of Qt
+(e.g. qt4agg/``matplotlib.backends.backend_qt4agg`` and
+qt5agg/``matplotlib.backends.backend_qt5agg``). This scheme was dropped when
+support for Qt6 was added. For back-compatibility, qt5agg/``backend_qt5agg``
+and qt5cairo/``backend_qt5cairo`` remain available; selecting one of these
+backends forces the use of a Qt5 binding. Their use is discouraged and
+``backend_qtagg`` or ``backend_qtcairo`` should be preferred instead. However,
+these modules will not be deprecated until we drop support for Qt5.
-:mod:`matplotlib.backends.backend_qt5cairo`
-===========================================
+While both PyQt
+and Qt for Python (aka PySide) closely mirror the underlying C++ API they are
+wrapping, they are not drop-in replacements for each other [#]_. To account
+for this, Matplotlib has an internal API compatibility layer in
+`matplotlib.backends.qt_compat` which covers our needs. Despite being a public
+module, we do not consider this to be a stable user-facing API and it may
+change without warning [#]_.
-.. module:: matplotlib.backends.backend_qt5cairo
+.. [#] There is also `PyQt4
+ `_ and `PySide
+ `_ for Qt4 but these are no
+ longer supported by Matplotlib and upstream support for Qt4 ended
+ in 2015.
+.. [#] Despite the slight API differences, the more important distinction
+ between the PyQt and Qt for Python series of bindings is licensing.
+.. [#] If you are looking for a general purpose compatibility library please
+ see `qtpy `_.
diff --git a/doc/api/backend_svg_api.rst b/doc/api/backend_svg_api.rst
index 0b26d11e8818..2e7c1c9f5db1 100644
--- a/doc/api/backend_svg_api.rst
+++ b/doc/api/backend_svg_api.rst
@@ -1,6 +1,6 @@
-
-:mod:`matplotlib.backends.backend_svg`
-======================================
+***********************************
+``matplotlib.backends.backend_svg``
+***********************************
.. automodule:: matplotlib.backends.backend_svg
:members:
diff --git a/doc/api/backend_template_api.rst b/doc/api/backend_template_api.rst
index 892f5b696d93..8198eeae121e 100644
--- a/doc/api/backend_template_api.rst
+++ b/doc/api/backend_template_api.rst
@@ -1,6 +1,6 @@
-
-:mod:`matplotlib.backends.backend_template`
-===========================================
+****************************************
+``matplotlib.backends.backend_template``
+****************************************
.. automodule:: matplotlib.backends.backend_template
:members:
diff --git a/doc/api/backend_tk_api.rst b/doc/api/backend_tk_api.rst
index 48131a48ce46..08abf603fd91 100644
--- a/doc/api/backend_tk_api.rst
+++ b/doc/api/backend_tk_api.rst
@@ -1,15 +1,12 @@
-
-:mod:`matplotlib.backends.backend_tkagg`
-========================================
+******************************************************************************
+``matplotlib.backends.backend_tkagg``, ``matplotlib.backends.backend_tkcairo``
+******************************************************************************
.. automodule:: matplotlib.backends.backend_tkagg
:members:
:undoc-members:
:show-inheritance:
-:mod:`matplotlib.backends.backend_tkcairo`
-==========================================
-
.. automodule:: matplotlib.backends.backend_tkcairo
:members:
:undoc-members:
diff --git a/doc/api/backend_tools_api.rst b/doc/api/backend_tools_api.rst
index 7e3d5619cc35..994f32ac854e 100644
--- a/doc/api/backend_tools_api.rst
+++ b/doc/api/backend_tools_api.rst
@@ -1,6 +1,6 @@
-
-:mod:`matplotlib.backend_tools`
-===============================
+****************************
+``matplotlib.backend_tools``
+****************************
.. automodule:: matplotlib.backend_tools
:members:
diff --git a/doc/api/backend_webagg_api.rst b/doc/api/backend_webagg_api.rst
index c71f84e31606..ced3533da249 100644
--- a/doc/api/backend_webagg_api.rst
+++ b/doc/api/backend_webagg_api.rst
@@ -1,9 +1,8 @@
+**************************************
+``matplotlib.backends.backend_webagg``
+**************************************
-:mod:`matplotlib.backends.backend_webagg`
-=========================================
-
-.. note::
- The WebAgg backend is not documented here, in order to avoid adding Tornado
- to the doc build requirements.
-
-.. module:: matplotlib.backends.backend_webagg
+.. automodule:: matplotlib.backends.backend_webagg
+ :members:
+ :undoc-members:
+ :show-inheritance:
diff --git a/doc/api/backend_wx_api.rst b/doc/api/backend_wx_api.rst
index 3ae3bc502e69..abf506a161be 100644
--- a/doc/api/backend_wx_api.rst
+++ b/doc/api/backend_wx_api.rst
@@ -1,14 +1,11 @@
-**NOTE** These backends are not documented here, to avoid adding a dependency
-to building the docs.
+******************************************************************************
+``matplotlib.backends.backend_wxagg``, ``matplotlib.backends.backend_wxcairo``
+******************************************************************************
-.. redirect-from:: /api/backend_wxagg_api
+**NOTE** These :ref:`backends` are not documented here, to avoid adding a
+dependency to building the docs.
-:mod:`matplotlib.backends.backend_wxagg`
-========================================
+.. redirect-from:: /api/backend_wxagg_api
.. module:: matplotlib.backends.backend_wxagg
-
-:mod:`matplotlib.backends.backend_wxcairo`
-==========================================
-
.. module:: matplotlib.backends.backend_wxcairo
diff --git a/doc/api/blocking_input_api.rst b/doc/api/blocking_input_api.rst
deleted file mode 100644
index 6ba612682ac4..000000000000
--- a/doc/api/blocking_input_api.rst
+++ /dev/null
@@ -1,8 +0,0 @@
-*****************************
-``matplotlib.blocking_input``
-*****************************
-
-.. automodule:: matplotlib.blocking_input
- :members:
- :undoc-members:
- :show-inheritance:
diff --git a/doc/api/colors_api.rst b/doc/api/colors_api.rst
index 4302e289530c..970986ff4438 100644
--- a/doc/api/colors_api.rst
+++ b/doc/api/colors_api.rst
@@ -2,8 +2,11 @@
``matplotlib.colors``
*********************
-The Color :ref:`tutorials ` and :ref:`examples
-` demonstrate how to set colors and colormaps.
+.. note::
+
+ The Color :ref:`tutorials ` and :ref:`examples
+ ` demonstrate how to set colors and colormaps. You may want
+ to read those instead.
.. currentmodule:: matplotlib.colors
@@ -11,26 +14,44 @@ The Color :ref:`tutorials ` and :ref:`examples
:no-members:
:no-inherited-members:
-Classes
--------
+Color norms
+-----------
.. autosummary::
:toctree: _as_gen/
:template: autosummary.rst
+ Normalize
+ NoNorm
+ AsinhNorm
BoundaryNorm
- Colormap
CenteredNorm
- LightSource
- LinearSegmentedColormap
- ListedColormap
+ FuncNorm
LogNorm
- NoNorm
- Normalize
PowerNorm
SymLogNorm
TwoSlopeNorm
- FuncNorm
+
+Colormaps
+---------
+
+.. autosummary::
+ :toctree: _as_gen/
+ :template: autosummary.rst
+
+ Colormap
+ LinearSegmentedColormap
+ ListedColormap
+
+Other classes
+-------------
+
+.. autosummary::
+ :toctree: _as_gen/
+ :template: autosummary.rst
+
+ ColorSequenceRegistry
+ LightSource
Functions
---------
@@ -49,3 +70,4 @@ Functions
is_color_like
same_color
get_named_colors_mapping
+ make_norm_from_scale
diff --git a/doc/api/dates_api.rst b/doc/api/dates_api.rst
index 1afeaaeac3cd..7a3e3bcf4a95 100644
--- a/doc/api/dates_api.rst
+++ b/doc/api/dates_api.rst
@@ -4,8 +4,10 @@
.. inheritance-diagram:: matplotlib.dates
:parts: 1
+ :top-classes: matplotlib.ticker.Formatter, matplotlib.ticker.Locator
.. automodule:: matplotlib.dates
:members:
:undoc-members:
+ :exclude-members: rrule
:show-inheritance:
diff --git a/doc/api/docstring_api.rst b/doc/api/docstring_api.rst
index 853ff93494cf..38a73a2e83d1 100644
--- a/doc/api/docstring_api.rst
+++ b/doc/api/docstring_api.rst
@@ -2,7 +2,12 @@
``matplotlib.docstring``
************************
-.. automodule:: matplotlib.docstring
+.. attention::
+ This module is considered internal.
+
+ Its use is deprecated and it will be removed in a future version.
+
+.. automodule:: matplotlib._docstring
:members:
:undoc-members:
:show-inheritance:
diff --git a/doc/api/font_manager_api.rst b/doc/api/font_manager_api.rst
index 24bfefe00d32..3e043112380b 100644
--- a/doc/api/font_manager_api.rst
+++ b/doc/api/font_manager_api.rst
@@ -7,5 +7,9 @@
:undoc-members:
:show-inheritance:
+ .. data:: fontManager
+ The global instance of `FontManager`.
+.. autoclass:: FontEntry
+ :no-undoc-members:
diff --git a/doc/api/fontconfig_pattern_api.rst b/doc/api/fontconfig_pattern_api.rst
deleted file mode 100644
index 772900035df7..000000000000
--- a/doc/api/fontconfig_pattern_api.rst
+++ /dev/null
@@ -1,8 +0,0 @@
-*********************************
-``matplotlib.fontconfig_pattern``
-*********************************
-
-.. automodule:: matplotlib.fontconfig_pattern
- :members:
- :undoc-members:
- :show-inheritance:
diff --git a/doc/api/ft2font.rst b/doc/api/ft2font.rst
new file mode 100644
index 000000000000..a1f984abdda5
--- /dev/null
+++ b/doc/api/ft2font.rst
@@ -0,0 +1,8 @@
+**********************
+``matplotlib.ft2font``
+**********************
+
+.. automodule:: matplotlib.ft2font
+ :members:
+ :undoc-members:
+ :show-inheritance:
diff --git a/doc/api/hatch_api.rst b/doc/api/hatch_api.rst
new file mode 100644
index 000000000000..b706be379a15
--- /dev/null
+++ b/doc/api/hatch_api.rst
@@ -0,0 +1,8 @@
+********************
+``matplotlib.hatch``
+********************
+
+.. automodule:: matplotlib.hatch
+ :members:
+ :undoc-members:
+ :show-inheritance:
diff --git a/doc/api/index.rst b/doc/api/index.rst
index c247a169e304..2e8c33fa05e5 100644
--- a/doc/api/index.rst
+++ b/doc/api/index.rst
@@ -1,44 +1,52 @@
-API Overview
-============
+API Reference
+=============
-.. toctree::
- :hidden:
+When using the library you will typically create
+:doc:`Figure ` and :doc:`Axes ` objects and
+call their methods to add content and modify the appearance.
- api_changes
+- :mod:`matplotlib.figure`: axes creation, figure-level content
+- :mod:`matplotlib.axes`: most plotting methods, Axes labels, access to axis
+ styling, etc.
-.. contents:: :local:
+Example: We create a Figure ``fig`` and Axes ``ax``. Then we call
+methods on them to plot data, add axis labels and a figure title.
-See also the :doc:`api_changes`.
+.. plot::
+ :include-source:
+ :align: center
-Usage patterns
---------------
+ import matplotlib.pyplot as plt
+ import numpy as np
-Below we describe several common approaches to plotting with Matplotlib.
+ x = np.arange(0, 4, 0.05)
+ y = np.sin(x*np.pi)
-The pyplot API
-^^^^^^^^^^^^^^
+ fig, ax = plt.subplots(figsize=(3,2), constrained_layout=True)
+ ax.plot(x, y)
+ ax.set_xlabel('t [s]')
+ ax.set_ylabel('S [V]')
+ ax.set_title('Sine wave')
+ fig.set_facecolor('lightsteelblue')
-`matplotlib.pyplot` is a collection of command style functions that make
-Matplotlib work like MATLAB. Each pyplot function makes some change to a
-figure: e.g., creates a figure, creates a plotting area in a figure, plots
-some lines in a plotting area, decorates the plot with labels, etc.
-`.pyplot` is mainly intended for interactive plots and simple cases of
-programmatic plot generation.
-Further reading:
+.. _usage_patterns:
-- The `matplotlib.pyplot` function reference
-- :doc:`/tutorials/introductory/pyplot`
-- :ref:`Pyplot examples `
+Usage patterns
+--------------
+
+Below we describe several common approaches to plotting with Matplotlib. See
+:ref:`api_interfaces` for an explanation of the trade-offs between the supported user
+APIs.
-.. _api-index:
-The object-oriented API
-^^^^^^^^^^^^^^^^^^^^^^^
+The explicit API
+^^^^^^^^^^^^^^^^
-At its core, Matplotlib is object-oriented. We recommend directly working
-with the objects, if you need more control and customization of your plots.
+At its core, Matplotlib is an object-oriented library. We recommend directly
+working with the objects if you need more control and customization of your
+plots.
In many cases you will create a `.Figure` and one or more
`~matplotlib.axes.Axes` using `.pyplot.subplots` and from then on only work
@@ -52,7 +60,27 @@ Further reading:
- Most of the :ref:`examples ` use the object-oriented approach
(except for the pyplot section)
-The pylab API (disapproved)
+
+The implicit API
+^^^^^^^^^^^^^^^^
+
+`matplotlib.pyplot` is a collection of functions that make
+Matplotlib work like MATLAB. Each pyplot function makes some change to a
+figure: e.g., creates a figure, creates a plotting area in a figure, plots
+some lines in a plotting area, decorates the plot with labels, etc.
+
+`.pyplot` is mainly intended for interactive plots and simple cases of
+programmatic plot generation.
+
+Further reading:
+
+- The `matplotlib.pyplot` function reference
+- :doc:`/tutorials/introductory/pyplot`
+- :ref:`Pyplot examples `
+
+.. _api-index:
+
+The pylab API (discouraged)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. automodule:: pylab
@@ -61,7 +89,7 @@ The pylab API (disapproved)
Modules
-------
-Matplotlib consists of the following submodules:
+Alphabetical list of modules:
.. toctree::
:maxdepth: 1
@@ -77,7 +105,6 @@ Matplotlib consists of the following submodules:
backend_tools_api.rst
index_backend_api.rst
bezier_api.rst
- blocking_input_api.rst
category_api.rst
cbook_api.rst
cm_api.rst
@@ -91,9 +118,11 @@ Matplotlib consists of the following submodules:
dviread.rst
figure_api.rst
font_manager_api.rst
- fontconfig_pattern_api.rst
+ ft2font.rst
gridspec_api.rst
+ hatch_api.rst
image_api.rst
+ layout_engine_api.rst
legend_api.rst
legend_handler_api.rst
lines_api.rst
@@ -110,6 +139,7 @@ Matplotlib consists of the following submodules:
rcsetup_api.rst
sankey_api.rst
scale_api.rst
+ sphinxext_mathmpl_api.rst
sphinxext_plot_directive_api.rst
spines_api.rst
style_api.rst
@@ -117,7 +147,6 @@ Matplotlib consists of the following submodules:
testing_api.rst
text_api.rst
texmanager_api.rst
- textpath_api.rst
ticker_api.rst
tight_bbox_api.rst
tight_layout_api.rst
@@ -128,22 +157,6 @@ Matplotlib consists of the following submodules:
widgets_api.rst
_api_api.rst
_enums_api.rst
-
-Toolkits
---------
-
-:ref:`toolkits-index` are collections of application-specific functions that extend
-Matplotlib. The following toolkits are included:
-
-.. toctree::
- :hidden:
-
- toolkits/index.rst
-
-.. toctree::
- :maxdepth: 1
-
toolkits/mplot3d.rst
toolkits/axes_grid1.rst
toolkits/axisartist.rst
- toolkits/axes_grid.rst
diff --git a/doc/api/index_backend_api.rst b/doc/api/index_backend_api.rst
index ad2febf8dc38..639d96a9a0dd 100644
--- a/doc/api/index_backend_api.rst
+++ b/doc/api/index_backend_api.rst
@@ -2,6 +2,8 @@
``matplotlib.backends``
***********************
+.. module:: matplotlib.backends
+
.. toctree::
:maxdepth: 1
@@ -10,6 +12,7 @@
backend_agg_api.rst
backend_cairo_api.rst
backend_gtk3_api.rst
+ backend_gtk4_api.rst
backend_nbagg_api.rst
backend_pdf_api.rst
backend_pgf_api.rst
diff --git a/doc/api/layout_engine_api.rst b/doc/api/layout_engine_api.rst
new file mode 100644
index 000000000000..8890061e0979
--- /dev/null
+++ b/doc/api/layout_engine_api.rst
@@ -0,0 +1,9 @@
+****************************
+``matplotlib.layout_engine``
+****************************
+
+.. currentmodule:: matplotlib.layout_engine
+
+.. automodule:: matplotlib.layout_engine
+ :members:
+ :inherited-members:
diff --git a/doc/api/lines_api.rst b/doc/api/lines_api.rst
index 808df726d118..4cde67c7e656 100644
--- a/doc/api/lines_api.rst
+++ b/doc/api/lines_api.rst
@@ -26,4 +26,3 @@ Functions
:template: autosummary.rst
segment_hits
-
\ No newline at end of file
diff --git a/doc/api/mathtext_api.rst b/doc/api/mathtext_api.rst
index c0f4941414ed..295ed0382c61 100644
--- a/doc/api/mathtext_api.rst
+++ b/doc/api/mathtext_api.rst
@@ -9,4 +9,3 @@
:members:
:undoc-members:
:show-inheritance:
- :exclude-members: Box, Char, ComputerModernFontConstants, DejaVuSansFontConstants, DejaVuSerifFontConstants, FontConstantsBase, Fonts, Glue, Kern, Node, Parser, STIXFontConstants, STIXSansFontConstants, Ship, StandardPsFonts, TruetypeFonts
diff --git a/doc/api/matplotlib_configuration_api.rst b/doc/api/matplotlib_configuration_api.rst
index 5fa27bbc6723..d5dc60c80613 100644
--- a/doc/api/matplotlib_configuration_api.rst
+++ b/doc/api/matplotlib_configuration_api.rst
@@ -4,6 +4,11 @@
.. py:currentmodule:: matplotlib
+.. automodule:: matplotlib
+ :no-members:
+ :no-undoc-members:
+ :noindex:
+
Backend management
==================
@@ -26,6 +31,7 @@ Default values and styling
:no-members:
.. automethod:: find_all
+ .. automethod:: copy
.. autofunction:: rc_context
@@ -52,7 +58,18 @@ Logging
.. autofunction:: set_loglevel
+Colormaps and color sequences
+=============================
+
+.. autodata:: colormaps
+ :no-value:
+
+.. autodata:: color_sequences
+ :no-value:
+
Miscellaneous
=============
+.. autoclass:: MatplotlibDeprecationWarning
+
.. autofunction:: get_cachedir
diff --git a/doc/api/next_api_changes.rst b/doc/api/next_api_changes.rst
new file mode 100644
index 000000000000..d33c8014f735
--- /dev/null
+++ b/doc/api/next_api_changes.rst
@@ -0,0 +1,15 @@
+
+================
+Next API changes
+================
+
+.. ifconfig:: releaselevel == 'dev'
+
+ .. toctree::
+ :glob:
+ :maxdepth: 1
+
+ next_api_changes/behavior/*
+ next_api_changes/deprecations/*
+ next_api_changes/development/*
+ next_api_changes/removals/*
diff --git a/doc/api/next_api_changes/behavior/00001-ABC.rst b/doc/api/next_api_changes/behavior/00001-ABC.rst
index 236f672c1123..f6d8c1d8b351 100644
--- a/doc/api/next_api_changes/behavior/00001-ABC.rst
+++ b/doc/api/next_api_changes/behavior/00001-ABC.rst
@@ -1,7 +1,7 @@
-Behavior Change template
+Behavior change template
~~~~~~~~~~~~~~~~~~~~~~~~
Enter description here....
Please rename file with PR number and your initials i.e. "99999-ABC.rst"
-and ``git add`` the new file.
+and ``git add`` the new file.
diff --git a/doc/api/next_api_changes/development/00001-ABC.rst b/doc/api/next_api_changes/development/00001-ABC.rst
index 4c60d3db185b..6db90a13e44c 100644
--- a/doc/api/next_api_changes/development/00001-ABC.rst
+++ b/doc/api/next_api_changes/development/00001-ABC.rst
@@ -1,7 +1,7 @@
-Development Change template
+Development change template
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Enter description here....
Please rename file with PR number and your initials i.e. "99999-ABC.rst"
-and ``git add`` the new file.
+and ``git add`` the new file.
diff --git a/doc/api/next_api_changes/removals/00001-ABC.rst b/doc/api/next_api_changes/removals/00001-ABC.rst
index 5c68eda9698a..3cc5b6344f7f 100644
--- a/doc/api/next_api_changes/removals/00001-ABC.rst
+++ b/doc/api/next_api_changes/removals/00001-ABC.rst
@@ -1,7 +1,7 @@
-Removal Change template
+Removal change template
~~~~~~~~~~~~~~~~~~~~~~~
Enter description of methods/classes removed here....
Please rename file with PR number and your initials i.e. "99999-ABC.rst"
-and ``git add`` the new file.
+and ``git add`` the new file.
diff --git a/doc/api/patches_api.rst b/doc/api/patches_api.rst
index ac21a644ccab..5b1eefa91971 100644
--- a/doc/api/patches_api.rst
+++ b/doc/api/patches_api.rst
@@ -2,7 +2,9 @@
``matplotlib.patches``
**********************
-.. currentmodule:: matplotlib.patches
+
+.. inheritance-diagram:: matplotlib.patches
+ :parts: 1
.. automodule:: matplotlib.patches
:no-members:
@@ -15,6 +17,7 @@ Classes
:toctree: _as_gen/
:template: autosummary.rst
+ Annulus
Arc
Arrow
ArrowStyle
@@ -45,4 +48,3 @@ Functions
bbox_artist
draw_bbox
-
diff --git a/doc/api/prev_api_changes/api_changes_0.65.rst b/doc/api/prev_api_changes/api_changes_0.65.rst
index 43fffb1bcf4e..f9b9af732010 100644
--- a/doc/api/prev_api_changes/api_changes_0.65.rst
+++ b/doc/api/prev_api_changes/api_changes_0.65.rst
@@ -8,5 +8,5 @@ Changes for 0.65
connect and disconnect
Did away with the text methods for angle since they were ambiguous.
- fontangle could mean fontstyle (obligue, etc) or the rotation of the
+ fontangle could mean fontstyle (oblique, etc) or the rotation of the
text. Use style and rotation instead.
diff --git a/doc/api/prev_api_changes/api_changes_0.70.rst b/doc/api/prev_api_changes/api_changes_0.70.rst
index b8094658b249..e30dfbb64954 100644
--- a/doc/api/prev_api_changes/api_changes_0.70.rst
+++ b/doc/api/prev_api_changes/api_changes_0.70.rst
@@ -6,4 +6,4 @@ Changes for 0.70
MplEvent factored into a base class Event and derived classes
MouseEvent and KeyEvent
- Removed definct set_measurement in wx toolbar
+ Removed defunct set_measurement in wx toolbar
diff --git a/doc/api/prev_api_changes/api_changes_0.72.rst b/doc/api/prev_api_changes/api_changes_0.72.rst
index 9529e396f356..bfb6fc124658 100644
--- a/doc/api/prev_api_changes/api_changes_0.72.rst
+++ b/doc/api/prev_api_changes/api_changes_0.72.rst
@@ -6,7 +6,7 @@ Changes for 0.72
- Line2D, Text, and Patch copy_properties renamed update_from and
moved into artist base class
- - LineCollecitons.color renamed to LineCollections.set_color for
+ - LineCollections.color renamed to LineCollections.set_color for
consistency with set/get introspection mechanism,
- pylab figure now defaults to num=None, which creates a new figure
diff --git a/doc/api/prev_api_changes/api_changes_0.91.0.rst b/doc/api/prev_api_changes/api_changes_0.91.0.rst
index b33fcb50f0ad..32760554522a 100644
--- a/doc/api/prev_api_changes/api_changes_0.91.0.rst
+++ b/doc/api/prev_api_changes/api_changes_0.91.0.rst
@@ -25,18 +25,18 @@ Changes for 0.91.0
* The :mod:`matplotlib.dviread` file now has a parser for files like
psfonts.map and pdftex.map, to map TeX font names to external files.
-* The file :mod:`matplotlib.type1font` contains a new class for Type 1
+* The file ``matplotlib.type1font`` contains a new class for Type 1
fonts. Currently it simply reads pfa and pfb format files and
stores the data in a way that is suitable for embedding in pdf
files. In the future the class might actually parse the font to
allow e.g., subsetting.
-* :mod:`matplotlib.ft2font` now supports ``FT_Attach_File``. In
+* ``matplotlib.ft2font`` now supports ``FT_Attach_File``. In
practice this can be used to read an afm file in addition to a
pfa/pfb file, to get metrics and kerning information for a Type 1
font.
-* The :class:`.AFM` class now supports querying CapHeight and stem
+* The ``AFM`` class now supports querying CapHeight and stem
widths. The get_name_char method now has an isord kwarg like
get_width_char.
diff --git a/doc/api/prev_api_changes/api_changes_0.98.0.rst b/doc/api/prev_api_changes/api_changes_0.98.0.rst
index 0c73628e1651..bb9f3e6585af 100644
--- a/doc/api/prev_api_changes/api_changes_0.98.0.rst
+++ b/doc/api/prev_api_changes/api_changes_0.98.0.rst
@@ -12,7 +12,7 @@ Changes for 0.98.0
rather than custom callback handling. Any users of
``matplotlib.cm.ScalarMappable.add_observer`` of the
:class:`~matplotlib.cm.ScalarMappable` should use the
- :attr:`matplotlib.cm.ScalarMappable.callbacksSM`
+ ``matplotlib.cm.ScalarMappable.callbacksSM``
:class:`~matplotlib.cbook.CallbackRegistry` instead.
* New axes function and Axes method provide control over the plot
@@ -126,8 +126,8 @@ with a verb in the present tense.
| ``lbwh_to_bbox(l, b, w, h)`` | `Bbox.from_bounds(x0, y0, w, h) <.Bbox.from_bounds>` |
| | [It is a staticmethod.] |
+--------------------------------------------+------------------------------------------------------+
-| ``inverse_transform_bbox(trans, bbox)`` | `Bbox.inverse_transformed(trans) |
-| | <.BboxBase.inverse_transformed>` |
+| ``inverse_transform_bbox(trans, bbox)`` | ``bbox.inverse_transformed(trans)`` |
+| | |
+--------------------------------------------+------------------------------------------------------+
| ``Interval.contains_open(v)`` | `interval_contains_open(tuple, v) |
| | <.interval_contains_open>` |
@@ -181,7 +181,7 @@ The ``Polar`` class has moved to :mod:`matplotlib.projections.polar`.
.. [3] :meth:`matplotlib.axes.Axes.set_position` now accepts either
four scalars or a :class:`matplotlib.transforms.Bbox` instance.
-.. [4] Since the recfactoring allows for more than two scale types
+.. [4] Since the refactoring allows for more than two scale types
('log' or 'linear'), it no longer makes sense to have a toggle.
``Axes.toggle_log_lineary()`` has been removed.
diff --git a/doc/api/prev_api_changes/api_changes_0.98.x.rst b/doc/api/prev_api_changes/api_changes_0.98.x.rst
index 41ee63502254..053fd908a03e 100644
--- a/doc/api/prev_api_changes/api_changes_0.98.x.rst
+++ b/doc/api/prev_api_changes/api_changes_0.98.x.rst
@@ -63,8 +63,8 @@ Changes for 0.98.x
:meth:`matplotlib.axes.Axes.set_ylim` now return a copy of the
``viewlim`` array to avoid modify-in-place surprises.
-* :meth:`matplotlib.afm.AFM.get_fullname` and
- :meth:`matplotlib.afm.AFM.get_familyname` no longer raise an
+* ``matplotlib.afm.AFM.get_fullname`` and
+ ``matplotlib.afm.AFM.get_familyname`` no longer raise an
exception if the AFM file does not specify these optional
attributes, but returns a guess based on the required FontName
attribute.
@@ -87,13 +87,13 @@ Changes for 0.98.x
:class:`~matplotlib.collections.Collection` base class.
* ``matplotlib.figure.Figure.figurePatch`` renamed
- :attr:`matplotlib.figure.Figure.patch`;
+ ``matplotlib.figure.Figure.patch``;
``matplotlib.axes.Axes.axesPatch`` renamed
- :attr:`matplotlib.axes.Axes.patch`;
+ ``matplotlib.axes.Axes.patch``;
``matplotlib.axes.Axes.axesFrame`` renamed
- :attr:`matplotlib.axes.Axes.frame`.
+ ``matplotlib.axes.Axes.frame``.
``matplotlib.axes.Axes.get_frame``, which returns
- :attr:`matplotlib.axes.Axes.patch`, is deprecated.
+ ``matplotlib.axes.Axes.patch``, is deprecated.
* Changes in the :class:`matplotlib.contour.ContourLabeler` attributes
(:func:`matplotlib.pyplot.clabel` function) so that they all have a
diff --git a/doc/api/prev_api_changes/api_changes_0.99.x.rst b/doc/api/prev_api_changes/api_changes_0.99.x.rst
index 03596e93dac3..4736d066d43e 100644
--- a/doc/api/prev_api_changes/api_changes_0.99.x.rst
+++ b/doc/api/prev_api_changes/api_changes_0.99.x.rst
@@ -21,8 +21,8 @@ Changes beyond 0.99.x
on or off, and applies it.
+ :meth:`matplotlib.axes.Axes.margins` sets margins used to
- autoscale the :attr:`matplotlib.axes.Axes.viewLim` based on
- the :attr:`matplotlib.axes.Axes.dataLim`.
+ autoscale the ``matplotlib.axes.Axes.viewLim`` based on
+ the ``matplotlib.axes.Axes.dataLim``.
+ :meth:`matplotlib.axes.Axes.locator_params` allows one to
adjust axes locator parameters such as *nbins*.
diff --git a/doc/api/prev_api_changes/api_changes_1.1.x.rst b/doc/api/prev_api_changes/api_changes_1.1.x.rst
index 8320e2c4fc09..790b669081b7 100644
--- a/doc/api/prev_api_changes/api_changes_1.1.x.rst
+++ b/doc/api/prev_api_changes/api_changes_1.1.x.rst
@@ -1,6 +1,6 @@
-Changes in 1.1.x
-================
+API Changes in 1.1.x
+====================
* Added new :class:`matplotlib.sankey.Sankey` for generating Sankey diagrams.
diff --git a/doc/api/prev_api_changes/api_changes_1.2.x.rst b/doc/api/prev_api_changes/api_changes_1.2.x.rst
index cb6b2071f79b..45a2f35cf29e 100644
--- a/doc/api/prev_api_changes/api_changes_1.2.x.rst
+++ b/doc/api/prev_api_changes/api_changes_1.2.x.rst
@@ -1,5 +1,5 @@
-Changes in 1.2.x
-================
+API Changes in 1.2.x
+====================
* The ``classic`` option of the rc parameter ``toolbar`` is deprecated
and will be removed in the next release.
@@ -66,7 +66,7 @@ Changes in 1.2.x
This change means that third party objects can expose themselves as
Matplotlib axes by providing a ``_as_mpl_axes`` method. See
- :ref:`adding-new-scales` for more detail.
+ :mod:`matplotlib.projections` for more detail.
* A new keyword *extendfrac* in :meth:`~matplotlib.pyplot.colorbar` and
:class:`~matplotlib.colorbar.ColorbarBase` allows one to control the size of
diff --git a/doc/api/prev_api_changes/api_changes_1.3.x.rst b/doc/api/prev_api_changes/api_changes_1.3.x.rst
index 5b596d83b5e2..553f4d7118c7 100644
--- a/doc/api/prev_api_changes/api_changes_1.3.x.rst
+++ b/doc/api/prev_api_changes/api_changes_1.3.x.rst
@@ -1,8 +1,8 @@
.. _changes_in_1_3:
-Changes in 1.3.x
-================
+API Changes in 1.3.x
+====================
Changes in 1.3.1
----------------
@@ -33,7 +33,7 @@ Code removal
functionality on `matplotlib.path.Path.contains_point` and
friends instead.
- - Instead of ``axes.Axes.get_frame``, use `.axes.Axes.patch`.
+ - Instead of ``axes.Axes.get_frame``, use ``axes.Axes.patch``.
- The following keyword arguments to the `~.axes.Axes.legend` function have
been renamed:
@@ -102,7 +102,7 @@ Code deprecation
be used. In previous Matplotlib versions this attribute was an undocumented
tuple of ``(colorbar_instance, colorbar_axes)`` but is now just
``colorbar_instance``. To get the colorbar axes it is possible to just use
- the :attr:`~matplotlib.colorbar.ColorbarBase.ax` attribute on a colorbar
+ the ``matplotlib.colorbar.ColorbarBase.ax`` attribute on a colorbar
instance.
* The ``matplotlib.mpl`` module is now deprecated. Those who relied on this
@@ -192,7 +192,7 @@ Code changes
by ``self.vline`` for vertical cursors lines and ``self.hline`` is added
for the horizontal cursors lines.
-* On POSIX platforms, the :func:`~matplotlib.cbook.report_memory` function
+* On POSIX platforms, the ``matplotlib.cbook.report_memory`` function
raises :class:`NotImplementedError` instead of :class:`OSError` if the
:command:`ps` command cannot be run.
diff --git a/doc/api/prev_api_changes/api_changes_1.4.x.rst b/doc/api/prev_api_changes/api_changes_1.4.x.rst
index 2d49b4b6651a..c12d40a67991 100644
--- a/doc/api/prev_api_changes/api_changes_1.4.x.rst
+++ b/doc/api/prev_api_changes/api_changes_1.4.x.rst
@@ -1,5 +1,5 @@
-Changes in 1.4.x
-================
+API Changes in 1.4.x
+====================
Code changes
------------
@@ -82,7 +82,7 @@ original location:
* The artist used to draw the outline of a `.Figure.colorbar` has been changed
from a `matplotlib.lines.Line2D` to `matplotlib.patches.Polygon`, thus
- `.colorbar.ColorbarBase.outline` is now a `matplotlib.patches.Polygon`
+ ``colorbar.ColorbarBase.outline`` is now a `matplotlib.patches.Polygon`
object.
* The legend handler interface has changed from a callable, to any object
@@ -149,9 +149,9 @@ original location:
``drawRect`` from ``FigureCanvasQTAgg``; they were always an
implementation detail of the (preserved) ``drawRectangle()`` function.
-* The function signatures of `.tight_bbox.adjust_bbox` and
- `.tight_bbox.process_figure_for_rasterizing` have been changed. A new
- *fixed_dpi* parameter allows for overriding the ``figure.dpi`` setting
+* The function signatures of ``matplotlib.tight_bbox.adjust_bbox`` and
+ ``matplotlib.tight_bbox.process_figure_for_rasterizing`` have been changed.
+ A new *fixed_dpi* parameter allows for overriding the ``figure.dpi`` setting
instead of trying to deduce the intended behaviour from the file format.
* Added support for horizontal/vertical axes padding to
diff --git a/doc/api/prev_api_changes/api_changes_1.5.0.rst b/doc/api/prev_api_changes/api_changes_1.5.0.rst
index 4ebb5c182c4b..1248b1dfd394 100644
--- a/doc/api/prev_api_changes/api_changes_1.5.0.rst
+++ b/doc/api/prev_api_changes/api_changes_1.5.0.rst
@@ -1,6 +1,6 @@
-Changes in 1.5.0
-================
+API Changes in 1.5.0
+====================
Code Changes
------------
@@ -41,7 +41,7 @@ fully delegate to `.Quiver`). Previously any input matching 'mid.*' would be
interpreted as 'middle', 'tip.*' as 'tip' and any string not matching one of
those patterns as 'tail'.
-The value of `.Quiver.pivot` is normalized to be in the set {'tip', 'tail',
+The value of ``Quiver.pivot`` is normalized to be in the set {'tip', 'tail',
'middle'} in `.Quiver`.
Reordered ``Axes.get_children``
@@ -60,7 +60,7 @@ by the new keyword argument *corner_mask*, or if this is not specified then
the new :rc:`contour.corner_mask` instead. The new default behaviour is
equivalent to using ``corner_mask=True``; the previous behaviour can be obtained
using ``corner_mask=False`` or by changing the rcParam. The example
-http://matplotlib.org/examples/pylab_examples/contour_corner_mask.html
+https://matplotlib.org/examples/pylab_examples/contour_corner_mask.html
demonstrates the difference. Use of the old contouring algorithm, which is
obtained with ``corner_mask='legacy'``, is now deprecated.
@@ -116,10 +116,10 @@ In either case to update the data in the `.Line2D` object you must update
both the ``x`` and ``y`` data.
-Removed *args* and *kwargs* from `.MicrosecondLocator.__call__`
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Removed *args* and *kwargs* from ``MicrosecondLocator.__call__``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-The call signature of :meth:`~matplotlib.dates.MicrosecondLocator.__call__`
+The call signature of ``matplotlib.dates.MicrosecondLocator.__call__``
has changed from ``__call__(self, *args, **kwargs)`` to ``__call__(self)``.
This is consistent with the superclass :class:`~matplotlib.ticker.Locator`
and also all the other Locators derived from this superclass.
@@ -374,7 +374,7 @@ directly.
patheffects.svg
~~~~~~~~~~~~~~~
- - remove ``get_proxy_renderer`` method from ``AbstarctPathEffect`` class
+ - remove ``get_proxy_renderer`` method from ``AbstractPathEffect`` class
- remove ``patch_alpha`` and ``offset_xy`` from ``SimplePatchShadow``
diff --git a/doc/api/prev_api_changes/api_changes_1.5.2.rst b/doc/api/prev_api_changes/api_changes_1.5.2.rst
index d2ee33546314..85c504fa6f12 100644
--- a/doc/api/prev_api_changes/api_changes_1.5.2.rst
+++ b/doc/api/prev_api_changes/api_changes_1.5.2.rst
@@ -1,5 +1,5 @@
-Changes in 1.5.2
-================
+API Changes in 1.5.2
+====================
Default Behavior Changes
diff --git a/doc/api/prev_api_changes/api_changes_1.5.3.rst b/doc/api/prev_api_changes/api_changes_1.5.3.rst
index 0dc025111eae..ff5d6a9cf996 100644
--- a/doc/api/prev_api_changes/api_changes_1.5.3.rst
+++ b/doc/api/prev_api_changes/api_changes_1.5.3.rst
@@ -1,5 +1,5 @@
-Changes in 1.5.3
-================
+API Changes in 1.5.3
+====================
``ax.plot(..., marker=None)`` gives default marker
--------------------------------------------------
diff --git a/doc/api/prev_api_changes/api_changes_2.1.0.rst b/doc/api/prev_api_changes/api_changes_2.1.0.rst
index 90f9e00eecd1..39ea78bdf587 100644
--- a/doc/api/prev_api_changes/api_changes_2.1.0.rst
+++ b/doc/api/prev_api_changes/api_changes_2.1.0.rst
@@ -20,7 +20,7 @@ Previously they were clipped to a very small number and shown.
Matplotlib uses instances of :obj:`~matplotlib.cbook.CallbackRegistry`
as a bridge between user input event from the GUI and user callbacks.
Previously, any exceptions raised in a user call back would bubble out
-of of the ``process`` method, which is typically in the GUI event
+of the ``process`` method, which is typically in the GUI event
loop. Most GUI frameworks simple print the traceback to the screen
and continue as there is not always a clear method of getting the
exception back to the user. However PyQt5 now exits the process when
@@ -422,8 +422,8 @@ The ``shading`` kwarg to `~matplotlib.axes.Axes.pcolor` has been
removed. Set ``edgecolors`` appropriately instead.
-Functions removed from the `.lines` module
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Functions removed from the ``lines`` module
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The :mod:`matplotlib.lines` module no longer imports the
``pts_to_prestep``, ``pts_to_midstep`` and ``pts_to_poststep``
diff --git a/doc/api/prev_api_changes/api_changes_2.2.0.rst b/doc/api/prev_api_changes/api_changes_2.2.0.rst
index 29ed03649fd8..f13fe2a246f0 100644
--- a/doc/api/prev_api_changes/api_changes_2.2.0.rst
+++ b/doc/api/prev_api_changes/api_changes_2.2.0.rst
@@ -74,7 +74,7 @@ rcParam.
Deprecated ``Axis.unit_data``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Use `.Axis.units` (which has long existed) instead.
+Use ``Axis.units`` (which has long existed) instead.
Removals
@@ -159,7 +159,7 @@ If `.MovieWriterRegistry` can't find the requested `.MovieWriter`, a
more helpful `RuntimeError` message is now raised instead of the
previously raised `KeyError`.
-`~.tight_layout.auto_adjust_subplotpars` now raises `ValueError`
+``matplotlib.tight_layout.auto_adjust_subplotpars`` now raises `ValueError`
instead of `RuntimeError` when sizes of input lists don't match
@@ -169,7 +169,7 @@ instead of `RuntimeError` when sizes of input lists don't match
`matplotlib.figure.Figure.set_figwidth` and
`matplotlib.figure.Figure.set_figheight` had the keyword argument
``forward=False`` by default, but `.figure.Figure.set_size_inches` now defaults
-to ``forward=True``. This makes these functions conistent.
+to ``forward=True``. This makes these functions consistent.
Do not truncate svg sizes to nearest point
@@ -198,11 +198,11 @@ Changes to Qt backend class MRO
To support both Agg and cairo rendering for Qt backends all of the non-Agg
specific code previously in ``backend_qt5agg.FigureCanvasQTAggBase`` has been
-moved to :class:`.backend_qt5.FigureCanvasQT` so it can be shared with the
+moved to ``backend_qt5.FigureCanvasQT`` so it can be shared with the
cairo implementation. The ``FigureCanvasQTAggBase.paintEvent``,
``FigureCanvasQTAggBase.blit``, and ``FigureCanvasQTAggBase.print_figure``
-methods have moved to :meth:`.FigureCanvasQTAgg.paintEvent`,
-:meth:`.FigureCanvasQTAgg.blit`, and :meth:`.FigureCanvasQTAgg.print_figure`.
+methods have moved to ``FigureCanvasQTAgg.paintEvent``,
+``FigureCanvasQTAgg.blit``, and ``FigureCanvasQTAgg.print_figure``.
The first two methods assume that the instance is also a ``QWidget`` so to use
``FigureCanvasQTAggBase`` it was required to multiple inherit from a
``QWidget`` sub-class.
@@ -210,9 +210,9 @@ The first two methods assume that the instance is also a ``QWidget`` so to use
Having moved all of its methods either up or down the class hierarchy
``FigureCanvasQTAggBase`` has been deprecated. To do this without warning and
to preserve as much API as possible, ``.backend_qt5agg.FigureCanvasQTAggBase``
-now inherits from :class:`.backend_qt5.FigureCanvasQTAgg`.
+now inherits from ``backend_qt5.FigureCanvasQTAgg``.
-The MRO for :class:`.FigureCanvasQTAgg` and ``FigureCanvasQTAggBase`` used to
+The MRO for ``FigureCanvasQTAgg`` and ``FigureCanvasQTAggBase`` used to
be ::
diff --git a/doc/api/prev_api_changes/api_changes_3.0.0.rst b/doc/api/prev_api_changes/api_changes_3.0.0.rst
index a6224c352179..89a588d8f9e3 100644
--- a/doc/api/prev_api_changes/api_changes_3.0.0.rst
+++ b/doc/api/prev_api_changes/api_changes_3.0.0.rst
@@ -106,7 +106,7 @@ Different exception types for undocumented options
- Passing the undocumented ``xmin`` or ``xmax`` arguments to
:meth:`~matplotlib.axes.Axes.set_xlim` would silently override the ``left``
and ``right`` arguments. :meth:`~matplotlib.axes.Axes.set_ylim` and the
- 3D equivalents (e.g. `~.Axes3D.set_zlim3d`) had a
+ 3D equivalents (e.g. `~.Axes3D.set_zlim`) had a
corresponding problem.
A ``TypeError`` will be raised if they would override the earlier
limit arguments. In 3.0 these were kwargs were deprecated, but in 3.1
@@ -197,7 +197,7 @@ Contour color autoscaling improvements
Selection of contour levels is now the same for contour and
contourf; previously, for contour, levels outside the data range were
deleted. (Exception: if no contour levels are found within the
-data range, the `levels` attribute is replaced with a list holding
+data range, the ``levels`` attribute is replaced with a list holding
only the minimum of the data range.)
When contour is called with levels specified as a target number rather
@@ -297,7 +297,7 @@ Blacklisted rcparams no longer updated by `~matplotlib.rcdefaults`, `~matplotlib
The rc modifier functions `~matplotlib.rcdefaults`,
`~matplotlib.rc_file_defaults` and `~matplotlib.rc_file`
-now ignore rcParams in the `matplotlib.style.core.STYLE_BLACKLIST` set. In
+now ignore rcParams in the ``matplotlib.style.core.STYLE_BLACKLIST`` set. In
particular, this prevents the ``backend`` and ``interactive`` rcParams from
being incorrectly modified by these functions.
@@ -324,12 +324,12 @@ instead of ``\usepackage{ucs}\usepackage[utf8x]{inputenc}``.
Return type of ArtistInspector.get_aliases changed
--------------------------------------------------
-`ArtistInspector.get_aliases` previously returned the set of aliases as
+``ArtistInspector.get_aliases`` previously returned the set of aliases as
``{fullname: {alias1: None, alias2: None, ...}}``. The dict-to-None mapping
was used to simulate a set in earlier versions of Python. It has now been
replaced by a set, i.e. ``{fullname: {alias1, alias2, ...}}``.
-This value is also stored in `.ArtistInspector.aliasd`, which has likewise
+This value is also stored in ``ArtistInspector.aliasd``, which has likewise
changed.
@@ -471,7 +471,7 @@ Hold machinery
Setting or unsetting ``hold`` (:ref:`deprecated in version 2.0`) has now
been completely removed. Matplotlib now always behaves as if ``hold=True``.
To clear an axes you can manually use :meth:`~.axes.Axes.cla()`,
-or to clear an entire figure use :meth:`~.figure.Figure.clf()`.
+or to clear an entire figure use :meth:`~.figure.Figure.clear()`.
Removal of deprecated backends
diff --git a/doc/api/prev_api_changes/api_changes_3.0.1.rst b/doc/api/prev_api_changes/api_changes_3.0.1.rst
index d214ae9e6652..4b203cd04596 100644
--- a/doc/api/prev_api_changes/api_changes_3.0.1.rst
+++ b/doc/api/prev_api_changes/api_changes_3.0.1.rst
@@ -1,10 +1,10 @@
API Changes for 3.0.1
=====================
-`.tight_layout.auto_adjust_subplotpars` can return ``None`` now if the new
-subplotparams will collapse axes to zero width or height. This prevents
-``tight_layout`` from being executed. Similarly
-`.tight_layout.get_tight_layout_figure` will return None.
+``matplotlib.tight_layout.auto_adjust_subplotpars`` can return ``None`` now if
+the new subplotparams will collapse axes to zero width or height.
+This prevents ``tight_layout`` from being executed. Similarly
+``matplotlib.tight_layout.get_tight_layout_figure`` will return None.
To improve import (startup) time, private modules are now imported lazily.
These modules are no longer available at these locations:
diff --git a/doc/api/prev_api_changes/api_changes_3.1.0.rst b/doc/api/prev_api_changes/api_changes_3.1.0.rst
index f3737889841f..3e67af8f64cf 100644
--- a/doc/api/prev_api_changes/api_changes_3.1.0.rst
+++ b/doc/api/prev_api_changes/api_changes_3.1.0.rst
@@ -293,9 +293,9 @@ where the `.cm.ScalarMappable` passed to `matplotlib.colorbar.Colorbar`
(`~.Figure.colorbar`) had a ``set_norm`` method, as did the colorbar.
The colorbar is now purely a follower to the `.ScalarMappable` norm and
colormap, and the old inherited methods
-`~matplotlib.colorbar.ColorbarBase.set_norm`,
-`~matplotlib.colorbar.ColorbarBase.set_cmap`,
-`~matplotlib.colorbar.ColorbarBase.set_clim` are deprecated, as are
+``matplotlib.colorbar.ColorbarBase.set_norm``,
+``matplotlib.colorbar.ColorbarBase.set_cmap``,
+``matplotlib.colorbar.ColorbarBase.set_clim`` are deprecated, as are
the getter versions of those calls. To set the norm associated with a
colorbar do ``colorbar.mappable.set_norm()`` etc.
@@ -308,7 +308,7 @@ FreeType or libpng are not in the compiler or linker's default path, set the
standard environment variables ``CFLAGS``/``LDFLAGS`` on Linux or OSX, or
``CL``/``LINK`` on Windows, to indicate the relevant paths.
-See details in :doc:`/users/installing`.
+See details in :doc:`/users/installing/index`.
Setting artist properties twice or more in the same call
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -337,7 +337,7 @@ match the array value type of the ``Path.codes`` array.
LaTeX code in matplotlibrc file
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Previously, the rc file keys ``pgf.preamble`` and ``text.latex.preamble`` were
-parsed using commmas as separators. This would break valid LaTeX code, such as::
+parsed using commas as separators. This would break valid LaTeX code, such as::
\usepackage[protrusion=true, expansion=false]{microtype}
@@ -389,16 +389,16 @@ consistent with the behavior on Py2, where a buffer object was
returned.
-`matplotlib.font_manager.win32InstalledFonts` return type
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-`matplotlib.font_manager.win32InstalledFonts` returns an empty list instead
+``matplotlib.font_manager.win32InstalledFonts`` return type
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+``matplotlib.font_manager.win32InstalledFonts`` returns an empty list instead
of None if no fonts are found.
-`.Axes.fmt_xdata` and `.Axes.fmt_ydata` error handling
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+``Axes.fmt_xdata`` and ``Axes.fmt_ydata`` error handling
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Previously, if the user provided a `.Axes.fmt_xdata` or
-`.Axes.fmt_ydata` function that raised a `TypeError` (or set them to a
+Previously, if the user provided a ``Axes.fmt_xdata`` or
+``Axes.fmt_ydata`` function that raised a `TypeError` (or set them to a
non-callable), the exception would be silently ignored and the default
formatter be used instead. This is no longer the case; the exception
is now propagated out.
@@ -476,7 +476,7 @@ Exception changes
- `.Axes.streamplot` does not support irregularly gridded ``x`` and ``y`` values.
So far, it used to silently plot an incorrect result. This has been changed to
raise a `ValueError` instead.
-- The `.streamplot.Grid` class, which is internally used by streamplot
+- The ``streamplot.Grid`` class, which is internally used by streamplot
code, also throws a `ValueError` when irregularly gridded values are
passed in.
@@ -496,7 +496,7 @@ Classes and methods
- ``backend_wx.Toolbar`` (use ``backend_wx.NavigationToolbar2Wx`` instead)
- ``cbook.align_iterators`` (no replacement)
- ``contour.ContourLabeler.get_real_label_width`` (no replacement)
-- ``legend.Legend.draggable`` (use `legend.Legend.set_draggable()` instead)
+- ``legend.Legend.draggable`` (use `.legend.Legend.set_draggable()` instead)
- ``texmanager.TexManager.postscriptd``, ``texmanager.TexManager.pscnt``,
``texmanager.TexManager.make_ps``, ``texmanager.TexManager.get_ps_bbox``
(no replacements)
@@ -566,7 +566,7 @@ in Matplotlib 2.2 has been removed. See below for a list:
- ``mlab.safe_isnan`` (use `numpy.isnan` instead)
- ``mlab.cohere_pairs`` (use `scipy.signal.coherence` instead)
- ``mlab.entropy`` (use `scipy.stats.entropy` instead)
-- ``mlab.normpdf`` (use `scipy.stats.norm.pdf` instead)
+- ``mlab.normpdf`` (use ``scipy.stats.norm.pdf`` instead)
- ``mlab.find`` (use ``np.nonzero(np.ravel(condition))`` instead)
- ``mlab.longest_contiguous_ones``
- ``mlab.longest_ones``
@@ -652,7 +652,7 @@ no longer available in the `pylab` module:
- ``longest_ones``
- ``movavg``
- ``norm_flat`` (use ``numpy.linalg.norm(a.flat, ord=2)`` instead)
-- ``normpdf`` (use `scipy.stats.norm.pdf` instead)
+- ``normpdf`` (use ``scipy.stats.norm.pdf`` instead)
- ``path_length``
- ``poly_below``
- ``poly_between``
@@ -705,7 +705,7 @@ now a no-op).
The image comparison test decorators now skip (rather than xfail) the test for
uncomparable formats. The affected decorators are `~.image_comparison` and
-`~.check_figures_equal`. The deprecated `~.ImageComparisonTest` class is
+`~.check_figures_equal`. The deprecated ``ImageComparisonTest`` class is
likewise changed.
Dependency changes
@@ -825,7 +825,7 @@ This has not been used in the codebase since its addition in 2009.
This has never been used internally, there is no equivalent method exists on
the 2D Axis classes, and despite the similar name, it has a completely
- different behavior from the 2D Axis' `axis.Axis.get_ticks_position` method.
+ different behavior from the 2D Axis' ``axis.Axis.get_ticks_position`` method.
- ``.backend_pgf.LatexManagerFactory``
- ``mpl_toolkits.axisartist.axislines.SimpleChainedObjects``
@@ -936,8 +936,8 @@ Axes3D
- `.axes3d.Axes3D.w_yaxis`
- `.axes3d.Axes3D.w_zaxis`
-Use `.axes3d.Axes3D.xaxis`, `.axes3d.Axes3D.yaxis` and `.axes3d.Axes3D.zaxis`
-instead.
+Use ``axes3d.Axes3D.xaxis``, ``axes3d.Axes3D.yaxis`` and
+``axes3d.Axes3D.zaxis`` instead.
Testing
~~~~~~~
@@ -945,7 +945,7 @@ Testing
- ``matplotlib.testing.decorators.switch_backend`` decorator
Test functions should use ``pytest.mark.backend``, and the mark will be
-picked up by the `matplotlib.testing.conftest.mpl_test_settings` fixture.
+picked up by the ``matplotlib.testing.conftest.mpl_test_settings`` fixture.
Quiver
~~~~~~
@@ -1069,7 +1069,7 @@ Axis
- ``Axis.iter_ticks``
-This only served as a helper to the private `.Axis._update_ticks`
+This only served as a helper to the private ``Axis._update_ticks``
Undeprecations
@@ -1123,10 +1123,10 @@ The `.Formatter` class gained a new `~.Formatter.format_ticks` method, which
takes the list of all tick locations as a single argument and returns the list
of all formatted values. It is called by the axis tick handling code and, by
default, first calls `~.Formatter.set_locs` with all locations, then repeatedly
-calls `~.Formatter.__call__` for each location.
+calls ``Formatter.__call__`` for each location.
Tick-handling code in the codebase that previously performed this sequence
-(`~.Formatter.set_locs` followed by repeated `~.Formatter.__call__`) have been
+(`~.Formatter.set_locs` followed by repeated ``Formatter.__call__``) have been
updated to use `~.Formatter.format_ticks`.
`~.Formatter.format_ticks` is intended to be overridden by `.Formatter`
diff --git a/doc/api/prev_api_changes/api_changes_3.2.0/behavior.rst b/doc/api/prev_api_changes/api_changes_3.2.0/behavior.rst
index 8e76a047e348..dc47740890be 100644
--- a/doc/api/prev_api_changes/api_changes_3.2.0/behavior.rst
+++ b/doc/api/prev_api_changes/api_changes_3.2.0/behavior.rst
@@ -46,9 +46,9 @@ highest.
Code that worked around the normalization between 0 and 1 will need to be
modified.
-`MovieWriterRegistry`
-~~~~~~~~~~~~~~~~~~~~~
-`MovieWriterRegistry` now always checks the availability of the writer classes
+``MovieWriterRegistry``
+~~~~~~~~~~~~~~~~~~~~~~~
+`.MovieWriterRegistry` now always checks the availability of the writer classes
before returning them. If one wishes, for example, to get the first available
writer, without performing the availability check on subsequent writers, it is
now possible to iterate over the registry, which will yield the names of the
@@ -88,13 +88,13 @@ enough to be accommodated by the default data limit margins.
While the new behavior is algorithmically simpler, it is conditional on
properties of the `.Collection` object:
- 1. ``offsets = None``, ``transform`` is a child of `.Axes.transData`: use the paths
+ 1. ``offsets = None``, ``transform`` is a child of ``Axes.transData``: use the paths
for the automatic limits (i.e. for `.LineCollection` in `.Axes.streamplot`).
- 2. ``offsets != None``, and ``offset_transform`` is child of `.Axes.transData`:
+ 2. ``offsets != None``, and ``offset_transform`` is child of ``Axes.transData``:
- a) ``transform`` is child of `.Axes.transData`: use the ``path + offset`` for
+ a) ``transform`` is child of ``Axes.transData``: use the ``path + offset`` for
limits (i.e., for `.Axes.bar`).
- b) ``transform`` is not a child of `.Axes.transData`: just use the offsets
+ b) ``transform`` is not a child of ``Axes.transData``: just use the offsets
for the limits (i.e. for scatter)
3. otherwise return a null `.Bbox`.
@@ -294,7 +294,7 @@ Exception changes
~~~~~~~~~~~~~~~~~
Various APIs that raised a `ValueError` for incorrectly typed inputs now raise
`TypeError` instead: `.backend_bases.GraphicsContextBase.set_clip_path`,
-`.blocking_input.BlockingInput.__call__`, `.cm.register_cmap`, `.dviread.DviFont`,
+``blocking_input.BlockingInput.__call__``, `.cm.register_cmap`, `.dviread.DviFont`,
`.rcsetup.validate_hatch`, ``.rcsetup.validate_animation_writer_path``, `.spines.Spine`,
many classes in the :mod:`matplotlib.transforms` module and :mod:`matplotlib.tri`
package, and Axes methods that take a ``norm`` parameter.
diff --git a/doc/api/prev_api_changes/api_changes_3.2.0/deprecations.rst b/doc/api/prev_api_changes/api_changes_3.2.0/deprecations.rst
index 42de9ffccd77..65b72c7e0558 100644
--- a/doc/api/prev_api_changes/api_changes_3.2.0/deprecations.rst
+++ b/doc/api/prev_api_changes/api_changes_3.2.0/deprecations.rst
@@ -118,7 +118,7 @@ The unused ``Locator.autoscale`` method is deprecated (pass the axis limits to
Animation
~~~~~~~~~
-The following methods and attributes of the `MovieWriterRegistry` class are
+The following methods and attributes of the `.MovieWriterRegistry` class are
deprecated: ``set_dirty``, ``ensure_not_dirty``, ``reset_available_writers``,
``avail``.
diff --git a/doc/api/prev_api_changes/api_changes_3.2.0/development.rst b/doc/api/prev_api_changes/api_changes_3.2.0/development.rst
index 470b594d522c..9af7fb8fb561 100644
--- a/doc/api/prev_api_changes/api_changes_3.2.0/development.rst
+++ b/doc/api/prev_api_changes/api_changes_3.2.0/development.rst
@@ -22,7 +22,7 @@ is desired.
Packaging DLLs
~~~~~~~~~~~~~~
-Previously, it was possible to package Windows DLLs into the Maptlotlib
+Previously, it was possible to package Windows DLLs into the Matplotlib
wheel (or sdist) by copying them into the source tree and setting the
``package_data.dlls`` entry in ``setup.cfg``.
diff --git a/doc/api/prev_api_changes/api_changes_3.3.0/behaviour.rst b/doc/api/prev_api_changes/api_changes_3.3.0/behaviour.rst
index 2b21794ede6b..65807a184fbc 100644
--- a/doc/api/prev_api_changes/api_changes_3.3.0/behaviour.rst
+++ b/doc/api/prev_api_changes/api_changes_3.3.0/behaviour.rst
@@ -262,7 +262,7 @@ most common operations remain available), and the list-of-one `.Polygon` is
returned as is. This makes the `repr` of the returned artist more accurate: it
is now ::
- # "bar", "barstacked"
+ # "bar", "barstacked"
[] # "step", "stepfilled"
instead of ::
diff --git a/doc/api/prev_api_changes/api_changes_3.3.0/deprecations.rst b/doc/api/prev_api_changes/api_changes_3.3.0/deprecations.rst
index 4eb73b16dd54..322f6df40d42 100644
--- a/doc/api/prev_api_changes/api_changes_3.3.0/deprecations.rst
+++ b/doc/api/prev_api_changes/api_changes_3.3.0/deprecations.rst
@@ -72,7 +72,7 @@ Revert deprecation \*min, \*max keyword arguments to ``set_x/y/zlim_3d()``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
These keyword arguments were deprecated in 3.0, alongside with the respective
parameters in ``set_xlim()`` / ``set_ylim()``. The deprecations of the 2D
-versions were already reverted in in 3.1.
+versions were already reverted in 3.1.
``cbook.local_over_kwdict``
~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -93,7 +93,7 @@ Parameters *norm* and *vmin*/*vmax* should not be used simultaneously
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Passing parameters *norm* and *vmin*/*vmax* simultaneously to functions using
colormapping such as ``scatter()`` and ``imshow()`` is deprecated.
-Inestead of ``norm=LogNorm(), vmin=min_val, vmax=max_val`` pass
+Instead of ``norm=LogNorm(), vmin=min_val, vmax=max_val`` pass
``norm=LogNorm(min_val, max_val)``. *vmin* and *vmax* should only be used
without setting *norm*.
@@ -162,7 +162,7 @@ The ``on_mappable_changed`` and ``update_bruteforce`` methods of
`~matplotlib.colorbar.Colorbar` are deprecated; both can be replaced by calls
to `~matplotlib.colorbar.Colorbar.update_normal`.
-``OldScalarFormatter``, ``IndexFormatter`` and ``DateIndexFormatter``
+``OldScalarFormatter``, ``IndexFormatter`` and ``IndexDateFormatter``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
These formatters are deprecated. Their functionality can be implemented using
e.g. `.FuncFormatter`.
@@ -238,7 +238,7 @@ The following validators, defined in `.rcsetup`, are deprecated:
``validate_axes_titlelocation``, ``validate_toolbar``,
``validate_ps_papersize``, ``validate_legend_loc``,
``validate_bool_maybe_none``, ``validate_hinting``,
-``validate_movie_writers``, ``validate_webagg_address``,
+``validate_movie_writer``, ``validate_webagg_address``,
``validate_nseq_float``, ``validate_nseq_int``.
To test whether an rcParam value would be acceptable, one can test e.g. ``rc =
RcParams(); rc[k] = v`` raises an exception.
@@ -273,13 +273,13 @@ mathtext glues
The *copy* parameter of ``mathtext.Glue`` is deprecated (the underlying glue
spec is now immutable). ``mathtext.GlueSpec`` is deprecated.
-Signatures of `.Artist.draw` and `.Axes.draw`
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-The *inframe* parameter to `.Axes.draw` is deprecated. Use
+Signatures of `.Artist.draw` and `matplotlib.axes.Axes.draw`
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+The *inframe* parameter to `matplotlib.axes.Axes.draw` is deprecated. Use
`.Axes.redraw_in_frame` instead.
-Not passing the *renderer* parameter to `.Axes.draw` is deprecated. Use
-``axes.draw_artist(axes)`` instead.
+Not passing the *renderer* parameter to `matplotlib.axes.Axes.draw` is
+deprecated. Use ``axes.draw_artist(axes)`` instead.
These changes make the signature of the ``draw`` (``artist.draw(renderer)``)
method consistent across all artists; thus, additional parameters to
@@ -328,7 +328,7 @@ are deprecated. Panning and zooming are now implemented using the
Passing None to various Axes subclass factories
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Support for passing ``None`` as base class to `.axes.subplot_class_factory`,
+Support for passing ``None`` as base class to ``axes.subplot_class_factory``,
``axes_grid1.parasite_axes.host_axes_class_factory``,
``axes_grid1.parasite_axes.host_subplot_class_factory``,
``axes_grid1.parasite_axes.parasite_axes_class_factory``, and
@@ -351,7 +351,7 @@ PGF backend cleanups
~~~~~~~~~~~~~~~~~~~~
The *dummy* parameter of `.RendererPgf` is deprecated.
-`.GraphicsContextPgf` is deprecated (use `.GraphicsContextBase` instead).
+``GraphicsContextPgf`` is deprecated (use `.GraphicsContextBase` instead).
``set_factor`` method of :mod:`mpl_toolkits.axisartist` locators
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -545,8 +545,8 @@ experimental and may change in the future.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
... is deprecated.
-`.epoch2num` and `.num2epoch` are deprecated
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+``epoch2num`` and ``num2epoch`` are deprecated
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
These are unused and can be easily reproduced by other date tools.
`.get_epoch` will return Matplotlib's epoch.
@@ -575,7 +575,7 @@ This is deprecated; pass keys as a list of strings instead.
Statusbar classes and attributes
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-The ``statusbar`` attribute of `.FigureManagerBase`, `.StatusbarBase` and all
+The ``statusbar`` attribute of `.FigureManagerBase`, ``StatusbarBase`` and all
its subclasses, and ``StatusBarWx``, are deprecated, as messages are now
displayed in the toolbar instead.
@@ -609,8 +609,8 @@ accepted.
Qt modifier keys
~~~~~~~~~~~~~~~~
The ``MODIFIER_KEYS``, ``SUPER``, ``ALT``, ``CTRL``, and ``SHIFT``
-global variables of the :mod:`matplotlib.backends.backend_qt4agg`,
-:mod:`matplotlib.backends.backend_qt4cairo`,
+global variables of the ``matplotlib.backends.backend_qt4agg``,
+``matplotlib.backends.backend_qt4cairo``,
:mod:`matplotlib.backends.backend_qt5agg` and
:mod:`matplotlib.backends.backend_qt5cairo` modules are deprecated.
diff --git a/doc/api/prev_api_changes/api_changes_3.3.0/removals.rst b/doc/api/prev_api_changes/api_changes_3.3.0/removals.rst
index 3f7c232e9800..36b63c6dcfc8 100644
--- a/doc/api/prev_api_changes/api_changes_3.3.0/removals.rst
+++ b/doc/api/prev_api_changes/api_changes_3.3.0/removals.rst
@@ -202,7 +202,7 @@ Arguments
renamed to ``manage_ticks``.
- The ``normed`` parameter of `~.Axes.hist2d` has been renamed to ``density``.
- The ``s`` parameter of `.Annotation` has been renamed to ``text``.
-- For all functions in `.bezier` that supported a ``tolerence`` parameter, this
+- For all functions in `.bezier` that supported a ``tolerance`` parameter, this
parameter has been renamed to ``tolerance``.
- ``axis("normal")`` is not supported anymore. Use the equivalent
``axis("auto")`` instead.
diff --git a/doc/api/prev_api_changes/api_changes_3.3.1.rst b/doc/api/prev_api_changes/api_changes_3.3.1.rst
index b3383a4e5fd2..3eda8a9a3a1a 100644
--- a/doc/api/prev_api_changes/api_changes_3.3.1.rst
+++ b/doc/api/prev_api_changes/api_changes_3.3.1.rst
@@ -15,7 +15,7 @@ reverts the deprecation.
Functions ``epoch2num`` and ``dates.julian2num`` use ``date.epoch`` rcParam
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Now `~.dates.epoch2num` and (undocumented) ``julian2num`` return floating point
+Now ``epoch2num`` and (undocumented) ``julian2num`` return floating point
days since `~.dates.get_epoch` as set by :rc:`date.epoch`, instead of
floating point days since the old epoch of "0000-12-31T00:00:00". If
needed, you can translate from the new to old values as
diff --git a/doc/api/prev_api_changes/api_changes_3.4.0/deprecations.rst b/doc/api/prev_api_changes/api_changes_3.4.0/deprecations.rst
index 3de8959bb3ef..9e09f3febe64 100644
--- a/doc/api/prev_api_changes/api_changes_3.4.0/deprecations.rst
+++ b/doc/api/prev_api_changes/api_changes_3.4.0/deprecations.rst
@@ -38,8 +38,8 @@ Subplot-related attributes and methods
Some ``SubplotBase`` methods and attributes have been deprecated and/or moved
to `.SubplotSpec`:
-- ``get_geometry`` (use `.SubplotBase.get_subplotspec` instead),
-- ``change_geometry`` (use `.SubplotBase.set_subplotspec` instead),
+- ``get_geometry`` (use ``SubplotBase.get_subplotspec`` instead),
+- ``change_geometry`` (use ``SubplotBase.set_subplotspec`` instead),
- ``is_first_row``, ``is_last_row``, ``is_first_col``, ``is_last_col`` (use the
corresponding methods on the `.SubplotSpec` instance instead),
- ``update_params`` (now a no-op),
diff --git a/doc/api/prev_api_changes/api_changes_3.4.0/development.rst b/doc/api/prev_api_changes/api_changes_3.4.0/development.rst
index ab5e118de9e8..982046c3869e 100644
--- a/doc/api/prev_api_changes/api_changes_3.4.0/development.rst
+++ b/doc/api/prev_api_changes/api_changes_3.4.0/development.rst
@@ -4,7 +4,7 @@ Development changes
Increase to minimum supported versions of Python and dependencies
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-For Maptlotlib 3.4, the :ref:`minimum supported versions ` are
+For Matplotlib 3.4, the :ref:`minimum supported versions ` are
being bumped:
+------------+-----------------+---------------+
diff --git a/doc/api/prev_api_changes/api_changes_3.5.0.rst b/doc/api/prev_api_changes/api_changes_3.5.0.rst
new file mode 100644
index 000000000000..890484bcd19a
--- /dev/null
+++ b/doc/api/prev_api_changes/api_changes_3.5.0.rst
@@ -0,0 +1,14 @@
+API Changes for 3.5.0
+=====================
+
+.. contents::
+ :local:
+ :depth: 1
+
+.. include:: /api/prev_api_changes/api_changes_3.5.0/behaviour.rst
+
+.. include:: /api/prev_api_changes/api_changes_3.5.0/deprecations.rst
+
+.. include:: /api/prev_api_changes/api_changes_3.5.0/removals.rst
+
+.. include:: /api/prev_api_changes/api_changes_3.5.0/development.rst
diff --git a/doc/api/prev_api_changes/api_changes_3.5.0/behaviour.rst b/doc/api/prev_api_changes/api_changes_3.5.0/behaviour.rst
new file mode 100644
index 000000000000..69e38270ca76
--- /dev/null
+++ b/doc/api/prev_api_changes/api_changes_3.5.0/behaviour.rst
@@ -0,0 +1,247 @@
+Behaviour changes
+-----------------
+
+First argument to ``subplot_mosaic`` renamed
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Both `.FigureBase.subplot_mosaic`, and `.pyplot.subplot_mosaic` have had the
+first positional argument renamed from *layout* to *mosaic*. As we have
+consolidated the *constrained_layout* and *tight_layout* keyword arguments in
+the Figure creation functions of `.pyplot` into a single *layout* keyword
+argument, the original ``subplot_mosaic`` argument name would collide.
+
+As this API is provisional, we are changing this argument name with no
+deprecation period.
+
+.. _Behavioural API Changes 3.5 - Axes children combined:
+
+``Axes`` children are no longer separated by type
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Formerly, `.axes.Axes` children were separated by `.Artist` type, into sublists
+such as ``Axes.lines``. For methods that produced multiple elements (such as
+`.Axes.errorbar`), though individual parts would have similar *zorder*, this
+separation might cause them to be drawn at different times, causing
+inconsistent results when overlapping other Artists.
+
+Now, the children are no longer separated by type, and the sublist properties
+are generated dynamically when accessed. Consequently, Artists will now always
+appear in the correct sublist; e.g., if `.axes.Axes.add_line` is called on a
+`.Patch`, it will appear in the ``Axes.patches`` sublist, *not* ``Axes.lines``.
+The ``Axes.add_*`` methods will now warn if passed an unexpected type.
+
+Modification of the following sublists is still accepted, but deprecated:
+
+* ``Axes.artists``
+* ``Axes.collections``
+* ``Axes.images``
+* ``Axes.lines``
+* ``Axes.patches``
+* ``Axes.tables``
+* ``Axes.texts``
+
+To remove an Artist, use its `.Artist.remove` method. To add an Artist, use the
+corresponding ``Axes.add_*`` method.
+
+``MatplotlibDeprecationWarning`` now subclasses ``DeprecationWarning``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Historically, it has not been possible to filter
+`~matplotlib.MatplotlibDeprecationWarning`\s by checking for
+`DeprecationWarning`, since we subclass `UserWarning` directly.
+
+The decision to not subclass `DeprecationWarning` has to do with a decision
+from core Python in the 2.x days to not show `DeprecationWarning`\s to users.
+However, there is now a more sophisticated filter in place (see
+https://www.python.org/dev/peps/pep-0565/).
+
+Users will now see `~matplotlib.MatplotlibDeprecationWarning` only during
+interactive sessions, and these can be silenced by the standard mechanism:
+
+.. code:: python
+
+ warnings.filterwarnings("ignore", category=DeprecationWarning)
+
+Library authors must now enable `DeprecationWarning`\s explicitly in order for
+(non-interactive) CI/CD pipelines to report back these warnings, as is standard
+for the rest of the Python ecosystem:
+
+.. code:: python
+
+ warnings.filterwarnings("always", DeprecationWarning)
+
+``Artist.set`` applies artist properties in the order in which they are given
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The change only affects the interaction between the *color*, *edgecolor*,
+*facecolor*, and (for `.Collection`\s) *alpha* properties: the *color* property
+now needs to be passed first in order not to override the other properties.
+This is consistent with e.g. `.Artist.update`, which did not reorder the
+properties passed to it.
+
+``pcolor(mesh)`` shading defaults to auto
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The *shading* keyword argument for `.Axes.pcolormesh` and `.Axes.pcolor`
+default has been changed to 'auto'.
+
+Passing ``Z(M, N)``, ``x(N)``, ``y(M)`` to ``pcolormesh`` with
+``shading='flat'`` will now raise a `TypeError`. Use ``shading='auto'`` or
+``shading='nearest'`` for ``x`` and ``y`` to be treated as cell centers, or
+drop the last column and row of ``Z`` to get the old behaviour with
+``shading='flat'``.
+
+Colorbars now have pan and zoom functionality
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Interactive plots with colorbars can now be zoomed and panned on the colorbar
+axis. This adjusts the *vmin* and *vmax* of the `.ScalarMappable` associated
+with the colorbar. This is currently only enabled for continuous norms. Norms
+used with ``contourf`` and categoricals, such as `.BoundaryNorm` and `.NoNorm`,
+have the interactive capability disabled by default. `cb.ax.set_navigate()
+<.Axes.set_navigate>` can be used to set whether a colorbar axes is interactive
+or not.
+
+Colorbar lines no longer clipped
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+If a colorbar has lines added to it (e.g. for contour lines), these will no
+longer be clipped. This is an improvement for lines on the edge of the
+colorbar, but could lead to lines off the colorbar if the limits of the
+colorbar are changed.
+
+``Figure.suppressComposite`` now also controls compositing of Axes images
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The output of ``NonUniformImage`` and ``PcolorImage`` has changed
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Pixel-level differences may be observed in images generated using
+`.NonUniformImage` or `.PcolorImage`, typically for pixels exactly at the
+boundary between two data cells (no user-facing axes method currently generates
+`.NonUniformImage`\s, and only `.pcolorfast` can generate `.PcolorImage`\s).
+These artists are also now slower, normally by ~1.5x but sometimes more (in
+particular for ``NonUniformImage(interpolation="bilinear")``. This slowdown
+arises from fixing occasional floating point inaccuracies.
+
+Change of the (default) legend handler for ``Line2D`` instances
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The default legend handler for Line2D instances (`.HandlerLine2D`) now
+consistently exposes all the attributes and methods related to the line marker
+(:ghissue:`11358`). This makes it easy to change the marker features after
+instantiating a legend.
+
+.. code::
+
+ import matplotlib.pyplot as plt
+
+ fig, ax = plt.subplots()
+
+ ax.plot([1, 3, 2], marker="s", label="Line", color="pink", mec="red", ms=8)
+ leg = ax.legend()
+
+ leg.legendHandles[0].set_color("lightgray")
+ leg.legendHandles[0].set_mec("black") # marker edge color
+
+The former legend handler for Line2D objects has been renamed
+`.HandlerLine2DCompound`. To revert to the previous behaviour, one can use
+
+.. code::
+
+ import matplotlib.legend as mlegend
+ from matplotlib.legend_handler import HandlerLine2DCompound
+ from matplotlib.lines import Line2D
+
+ mlegend.Legend.update_default_handler_map({Line2D: HandlerLine2DCompound()})
+
+Setting ``Line2D`` marker edge/face color to *None* use rcParams
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+``Line2D.set_markeredgecolor(None)`` and ``Line2D.set_markerfacecolor(None)``
+now set the line property using the corresponding rcParam
+(:rc:`lines.markeredgecolor` and :rc:`lines.markerfacecolor`). This is
+consistent with other `.Line2D` property setters.
+
+Default theta tick locations for wedge polar plots have changed
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+For polar plots that don't cover a full circle, the default theta tick
+locations are now at multiples of 10°, 15°, 30°, 45°, 90°, rather than using
+values that mostly make sense for linear plots (20°, 25°, etc.).
+
+``axvspan`` now plots full wedges in polar plots
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+... rather than triangles.
+
+Convenience converter from ``Scale`` to ``Normalize`` now public
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Downstream libraries can take advantage of `.colors.make_norm_from_scale` to
+create a `~.colors.Normalize` subclass directly from an existing scale.
+Usually norms have a scale, and the advantage of having a `~.scale.ScaleBase`
+attached to a norm is to provide a scale, and associated tick locators and
+formatters, for the colorbar.
+
+``ContourSet`` always use ``PathCollection``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+In order to correct rendering issues with closed loops, the `.ContourSet` now
+creates a `.PathCollection` instead of a `.LineCollection` for line contours.
+This type matches the artist used for filled contours.
+
+This affects `.ContourSet` itself and its subclasses, `.QuadContourSet`
+(returned by `.Axes.contour`), and `.TriContourSet` (returned by
+`.Axes.tricontour`).
+
+``hatch.SmallFilledCircles`` inherits from ``hatch.Circles``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The `.hatch.SmallFilledCircles` class now inherits from `.hatch.Circles` rather
+than from `.hatch.SmallCircles`.
+
+hexbin with a log norm
+~~~~~~~~~~~~~~~~~~~~~~
+
+`~.axes.Axes.hexbin` no longer (incorrectly) adds 1 to every bin value if a log
+norm is being used.
+
+Setting invalid ``rcParams["date.converter"]`` now raises ValueError
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Previously, invalid values passed to :rc:`date.converter` would be ignored with
+a `UserWarning`, but now raise `ValueError`.
+
+``Text`` and ``TextBox`` added *parse_math* option
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+`.Text` and `.TextBox` objects now allow a *parse_math* keyword-only argument
+which controls whether math should be parsed from the displayed string. If
+*True*, the string will be parsed as a math text object. If *False*, the string
+will be considered a literal and no parsing will occur.
+
+For `.Text`, this argument defaults to *True*. For `.TextBox` this argument
+defaults to *False*.
+
+``Type1Font`` objects now decrypt the encrypted part
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Type 1 fonts have a large part of their code encrypted as an obsolete
+copy-protection measure. This part is now available decrypted as the
+``decrypted`` attribute of ``matplotlib.type1font.Type1Font``. This decrypted
+data is not yet parsed, but this is a prerequisite for implementing subsetting.
+
+3D contourf polygons placed between levels
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The polygons used in a 3D `~.Axes3D.contourf` plot are now
+placed halfway between the contour levels, as each polygon represents the
+location of values that lie between two levels.
+
+``AxesDivider`` now defaults to rcParams-specified pads
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+`.AxesDivider.append_axes`, ``AxesDivider.new_horizontal``, and
+``AxesDivider.new_vertical`` now default to paddings specified by
+:rc:`figure.subplot.wspace` and :rc:`figure.subplot.hspace` rather than zero.
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
new file mode 100644
index 000000000000..7bb9009fbe77
--- /dev/null
+++ b/doc/api/prev_api_changes/api_changes_3.5.0/deprecations.rst
@@ -0,0 +1,379 @@
+Deprecations
+------------
+
+Discouraged: ``Figure`` parameters *tight_layout* and *constrained_layout*
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The ``Figure`` parameters *tight_layout* and *constrained_layout* are
+triggering competing layout mechanisms and thus should not be used together.
+
+To make the API clearer, we've merged them under the new parameter *layout*
+with values 'constrained' (equal to ``constrained_layout=True``), 'tight'
+(equal to ``tight_layout=True``). If given, *layout* takes precedence.
+
+The use of *tight_layout* and *constrained_layout* is discouraged in favor of
+*layout*. However, these parameters will stay available for backward
+compatibility.
+
+Modification of ``Axes`` children sublists
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+See :ref:`Behavioural API Changes 3.5 - Axes children combined` for more
+information; modification of the following sublists is deprecated:
+
+* ``Axes.artists``
+* ``Axes.collections``
+* ``Axes.images``
+* ``Axes.lines``
+* ``Axes.patches``
+* ``Axes.tables``
+* ``Axes.texts``
+
+To remove an Artist, use its `.Artist.remove` method. To add an Artist, use the
+corresponding ``Axes.add_*`` method.
+
+Passing incorrect types to ``Axes.add_*`` methods
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The following ``Axes.add_*`` methods will now warn if passed an unexpected
+type. See their documentation for the types they expect.
+
+- `.Axes.add_collection`
+- `.Axes.add_image`
+- `.Axes.add_line`
+- `.Axes.add_patch`
+- `.Axes.add_table`
+
+Discouraged: ``plot_date``
+~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The use of `~.Axes.plot_date` is discouraged. This method exists for historic
+reasons and may be deprecated in the future.
+
+- ``datetime``-like data should directly be plotted using `~.Axes.plot`.
+- If you need to plot plain numeric data as :ref:`date-format` or
+ need to set a timezone, call ``ax.xaxis.axis_date`` / ``ax.yaxis.axis_date``
+ before `~.Axes.plot`. See `.Axis.axis_date`.
+
+``epoch2num`` and ``num2epoch`` are deprecated
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+These methods convert from unix timestamps to matplotlib floats, but are not
+used internally to matplotlib, and should not be needed by end users. To
+convert a unix timestamp to datetime, simply use
+`datetime.datetime.utcfromtimestamp`, or to use NumPy `~numpy.datetime64`
+``dt = np.datetime64(e*1e6, 'us')``.
+
+Auto-removal of grids by `~.Axes.pcolor` and `~.Axes.pcolormesh`
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+`~.Axes.pcolor` and `~.Axes.pcolormesh` currently remove any visible axes major
+grid. This behavior is deprecated; please explicitly call ``ax.grid(False)`` to
+remove the grid.
+
+The first parameter of ``Axes.grid`` and ``Axis.grid`` has been renamed to *visible*
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The parameter was previously named *b*. This deprecation only matters if that
+parameter was passed using a keyword argument, e.g. ``grid(b=False)``.
+
+Unification and cleanup of Selector widget API
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The API for Selector widgets has been unified to use:
+
+- *props* for the properties of the Artist representing the selection.
+- *handle_props* for the Artists representing handles for modifying the
+ selection.
+- *grab_range* for the maximal tolerance to grab a handle with the mouse.
+
+Additionally, several internal parameters and attribute have been deprecated
+with the intention of keeping them private.
+
+RectangleSelector and EllipseSelector
+.....................................
+
+The *drawtype* keyword argument to `~matplotlib.widgets.RectangleSelector` is
+deprecated. In the future the only behaviour will be the default behaviour of
+``drawtype='box'``.
+
+Support for ``drawtype=line`` will be removed altogether as it is not clear
+which points are within and outside a selector that is just a line. As a
+result, the *lineprops* keyword argument to
+`~matplotlib.widgets.RectangleSelector` is also deprecated.
+
+To retain the behaviour of ``drawtype='none'``, use ``rectprops={'visible':
+False}`` to make the drawn `~matplotlib.patches.Rectangle` invisible.
+
+Cleaned up attributes and arguments are:
+
+- The ``active_handle`` attribute has been privatized and deprecated.
+- The ``drawtype`` attribute has been privatized and deprecated.
+- The ``eventpress`` attribute has been privatized and deprecated.
+- The ``eventrelease`` attribute has been privatized and deprecated.
+- The ``interactive`` attribute has been privatized and deprecated.
+- The *marker_props* argument is deprecated, use *handle_props* instead.
+- The *maxdist* argument is deprecated, use *grab_range* instead.
+- The *rectprops* argument is deprecated, use *props* instead.
+- The ``rectprops`` attribute has been privatized and deprecated.
+- The ``state`` attribute has been privatized and deprecated.
+- The ``to_draw`` attribute has been privatized and deprecated.
+
+PolygonSelector
+...............
+
+- The *line* attribute is deprecated. If you want to change the selector artist
+ properties, use the ``set_props`` or ``set_handle_props`` methods.
+- The *lineprops* argument is deprecated, use *props* instead.
+- The *markerprops* argument is deprecated, use *handle_props* instead.
+- The *maxdist* argument and attribute is deprecated, use *grab_range* instead.
+- The *vertex_select_radius* argument and attribute is deprecated, use
+ *grab_range* instead.
+
+SpanSelector
+............
+
+- The ``active_handle`` attribute has been privatized and deprecated.
+- The ``eventpress`` attribute has been privatized and deprecated.
+- The ``eventrelease`` attribute has been privatized and deprecated.
+- The *maxdist* argument and attribute is deprecated, use *grab_range* instead.
+- The ``pressv`` attribute has been privatized and deprecated.
+- The ``prev`` attribute has been privatized and deprecated.
+- The ``rect`` attribute has been privatized and deprecated.
+- The *rectprops* argument is deprecated, use *props* instead.
+- The ``rectprops`` attribute has been privatized and deprecated.
+- The *span_stays* argument is deprecated, use the *interactive* argument
+ instead.
+- The ``span_stays`` attribute has been privatized and deprecated.
+- The ``state`` attribute has been privatized and deprecated.
+
+LassoSelector
+.............
+
+- The *lineprops* argument is deprecated, use *props* instead.
+- The ``onpress`` and ``onrelease`` methods are deprecated. They are straight
+ aliases for ``press`` and ``release``.
+
+``ConversionInterface.convert`` no longer needs to accept unitless values
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Previously, custom subclasses of `.units.ConversionInterface` needed to
+implement a ``convert`` method that not only accepted instances of the unit,
+but also unitless values (which are passed through as is). This is no longer
+the case (``convert`` is never called with a unitless value), and such support
+in `.StrCategoryConverter` is deprecated. Likewise, the
+``.ConversionInterface.is_numlike`` helper is deprecated.
+
+Consider calling `.Axis.convert_units` instead, which still supports unitless
+values.
+
+Locator and Formatter wrapper methods
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The ``set_view_interval``, ``set_data_interval`` and ``set_bounds`` methods of
+`.Locator`\s and `.Formatter`\s (and their common base class, TickHelper) are
+deprecated. Directly manipulate the view and data intervals on the underlying
+axis instead.
+
+Unused positional parameters to ``print_`` methods
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+None of the ``print_`` methods implemented by canvas subclasses used
+positional arguments other that the first (the output filename or file-like),
+so these extra parameters are deprecated.
+
+``QuadMesh`` signature
+~~~~~~~~~~~~~~~~~~~~~~
+
+The `.QuadMesh` signature ::
+
+ def __init__(meshWidth, meshHeight, coordinates,
+ antialiased=True, shading='flat', **kwargs)
+
+is deprecated and replaced by the new signature ::
+
+ def __init__(coordinates, *, antialiased=True, shading='flat', **kwargs)
+
+In particular:
+
+- The *coordinates* argument must now be a (M, N, 2) array-like. Previously,
+ the grid shape was separately specified as (*meshHeight* + 1, *meshWidth* +
+ 1) and *coordinates* could be an array-like of any shape with M * N * 2
+ elements.
+- All parameters except *coordinates* are keyword-only now.
+
+rcParams will no longer cast inputs to str
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+After a deprecation period, rcParams that expect a (non-pathlike) str will no
+longer cast non-str inputs using `str`. This will avoid confusing errors in
+subsequent code if e.g. a list input gets implicitly cast to a str.
+
+Case-insensitive scales
+~~~~~~~~~~~~~~~~~~~~~~~
+
+Previously, scales could be set case-insensitively (e.g.,
+``set_xscale("LoG")``). This is deprecated; all builtin scales use lowercase
+names.
+
+Interactive cursor details
+~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Setting a mouse cursor on a window has been moved from the toolbar to the
+canvas. Consequently, several implementation details on toolbars and within
+backends have been deprecated.
+
+``NavigationToolbar2.set_cursor`` and ``backend_tools.SetCursorBase.set_cursor``
+................................................................................
+
+Instead, use the `.FigureCanvasBase.set_cursor` method on the canvas (available
+as the ``canvas`` attribute on the toolbar or the Figure.)
+
+``backend_tools.SetCursorBase`` and subclasses
+..............................................
+
+``backend_tools.SetCursorBase`` was subclassed to provide backend-specific
+implementations of ``set_cursor``. As that is now deprecated, the subclassing
+is no longer necessary. Consequently, the following subclasses are also
+deprecated:
+
+- ``matplotlib.backends.backend_gtk3.SetCursorGTK3``
+- ``matplotlib.backends.backend_qt5.SetCursorQt``
+- ``matplotlib.backends._backend_tk.SetCursorTk``
+- ``matplotlib.backends.backend_wx.SetCursorWx``
+
+Instead, use the `.backend_tools.ToolSetCursor` class.
+
+``cursord`` in GTK, Qt, and wx backends
+.......................................
+
+The ``backend_gtk3.cursord``, ``backend_qt.cursord``, and
+``backend_wx.cursord`` dictionaries are deprecated. This makes the GTK module
+importable on headless environments.
+
+Miscellaneous deprecations
+~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+- ``is_url`` and ``URL_REGEX`` are deprecated. (They were previously defined in
+ the toplevel :mod:`matplotlib` module.)
+- The ``ArrowStyle.beginarrow`` and ``ArrowStyle.endarrow`` attributes are
+ deprecated; use the ``arrow`` attribute to define the desired heads and tails
+ of the arrow.
+- ``backend_pgf.LatexManager.str_cache`` is deprecated.
+- ``backends.qt_compat.ETS`` and ``backends.qt_compat.QT_RC_MAJOR_VERSION`` are
+ deprecated, with no replacement.
+- The ``blocking_input`` module has been deprecated. Instead, use
+ ``canvas.start_event_loop()`` and ``canvas.stop_event_loop()`` while
+ connecting event callbacks as needed.
+- ``cbook.report_memory`` is deprecated; use ``psutil.virtual_memory`` instead.
+- ``cm.LUTSIZE`` is deprecated. Use :rc:`image.lut` instead. This value only
+ affects colormap quantization levels for default colormaps generated at
+ module import time.
+- ``Collection.__init__`` previously ignored *transOffset* without *offsets* also
+ being specified. In the future, *transOffset* will begin having an effect
+ regardless of *offsets*. In the meantime, if you wish to set *transOffset*,
+ call `.Collection.set_offset_transform` explicitly.
+- ``Colorbar.patch`` is deprecated; this attribute is not correctly updated
+ anymore.
+- ``ContourLabeler.get_label_width`` is deprecated.
+- ``dviread.PsfontsMap`` now raises LookupError instead of KeyError for missing
+ fonts.
+- ``Dvi.baseline`` is deprecated (with no replacement).
+- 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
+ display coordinates can still be obtained, as for other patches, using
+ ``patch.get_transform().transform_path(patch.get_path())``.
+- The ``font_manager.win32InstalledFonts`` and
+ ``font_manager.get_fontconfig_fonts`` helper functions have been deprecated.
+- All parameters of ``imshow`` starting from *aspect* will become keyword-only.
+- ``QuadMesh.convert_mesh_to_paths`` and ``QuadMesh.convert_mesh_to_triangles``
+ are deprecated. ``QuadMesh.get_paths()`` can be used as an alternative for
+ the former; there is no replacement for the latter.
+- ``ScalarMappable.callbacksSM`` is deprecated. Use
+ ``ScalarMappable.callbacks`` instead.
+- ``streamplot.get_integrator`` is deprecated.
+- ``style.core.STYLE_FILE_PATTERN``, ``style.core.load_base_library``, and
+ ``style.core.iter_user_libraries`` are deprecated.
+- ``SubplotParams.validate`` is deprecated. Use `.SubplotParams.update` to
+ change `.SubplotParams` while always keeping it in a valid state.
+- The ``grey_arrayd``, ``font_family``, ``font_families``, and ``font_info``
+ attributes of `.TexManager` are deprecated.
+- ``Text.get_prop_tup`` is deprecated with no replacements (because the `.Text`
+ class cannot know whether a backend needs to update cache e.g. when the
+ text's color changes).
+- ``Tick.apply_tickdir`` didn't actually update the tick markers on the
+ existing Line2D objects used to draw the ticks and is deprecated; use
+ `.Axis.set_tick_params` instead.
+- ``tight_layout.auto_adjust_subplotpars`` is deprecated.
+
+- The ``grid_info`` attribute of ``axisartist`` classes has been deprecated.
+- ``axisartist.clip_path`` is deprecated with no replacement.
+- ``axes_grid1.axes_grid.CbarAxes`` and ``axes_grid1.axisartist.CbarAxes`` are
+ deprecated (they are now dynamically generated based on the owning axes
+ class).
+- The ``axes_grid1.Divider.get_vsize_hsize`` and
+ ``axes_grid1.Grid.get_vsize_hsize`` methods are deprecated. Copy their
+ implementations if needed.
+- ``AxesDivider.append_axes(..., add_to_figure=False)`` is deprecated. Use
+ ``ax.remove()`` to remove the Axes from the figure if needed.
+- ``FixedAxisArtistHelper.change_tick_coord`` is deprecated with no
+ replacement.
+- ``floating_axes.GridHelperCurveLinear.get_boundary`` is deprecated, with no
+ replacement.
+- ``ParasiteAxesBase.get_images_artists`` has been deprecated.
+
+- The "units finalize" signal (previously emitted by Axis instances) is
+ deprecated. Connect to "units" instead.
+- Passing formatting parameters positionally to ``stem()`` is deprecated
+
+``plot_directive`` deprecations
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The ``:encoding:`` option to ``.. plot`` directive has had no effect since
+Matplotlib 1.3.1, and is now deprecated.
+
+The following helpers in `matplotlib.sphinxext.plot_directive` are deprecated:
+
+- ``unescape_doctest`` (use `doctest.script_from_examples` instead),
+- ``split_code_at_show``,
+- ``run_code``.
+
+Testing support
+~~~~~~~~~~~~~~~
+
+``matplotlib.test()`` is deprecated
+...................................
+
+Run tests using ``pytest`` from the commandline instead. The variable
+``matplotlib.default_test_modules`` is only used for ``matplotlib.test()`` and
+is thus deprecated as well.
+
+To test an installed copy, be sure to specify both ``matplotlib`` and
+``mpl_toolkits`` with ``--pyargs``::
+
+ python -m pytest --pyargs matplotlib.tests mpl_toolkits.tests
+
+See :ref:`testing` for more details.
+
+Unused pytest fixtures and markers
+..................................
+
+The fixture ``matplotlib.testing.conftest.mpl_image_comparison_parameters`` is
+not used internally by Matplotlib. If you use this please copy it into your
+code base.
+
+The ``@pytest.mark.style`` marker is deprecated; use ``@mpl.style.context``,
+which has the same effect.
+
+Support for ``nx1 = None`` or ``ny1 = None`` in ``AxesLocator`` and ``Divider.locate``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+In `.axes_grid1.axes_divider`, various internal APIs will stop supporting
+passing ``nx1 = None`` or ``ny1 = None`` to mean ``nx + 1`` or ``ny + 1``, in
+preparation for a possible future API which allows indexing and slicing of
+dividers (possibly ``divider[a:b] == divider.new_locator(a, b)``, but also
+``divider[a:] == divider.new_locator(a, )``). The user-facing
+`.Divider.new_locator` API is unaffected -- it correctly normalizes ``nx1 =
+None`` and ``ny1 = None`` as needed.
diff --git a/doc/api/prev_api_changes/api_changes_3.5.0/development.rst b/doc/api/prev_api_changes/api_changes_3.5.0/development.rst
new file mode 100644
index 000000000000..2db21237a699
--- /dev/null
+++ b/doc/api/prev_api_changes/api_changes_3.5.0/development.rst
@@ -0,0 +1,82 @@
+Development changes
+-------------------
+
+Increase to minimum supported versions of dependencies
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+For Matplotlib 3.5, the :ref:`minimum supported versions ` and
+some :ref:`optional dependencies ` are being bumped:
+
++---------------+---------------+---------------+
+| Dependency | min in mpl3.4 | min in mpl3.5 |
++===============+===============+===============+
+| NumPy | 1.16 | 1.17 |
++---------------+---------------+---------------+
+| Tk (optional) | 8.3 | 8.4 |
++---------------+---------------+---------------+
+
+This is consistent with our :ref:`min_deps_policy` and `NEP29
+`__
+
+New wheel architectures
+~~~~~~~~~~~~~~~~~~~~~~~
+
+Wheels have been added for:
+
+- Python 3.10
+- PyPy 3.7
+- macOS on Apple Silicon (both arm64 and universal2)
+
+New build dependencies
+~~~~~~~~~~~~~~~~~~~~~~
+
+Versioning has been switched from bundled versioneer to `setuptools-scm
+`__ using the
+``release-branch-semver`` version scheme. The latter is well-maintained, but
+may require slight modification to packaging scripts.
+
+The `setuptools-scm-git-archive
+`__ plugin is also used
+for consistent version export.
+
+Data directory is no longer optional
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Historically, the ``mpl-data`` directory has been optional (example files were
+unnecessary, and fonts could be deleted if a suitable dependency on a system
+font were provided). Though example files are still optional, they have been
+substantially pared down, and we now consider the directory to be required.
+
+Specifically, the ``matplotlibrc`` file found there is used for runtime
+verifications and must exist. Packagers may still symlink fonts to system
+versions if needed.
+
+New runtime dependencies
+~~~~~~~~~~~~~~~~~~~~~~~~
+
+fontTools for type 42 subsetting
+................................
+
+A new dependency `fontTools `_ is integrated
+into Matplotlib 3.5. It is designed to be used with PS/EPS and PDF documents;
+and handles Type 42 font subsetting.
+
+Underscore support in LaTeX
+...........................
+
+The `underscore `_ package is now a
+requirement to improve support for underscores in LaTeX.
+
+This is consistent with our :ref:`min_deps_policy`.
+
+Matplotlib-specific build options moved from ``setup.cfg`` to ``mplsetup.cfg``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+In order to avoid conflicting with the use of :file:`setup.cfg` by
+``setuptools``, the Matplotlib-specific build options have moved from
+``setup.cfg`` to ``mplsetup.cfg``. The :file:`setup.cfg.template` has been
+correspondingly been renamed to :file:`mplsetup.cfg.template`.
+
+Note that the path to this configuration file can still be set via the
+:envvar:`MPLSETUPCFG` environment variable, which allows one to keep using the
+same file before and after this change.
diff --git a/doc/api/prev_api_changes/api_changes_3.5.0/removals.rst b/doc/api/prev_api_changes/api_changes_3.5.0/removals.rst
new file mode 100644
index 000000000000..45b574e04cf5
--- /dev/null
+++ b/doc/api/prev_api_changes/api_changes_3.5.0/removals.rst
@@ -0,0 +1,365 @@
+Removals
+--------
+
+The following deprecated APIs have been removed:
+
+Removed behaviour
+~~~~~~~~~~~~~~~~~
+
+Stricter validation of function parameters
+..........................................
+
+- Calling `.Figure.add_axes` with no arguments will raise an error. Adding a
+ free-floating axes needs a position rectangle. If you want a figure-filling
+ single axes, use `.Figure.add_subplot` instead.
+- `.Figure.add_subplot` validates its inputs; in particular, for
+ ``add_subplot(rows, cols, index)``, all parameters must be integral.
+ Previously strings and floats were accepted and converted to int.
+- Passing *None* as the *which* argument to ``autofmt_xdate`` is no longer
+ supported; use its more explicit synonym, ``which="major"``, instead.
+- Setting the *orientation* of an ``eventplot()`` or `.EventCollection` to
+ "none" or *None* is no longer supported; set it to "horizontal" instead.
+ Moreover, the two orientations ("horizontal" and "vertical") are now
+ case-sensitive.
+- Passing parameters *norm* and *vmin*/*vmax* simultaneously to functions using
+ colormapping such as ``scatter()`` and ``imshow()`` is no longer supported.
+ Instead of ``norm=LogNorm(), vmin=min_val, vmax=max_val`` pass
+ ``norm=LogNorm(min_val, max_val)``. *vmin* and *vmax* should only be used
+ without setting *norm*.
+- Passing *None* as either the *radius* or *startangle* arguments of an
+ `.Axes.pie` is no longer accepted; use the explicit defaults of 1 and 0,
+ respectively, instead.
+- Passing *None* as the *normalize* argument of `.Axes.pie` (the former
+ default) is no longer accepted, and the pie will always be normalized by
+ default. If you wish to plot an incomplete pie, explicitly pass
+ ``normalize=False``.
+- Support for passing *None* to ``subplot_class_factory`` has been removed.
+ Explicitly pass in the base `~matplotlib.axes.Axes` class instead.
+- Passing multiple keys as a single comma-separated string or multiple
+ arguments to `.ToolManager.update_keymap` is no longer supported; pass keys
+ as a list of strings instead.
+- Passing the dash offset as *None* is no longer accepted, as this was never
+ universally implemented, e.g. for vector output. Set the offset to 0 instead.
+- Setting a custom method overriding `.Artist.contains` using
+ ``Artist.set_contains`` has been removed, as has ``Artist.get_contains``.
+ There is no replacement, but you may still customize pick events using
+ `.Artist.set_picker`.
+- `~.Axes.semilogx`, `~.Axes.semilogy`, `~.Axes.loglog`, `.LogScale`, and
+ `.SymmetricalLogScale` used to take keyword arguments that depends on the
+ axis orientation ("basex" vs "basey", "subsx" vs "subsy", "nonposx" vs
+ "nonposy"); these parameter names have been removed in favor of "base",
+ "subs", "nonpositive". This removal also affects e.g. ``ax.set_yscale("log",
+ basey=...)`` which must now be spelled ``ax.set_yscale("log", base=...)``.
+
+ The change from "nonpos" to "nonpositive" also affects
+ `~.scale.LogTransform`, `~.scale.InvertedLogTransform`,
+ `~.scale.SymmetricalLogTransform`, etc.
+
+ To use *different* bases for the x-axis and y-axis of a `~.Axes.loglog` plot,
+ use e.g. ``ax.set_xscale("log", base=10); ax.set_yscale("log", base=2)``.
+- Passing *None*, or no argument, to ``parasite_axes_class_factory``,
+ ``parasite_axes_auxtrans_class_factory``, ``host_axes_class_factory`` is no
+ longer accepted; pass an explicit base class instead.
+
+Case-sensitivity is now enforced more
+......................................
+
+- Upper or mixed-case property names are no longer normalized to lowercase in
+ `.Artist.set` and `.Artist.update`. This allows one to pass names such as
+ *patchA* or *UVC*.
+- Case-insensitive capstyles and joinstyles are no longer lower-cased; please
+ pass capstyles ("miter", "round", "bevel") and joinstyles ("butt", "round",
+ "projecting") as lowercase.
+- Saving metadata in PDF with the PGF backend no longer changes keys to
+ lowercase. Only the canonically cased keys listed in the PDF specification
+ (and the `~.backend_pgf.PdfPages` documentation) are accepted.
+
+No implicit initialization of ``Tick`` attributes
+.................................................
+
+The `.Tick` constructor no longer initializes the attributes ``tick1line``,
+``tick2line``, ``gridline``, ``label1``, and ``label2`` via ``_get_tick1line``,
+``_get_tick2line``, ``_get_gridline``, ``_get_text1``, and ``_get_text2``.
+Please directly set the attribute in the subclass' ``__init__`` instead.
+
+``NavigationToolbar2`` subclass changes
+.......................................
+
+Overriding the ``_init_toolbar`` method of `.NavigationToolbar2` to initialize
+third-party toolbars is no longer supported. Instead, the toolbar should be
+initialized in the ``__init__`` method of the subclass (which should call the
+base-class' ``__init__`` as appropriate).
+
+The ``press`` and ``release`` methods of `.NavigationToolbar2` were called when
+pressing or releasing a mouse button, but *only* when an interactive pan or
+zoom was occurring (contrary to what the docs stated). They are no longer
+called; if you write a backend which needs to customize such events, please
+directly override ``press_pan``/``press_zoom``/``release_pan``/``release_zoom``
+instead.
+
+Removal of old file mode flag
+.............................
+
+Flags containing "U" passed to `.cbook.to_filehandle` and `.cbook.open_file_cm`
+are no longer accepted. This is consistent with their removal from `open` in
+Python 3.9.
+
+Keymaps toggling ``Axes.get_navigate`` have been removed
+........................................................
+
+This includes numeric key events and rcParams.
+
+The ``TTFPATH`` and ``AFMPATH`` environment variables
+.....................................................
+
+Support for the (undocumented) ``TTFPATH`` and ``AFMPATH`` environment
+variables has been removed. Register additional fonts using
+``matplotlib.font_manager.fontManager.addfont()``.
+
+Modules
+~~~~~~~
+
+- ``matplotlib.backends.qt_editor.formsubplottool``; use
+ ``matplotlib.backends.backend_qt.SubplotToolQt`` instead.
+- ``matplotlib.compat``
+- ``matplotlib.ttconv``
+- The Qt4-based backends, ``qt4agg`` and ``qt4cairo``, have been removed. Qt4
+ has reached its end-of-life in 2015 and there are no releases of either PyQt4
+ or PySide for recent versions of Python. Please use one of the Qt5 or Qt6
+ backends.
+
+Classes, methods and attributes
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The following module-level classes/variables have been removed:
+
+- ``backend_bases.StatusbarBase`` and all its subclasses, and ``StatusBarWx``;
+ messages are displayed in the toolbar
+- ``backend_pgf.GraphicsContextPgf``
+- ``MODIFIER_KEYS``, ``SUPER``, ``ALT``, ``CTRL``, and ``SHIFT`` of
+ `matplotlib.backends.backend_qt5agg` and
+ `matplotlib.backends.backend_qt5cairo`
+- ``backend_wx.DEBUG_MSG``
+- ``dviread.Encoding``
+- ``Fil``, ``Fill``, ``Filll``, ``NegFil``, ``NegFill``, ``NegFilll``, and
+ ``SsGlue`` from `.mathtext`; directly construct glue instances with
+ ``Glue("fil")``, etc.
+- ``mathtext.GlueSpec``
+- ``OldScalarFormatter``, ``IndexFormatter`` and ``IndexDateFormatter``; use
+ `.FuncFormatter` instead
+- ``OldAutoLocator``
+- ``AVConvBase``, ``AVConvWriter`` and ``AVConvFileWriter``. Debian 8 (2015,
+ EOL 06/2020) and Ubuntu 14.04 (EOL 04/2019) were the last versions of Debian
+ and Ubuntu to ship avconv. It remains possible to force the use of avconv by
+ using the FFmpeg-based writers with :rc:`animation.ffmpeg_path` set to
+ "avconv".
+- ``matplotlib.axes._subplots._subplot_classes``
+- ``axes_grid1.axes_rgb.RGBAxesBase``; use ``RGBAxes`` instead
+
+The following class attributes have been removed:
+
+- ``backend_pgf.LatexManager.latex_stdin_utf8``
+- ``backend_pgf.PdfPages.metadata``
+- ``ContourSet.ax`` and ``Quiver.ax``; use ``ContourSet.axes`` or
+ ``Quiver.axes`` as with other artists
+- ``DateFormatter.illegal_s``
+- ``dates.YearLocator.replaced``; `.YearLocator` is now a subclass of
+ `.RRuleLocator`, and the attribute ``YearLocator.replaced`` has been removed.
+ For tick locations that required modifying this, a custom rrule and
+ `.RRuleLocator` can be used instead.
+- ``FigureManagerBase.statusbar``; messages are displayed in the toolbar
+- ``FileMovieWriter.clear_temp``
+- ``mathtext.Glue.glue_subtype``
+- ``MovieWriter.args_key``, ``MovieWriter.exec_key``, and
+ ``HTMLWriter.args_key``
+- ``NavigationToolbar2QT.basedir``; the base directory to the icons is
+ ``os.path.join(mpl.get_data_path(), "images")``
+- ``NavigationToolbar2QT.ctx``
+- ``NavigationToolbar2QT.parent``; to access the parent window, use
+ ``toolbar.canvas.parent()`` or ``toolbar.parent()``
+- ``prevZoomRect``, ``retinaFix``, ``savedRetinaImage``, ``wxoverlay``,
+ ``zoomAxes``, ``zoomStartX``, and ``zoomStartY`` attributes of
+ ``NavigationToolbar2Wx``
+- ``NonUniformImage.is_grayscale``, ``PcolorImage.is_grayscale``, for
+ consistency with ``AxesImage.is_grayscale``. (Note that previously, these
+ attributes were only available *after rendering the image*).
+- ``RendererCairo.fontweights``, ``RendererCairo.fontangles``
+- ``used_characters`` of `.RendererPdf`, `.PdfFile`, and `.RendererPS`
+- ``LogScale.LogTransform``, ``LogScale.InvertedLogTransform``,
+ ``SymmetricalScale.SymmetricalTransform``, and
+ ``SymmetricalScale.InvertedSymmetricalTransform``; directly access the
+ transform classes from `matplotlib.scale`
+- ``cachedir``, ``rgba_arrayd``, ``serif``, ``sans_serif``, ``cursive``, and
+ ``monospace`` attributes of `.TexManager`
+- ``axleft``, ``axright``, ``axbottom``, ``axtop``, ``axwspace``, and
+ ``axhspace`` attributes of `.widgets.SubplotTool`; access the ``ax``
+ attribute of the corresponding slider
+- ``widgets.TextBox.params_to_disable``
+- ``angle_helper.LocatorBase.den``; it has been renamed to *nbins*
+- ``axes_grid.CbarAxesBase.cbid`` and ``axes_grid.CbarAxesBase.locator``; use
+ ``mappable.colorbar_cid`` or ``colorbar.locator`` instead
+
+The following class methods have been removed:
+
+- ``Axes.update_datalim_bounds``; use ``ax.dataLim.set(Bbox.union([ax.dataLim,
+ bounds]))``
+- ``pan`` and ``zoom`` methods of `~.axis.Axis` and `~.ticker.Locator` have
+ been removed; panning and zooming are now implemented using the
+ ``start_pan``, ``drag_pan``, and ``end_pan`` methods of `~.axes.Axes`
+- ``.BboxBase.inverse_transformed``; call `.BboxBase.transformed` on the
+ `~.Transform.inverted()` transform
+- ``Collection.set_offset_position`` and ``Collection.get_offset_position``
+ have been removed; the ``offset_position`` of the `.Collection` class is now
+ "screen"
+- ``Colorbar.on_mappable_changed`` and ``Colorbar.update_bruteforce``; use
+ ``Colorbar.update_normal()`` instead
+- ``docstring.Substitution.from_params`` has been removed; directly assign to
+ ``params`` of ``docstring.Substitution`` instead
+- ``DraggableBase.artist_picker``; set the artist's picker instead
+- ``DraggableBase.on_motion_blit``; use `.DraggableBase.on_motion` instead
+- ``FigureCanvasGTK3._renderer_init``
+- ``Locator.refresh()`` and the associated helper methods
+ ``NavigationToolbar2.draw()`` and ``ToolViewsPositions.refresh_locators()``
+- ``track_characters`` and ``merge_used_characters`` of `.RendererPdf`,
+ `.PdfFile`, and `.RendererPS`
+- ``RendererWx.get_gc``
+- ``SubplotSpec.get_rows_columns``; use the ``GridSpec.nrows``,
+ ``GridSpec.ncols``, ``SubplotSpec.rowspan``, and ``SubplotSpec.colspan``
+ properties instead.
+- ``ScalarMappable.update_dict``, ``ScalarMappable.add_checker()``, and
+ ``ScalarMappable.check_update()``; register a callback in
+ ``ScalarMappable.callbacks`` to be notified of updates
+- ``TexManager.make_tex_preview`` and ``TexManager.make_dvi_preview``
+- ``funcleft``, ``funcright``, ``funcbottom``, ``functop``, ``funcwspace``, and
+ ``funchspace`` methods of `.widgets.SubplotTool`
+
+- ``axes_grid1.axes_rgb.RGBAxes.add_RGB_to_figure``
+- ``axisartist.axis_artist.AxisArtist.dpi_transform``
+- ``axisartist.grid_finder.MaxNLocator.set_factor`` and
+ ``axisartist.grid_finder.FixedLocator.set_factor``; the factor is always 1
+ now
+
+Functions
+~~~~~~~~~
+
+- ``bezier.make_path_regular`` has been removed; use ``Path.cleaned()`` (or
+ ``Path.cleaned(curves=True)``, etc.) instead, but note that these methods add
+ a ``STOP`` code at the end of the path.
+- ``bezier.concatenate_paths`` has been removed; use
+ ``Path.make_compound_path()`` instead.
+- ``cbook.local_over_kwdict`` has been removed; use `.cbook.normalize_kwargs`
+ instead.
+- ``qt_compat.is_pyqt5`` has been removed due to the release of PyQt6. The Qt
+ version can be checked using ``QtCore.qVersion()``.
+- ``testing.compare.make_external_conversion_command`` has been removed.
+- ``axes_grid1.axes_rgb.imshow_rgb`` has been removed; use
+ ``imshow(np.dstack([r, g, b]))`` instead.
+
+Arguments
+~~~~~~~~~
+
+- The *s* parameter to `.Axes.annotate` and `.pyplot.annotate` is no longer
+ supported; use the new name *text*.
+- The *inframe* parameter to `matplotlib.axes.Axes.draw` has been removed; use
+ `.Axes.redraw_in_frame` instead.
+- The *required*, *forbidden* and *allowed* parameters of
+ `.cbook.normalize_kwargs` have been removed.
+- The *ismath* parameter of the ``draw_tex`` method of all renderer classes has
+ been removed (as a call to ``draw_tex`` — not to be confused with
+ ``draw_text``! — means that the entire string should be passed to the
+ ``usetex`` machinery anyways). Likewise, the text machinery will no longer
+ pass the *ismath* parameter when calling ``draw_tex`` (this should only
+ matter for backend implementers).
+- The *quality*, *optimize*, and *progressive* parameters of `.Figure.savefig`
+ (which only affected JPEG output) have been removed, as well as from the
+ corresponding ``print_jpg`` methods. JPEG output options can be set by
+ directly passing the relevant parameters in *pil_kwargs*.
+- The *clear_temp* parameter of `.FileMovieWriter` has been removed; files
+ placed in a temporary directory (using ``frame_prefix=None``, the default)
+ will be cleared; files placed elsewhere will not.
+- The *copy* parameter of ``mathtext.Glue`` has been removed.
+- The *quantize* parameter of `.Path.cleaned()` has been removed.
+- The *dummy* parameter of `.RendererPgf` has been removed.
+- The *props* parameter of `.Shadow` has been removed; use keyword arguments
+ instead.
+- The *recursionlimit* parameter of ``matplotlib.test`` has been removed.
+- The *label* parameter of `.Tick` has no effect and has been removed.
+- `~.ticker.MaxNLocator` no longer accepts a positional parameter and the
+ keyword argument *nbins* simultaneously because they specify the same
+ quantity.
+- The *add_all* parameter to ``axes_grid.Grid``, ``axes_grid.ImageGrid``,
+ ``axes_rgb.make_rgb_axes``, and ``axes_rgb.RGBAxes`` have been removed; the
+ APIs always behave as if ``add_all=True``.
+- The *den* parameter of ``axisartist.angle_helper.LocatorBase`` has been
+ removed; use *nbins* instead.
+
+- The *s* keyword argument to `.AnnotationBbox.get_fontsize` has no effect and
+ has been removed.
+- The *offset_position* keyword argument of the `.Collection` class has been
+ removed; the ``offset_position`` now "screen".
+- Arbitrary keyword arguments to ``StreamplotSet`` have no effect and have been
+ removed.
+
+- The *fontdict* and *minor* parameters of `.Axes.set_xticklabels` /
+ `.Axes.set_yticklabels` are now keyword-only.
+- All parameters of `.Figure.subplots` except *nrows* and *ncols* are now
+ keyword-only; this avoids typing e.g. ``subplots(1, 1, 1)`` when meaning
+ ``subplot(1, 1, 1)``, but actually getting ``subplots(1, 1, sharex=1)``.
+- All parameters of `.pyplot.tight_layout` are now keyword-only, to be
+ consistent with `.Figure.tight_layout`.
+- ``ColorbarBase`` only takes a single positional argument now, the ``Axes`` to
+ create it in, with all other options required to be keyword arguments. The
+ warning for keyword arguments that were overridden by the mappable is now
+ removed.
+
+- Omitting the *renderer* parameter to `matplotlib.axes.Axes.draw` is no longer
+ supported; use ``axes.draw_artist(axes)`` instead.
+- Passing ``ismath="TeX!"`` to `.RendererAgg.get_text_width_height_descent` is
+ no longer supported; pass ``ismath="TeX"`` instead,
+- Changes to the signature of the `matplotlib.axes.Axes.draw` method make it
+ consistent with all other artists; thus additional parameters to
+ `.Artist.draw` have also been removed.
+
+rcParams
+~~~~~~~~
+
+- The ``animation.avconv_path`` and ``animation.avconv_args`` rcParams have
+ been removed.
+- The ``animation.html_args`` rcParam has been removed.
+- The ``keymap.all_axes`` rcParam has been removed.
+- The ``mathtext.fallback_to_cm`` rcParam has been removed. Use
+ :rc:`mathtext.fallback` instead.
+- The ``savefig.jpeg_quality`` rcParam has been removed.
+- The ``text.latex.preview`` rcParam has been removed.
+- The following deprecated rcParams validators, defined in `.rcsetup`, have
+ been removed:
+
+ - ``validate_alignment``
+ - ``validate_axes_titlelocation``
+ - ``validate_axis_locator``
+ - ``validate_bool_maybe_none``
+ - ``validate_fontset``
+ - ``validate_grid_axis``
+ - ``validate_hinting``
+ - ``validate_legend_loc``
+ - ``validate_mathtext_default``
+ - ``validate_movie_frame_fmt``
+ - ``validate_movie_html_fmt``
+ - ``validate_movie_writer``
+ - ``validate_nseq_float``
+ - ``validate_nseq_int``
+ - ``validate_orientation``
+ - ``validate_pgf_texsystem``
+ - ``validate_ps_papersize``
+ - ``validate_svg_fontset``
+ - ``validate_toolbar``
+ - ``validate_webagg_address``
+
+- Some rcParam validation has become stricter:
+
+ - :rc:`axes.axisbelow` no longer accepts strings starting with "line"
+ (case-insensitive) as "line"; use "line" (case-sensitive) instead.
+ - :rc:`text.latex.preamble` and :rc:`pdf.preamble` no longer accept
+ non-string values.
+ - All ``*.linestyle`` rcParams no longer accept ``offset = None``; set the
+ offset to 0 instead.
diff --git a/doc/api/prev_api_changes/api_changes_3.5.2.rst b/doc/api/prev_api_changes/api_changes_3.5.2.rst
new file mode 100644
index 000000000000..47b000de0350
--- /dev/null
+++ b/doc/api/prev_api_changes/api_changes_3.5.2.rst
@@ -0,0 +1,13 @@
+API Changes for 3.5.2
+=====================
+
+.. contents::
+ :local:
+ :depth: 1
+
+QuadMesh mouseover defaults to False
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+New in 3.5, `.QuadMesh.get_cursor_data` allows display of data values
+under the cursor. However, this can be very slow for large meshes, so
+by ``.QuadMesh.set_mouseover`` defaults to *False*.
diff --git a/doc/api/prev_api_changes/api_changes_3.5.3.rst b/doc/api/prev_api_changes/api_changes_3.5.3.rst
new file mode 100644
index 000000000000..03d1f476513e
--- /dev/null
+++ b/doc/api/prev_api_changes/api_changes_3.5.3.rst
@@ -0,0 +1,13 @@
+API Changes for 3.5.3
+=====================
+
+.. contents::
+ :local:
+ :depth: 1
+
+Passing *linefmt* positionally is undeprecated
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Positional use of all formatting parameters in `~.Axes.stem` has been
+deprecated since Matplotlib 3.5. This deprecation is relaxed so that one can
+still pass *linefmt* positionally, i.e. ``stem(x, y, 'r')``.
diff --git a/doc/api/prev_api_changes/api_changes_3.6.0.rst b/doc/api/prev_api_changes/api_changes_3.6.0.rst
new file mode 100644
index 000000000000..1bba4506fd7d
--- /dev/null
+++ b/doc/api/prev_api_changes/api_changes_3.6.0.rst
@@ -0,0 +1,14 @@
+API Changes for 3.6.0
+=====================
+
+.. contents::
+ :local:
+ :depth: 1
+
+.. include:: /api/prev_api_changes/api_changes_3.6.0/behaviour.rst
+
+.. include:: /api/prev_api_changes/api_changes_3.6.0/deprecations.rst
+
+.. include:: /api/prev_api_changes/api_changes_3.6.0/removals.rst
+
+.. include:: /api/prev_api_changes/api_changes_3.6.0/development.rst
diff --git a/doc/api/prev_api_changes/api_changes_3.6.0/behaviour.rst b/doc/api/prev_api_changes/api_changes_3.6.0/behaviour.rst
new file mode 100644
index 000000000000..a35584b04961
--- /dev/null
+++ b/doc/api/prev_api_changes/api_changes_3.6.0/behaviour.rst
@@ -0,0 +1,248 @@
+Behaviour changes
+-----------------
+
+``plt.get_cmap`` and ``matplotlib.cm.get_cmap`` return a copy
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Formerly, `~.pyplot.get_cmap` and `.cm.get_cmap` returned a global version of a
+`.Colormap`. This was prone to errors as modification of the colormap would
+propagate from one location to another without warning. Now, a new copy of the
+colormap is returned.
+
+Large ``imshow`` images are now downsampled
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+When showing an image using `~matplotlib.axes.Axes.imshow` that has more than
+:math:`2^{24}` columns or :math:`2^{23}` rows, the image will now be
+downsampled to below this resolution before being resampled for display by the
+AGG renderer. Previously such a large image would be shown incorrectly. To
+prevent this downsampling and the warning it raises, manually downsample your
+data before handing it to `~matplotlib.axes.Axes.imshow`.
+
+Default date limits changed to 1970-01-01 – 1970-01-02
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Previously the default limits for an empty axis set up for dates
+(`.Axis.axis_date`) was 2000-01-01 to 2010-01-01. This has been changed to
+1970-01-01 to 1970-01-02. With the default epoch, this makes the numeric limit
+for date axes the same as for other axes (0.0-1.0), and users are less likely
+to set a locator with far too many ticks.
+
+*markerfmt* argument to ``stem``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The behavior of the *markerfmt* parameter of `~.Axes.stem` has changed:
+
+- If *markerfmt* does not contain a color, the color is taken from *linefmt*.
+- If *markerfmt* does not contain a marker, the default is 'o'.
+
+Before, *markerfmt* was passed unmodified to ``plot(..., fmt)``, which had a
+number of unintended side-effects; e.g. only giving a color switched to a solid
+line without markers.
+
+For a simple call ``stem(x, y)`` without parameters, the new rules still
+reproduce the old behavior.
+
+``get_ticklabels`` now always populates labels
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Previously `.Axis.get_ticklabels` (and `.Axes.get_xticklabels`,
+`.Axes.get_yticklabels`) would only return empty strings unless a draw had
+already been performed. Now the ticks and their labels are updated when the
+labels are requested.
+
+Warning when scatter plot color settings discarded
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+When making an animation of a scatter plot, if you don't set *c* (the color
+value parameter) when initializing the artist, the color settings are ignored.
+`.Axes.scatter` now raises a warning if color-related settings are changed
+without setting *c*.
+
+3D ``contourf`` polygons placed between levels
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The polygons used in a 3D `~.Axes3D.contourf` plot are now placed halfway
+between the contour levels, as each polygon represents the location of values
+that lie between two levels.
+
+Axes title now avoids y-axis offset
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Previously, Axes titles could overlap the y-axis offset text, which is often in
+the upper left corner of the axes. Now titles are moved above the offset text
+if overlapping when automatic title positioning is in effect (i.e. if *y* in
+`.Axes.set_title` is *None* and :rc:`axes.titley` is also *None*).
+
+Dotted operators gain extra space in mathtext
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+In mathtext, ``\doteq \doteqdot \dotminus \dotplus \dots`` are now surrounded
+by extra space because they are correctly treated as relational or binary
+operators.
+
+*math* parameter of ``mathtext.get_unicode_index`` defaults to False
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+In math mode, ASCII hyphens (U+002D) are now replaced by Unicode minus signs
+(U+2212) at the parsing stage.
+
+``ArtistList`` proxies copy contents on iteration
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+When iterating over the contents of the dynamically generated proxy lists for
+the Artist-type accessors (see :ref:`Behavioural API Changes 3.5 - Axes
+children combined`), a copy of the contents is made. This ensure that artists
+can safely be added or removed from the Axes while iterating over their
+children.
+
+This is a departure from the expected behavior of mutable iterable data types
+in Python — iterating over a list while mutating it has surprising consequences
+and dictionaries will error if they change size during iteration. Because all
+of the accessors are filtered views of the same underlying list, it is possible
+for seemingly unrelated changes, such as removing a Line, to affect the
+iteration over any of the other accessors. In this case, we have opted to make
+a copy of the relevant children before yielding them to the user.
+
+This change is also consistent with our plan to make these accessors immutable
+in Matplotlib 3.7.
+
+``AxesImage`` string representation
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The string representation of `.AxesImage` changes from stating the position in
+the figure ``"AxesImage(80,52.8;496x369.6)"`` to giving the number of pixels
+``"AxesImage(size=(300, 200))"``.
+
+Improved autoscaling for Bézier curves
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Bézier curves are now autoscaled to their extents - previously they were
+autoscaled to their ends and control points, which in some cases led to
+unnecessarily large limits.
+
+``QuadMesh`` mouseover defaults to False
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+New in 3.5, `.QuadMesh.get_cursor_data` allows display of data values under the
+cursor. However, this can be very slow for large meshes, so mouseover now
+defaults to *False*.
+
+Changed pgf backend document class
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The pgf backend now uses the ``article`` document class as basis for
+compilation.
+
+``MathtextBackendAgg.get_results`` no longer returns ``used_characters``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The last item (``used_characters``) in the tuple returned by
+``MathtextBackendAgg.get_results`` has been removed. In order to unpack this
+tuple in a backward and forward-compatible way, use e.g. ``ox, oy, width,
+height, descent, image, *_ = parse(...)``, which will ignore
+``used_characters`` if it was present.
+
+``Type1Font`` objects include more properties
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The ``matplotlib._type1font.Type1Font.prop`` dictionary now includes more keys,
+such as ``CharStrings`` and ``Subrs``. The value of the ``Encoding`` key is now
+a dictionary mapping codes to glyph names. The
+``matplotlib._type1font.Type1Font.transform`` method now correctly removes
+``UniqueID`` properties from the font.
+
+``rcParams.copy()`` returns ``RcParams`` rather than ``dict``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Returning an `.RcParams` instance from `.RcParams.copy` makes the copy still
+validate inputs, and additionally avoids emitting deprecation warnings when
+using a previously copied instance to update the global instance (even if some
+entries are deprecated).
+
+``rc_context`` no longer resets the value of ``'backend'``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+`matplotlib.rc_context` incorrectly reset the value of :rc:`backend` if backend
+resolution was triggered in the context. This affected only the value. The
+actual backend was not changed. Now, `matplotlib.rc_context` does not reset
+:rc:`backend` anymore.
+
+Default ``rcParams["animation.convert_args"]`` changed
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+It now defaults to ``["-layers", "OptimizePlus"]`` to try to generate smaller
+GIFs. Set it back to an empty list to recover the previous behavior.
+
+Style file encoding now specified to be UTF-8
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+It has been impossible to import Matplotlib with a non UTF-8 compatible locale
+encoding because we read the style library at import time. This change is
+formalizing and documenting the status quo so there is no deprecation period.
+
+MacOSX backend uses sRGB instead of GenericRGB color space
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+MacOSX backend now display sRGB tagged image instead of GenericRGB which is an
+older (now deprecated) Apple color space. This is the source color space used
+by ColorSync to convert to the current display profile.
+
+Renderer optional for ``get_tightbbox`` and ``get_window_extent``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The `.Artist.get_tightbbox` and `.Artist.get_window_extent` methods no longer
+require the *renderer* keyword argument, saving users from having to query it
+from ``fig.canvas.get_renderer``. If the *renderer* keyword argument is not
+supplied, these methods first check if there is a cached renderer from a
+previous draw and use that. If there is no cached renderer, then the methods
+will use ``fig.canvas.get_renderer()`` as a fallback.
+
+``FigureFrameWx`` constructor, subclasses, and ``get_canvas``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The ``FigureCanvasWx`` constructor gained a *canvas_class* keyword-only
+parameter which specifies the canvas class that should be used. This parameter
+will become required in the future. The ``get_canvas`` method, which was
+previously used to customize canvas creation, is deprecated. The
+``FigureFrameWxAgg`` and ``FigureFrameWxCairo`` subclasses, which overrode
+``get_canvas``, are deprecated.
+
+``FigureFrameWx.sizer``
+~~~~~~~~~~~~~~~~~~~~~~~
+
+... has been removed. The frame layout is no longer based on a sizer, as the
+canvas is now the sole child widget; the toolbar is now a regular toolbar added
+using ``SetToolBar``.
+
+Incompatible layout engines raise
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+You cannot switch between ``tight_layout`` and ``constrained_layout`` if a
+colorbar has already been added to a figure. Invoking the incompatible layout
+engine used to warn, but now raises with a `RuntimeError`.
+
+``CallbackRegistry`` raises on unknown signals
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+When Matplotlib instantiates a `.CallbackRegistry`, it now limits callbacks to
+the signals that the registry knows about. In practice, this means that calling
+`~.FigureCanvasBase.mpl_connect` with an invalid signal name now raises a
+`ValueError`.
+
+Changed exception type for incorrect SVG date metadata
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Providing date metadata with incorrect type to the SVG backend earlier resulted
+in a `ValueError`. Now, a `TypeError` is raised instead.
+
+Specified exception types in ``Grid``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+In a few cases an `Exception` was thrown when an incorrect argument value was
+set in the `mpl_toolkits.axes_grid1.axes_grid.Grid` (=
+`mpl_toolkits.axisartist.axes_grid.Grid`) constructor. These are replaced as
+follows:
+
+* Providing an incorrect value for *ngrids* now raises a `ValueError`
+* Providing an incorrect type for *rect* now raises a `TypeError`
diff --git a/doc/api/prev_api_changes/api_changes_3.6.0/deprecations.rst b/doc/api/prev_api_changes/api_changes_3.6.0/deprecations.rst
new file mode 100644
index 000000000000..3a9e91e12289
--- /dev/null
+++ b/doc/api/prev_api_changes/api_changes_3.6.0/deprecations.rst
@@ -0,0 +1,414 @@
+Deprecations
+------------
+
+Parameters to ``plt.figure()`` and the ``Figure`` constructor
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+All parameters to `.pyplot.figure` and the `.Figure` constructor, other than
+*num*, *figsize*, and *dpi*, will become keyword-only after a deprecation
+period.
+
+Deprecation aliases in cbook
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The module ``matplotlib.cbook.deprecation`` was previously deprecated in
+Matplotlib 3.4, along with deprecation-related API in ``matplotlib.cbook``. Due
+to technical issues, ``matplotlib.cbook.MatplotlibDeprecationWarning`` and
+``matplotlib.cbook.mplDeprecation`` did not raise deprecation warnings on use.
+Changes in Python have now made it possible to warn when these aliases are
+being used.
+
+In order to avoid downstream breakage, these aliases will now warn, and their
+removal has been pushed from 3.6 to 3.8 to give time to notice said warnings.
+As replacement, please use `matplotlib.MatplotlibDeprecationWarning`.
+
+``Axes`` subclasses should override ``clear`` instead of ``cla``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+For clarity, `.axes.Axes.clear` is now preferred over `.Axes.cla`. However, for
+backwards compatibility, the latter will remain as an alias for the former.
+
+For additional compatibility with third-party libraries, Matplotlib will
+continue to call the ``cla`` method of any `~.axes.Axes` subclasses if they
+define it. In the future, this will no longer occur, and Matplotlib will only
+call the ``clear`` method in `~.axes.Axes` subclasses.
+
+It is recommended to define only the ``clear`` method when on Matplotlib 3.6,
+and only ``cla`` for older versions.
+
+Pending deprecation top-level cmap registration and access functions in ``mpl.cm``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+As part of a `multi-step process
+`_ we are refactoring
+the global state for managing the registered colormaps.
+
+In Matplotlib 3.5 we added a `.ColormapRegistry` class and exposed an instance
+at the top level as ``matplotlib.colormaps``. The existing top level functions
+in `matplotlib.cm` (``get_cmap``, ``register_cmap``, ``unregister_cmap``) were
+changed to be aliases around the same instance.
+
+In Matplotlib 3.6 we have marked those top level functions as pending
+deprecation with the intention of deprecation in Matplotlib 3.7. The following
+functions have been marked for pending deprecation:
+
+- ``matplotlib.cm.get_cmap``; use ``matplotlib.colormaps[name]`` instead if you
+ have a `str`.
+
+ **Added 3.6.1** Use `matplotlib.cm.ColormapRegistry.get_cmap` if you
+ have a string, `None` or a `matplotlib.colors.Colormap` object that you want
+ to convert to a `matplotlib.colors.Colormap` instance.
+- ``matplotlib.cm.register_cmap``; use `matplotlib.colormaps.register
+ <.ColormapRegistry.register>` instead
+- ``matplotlib.cm.unregister_cmap``; use `matplotlib.colormaps.unregister
+ <.ColormapRegistry.unregister>` instead
+- ``matplotlib.pyplot.register_cmap``; use `matplotlib.colormaps.register
+ <.ColormapRegistry.register>` instead
+
+The `matplotlib.pyplot.get_cmap` function will stay available for backward
+compatibility.
+
+Pending deprecation of layout methods
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The methods `~.Figure.set_tight_layout`, `~.Figure.set_constrained_layout`, are
+discouraged, and now emit a `PendingDeprecationWarning` in favor of explicitly
+referencing the layout engine via ``figure.set_layout_engine('tight')`` and
+``figure.set_layout_engine('constrained')``. End users should not see the
+warning, but library authors should adjust.
+
+The methods `~.Figure.set_constrained_layout_pads` and
+`~.Figure.get_constrained_layout_pads` are will be deprecated in favor of
+``figure.get_layout_engine().set()`` and ``figure.get_layout_engine().get()``,
+and currently emit a `PendingDeprecationWarning`.
+
+seaborn styles renamed
+~~~~~~~~~~~~~~~~~~~~~~
+
+Matplotlib currently ships many style files inspired from the seaborn library
+("seaborn", "seaborn-bright", "seaborn-colorblind", etc.) but they have gone
+out of sync with the library itself since the release of seaborn 0.9. To
+prevent confusion, the style files have been renamed "seaborn-v0_8",
+"seaborn-v0_8-bright", "seaborn-v0_8-colorblind", etc. Users are encouraged to
+directly use seaborn to access the up-to-date styles.
+
+Auto-removal of overlapping Axes by ``plt.subplot`` and ``plt.subplot2grid``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Previously, `.pyplot.subplot` and `.pyplot.subplot2grid` would automatically
+remove preexisting Axes that overlap with the newly added Axes. This behavior
+was deemed confusing, and is now deprecated. Explicitly call ``ax.remove()`` on
+Axes that need to be removed.
+
+Passing *linefmt* positionally to ``stem`` is undeprecated
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Positional use of all formatting parameters in `~.Axes.stem` has been
+deprecated since Matplotlib 3.5. This deprecation is relaxed so that one can
+still pass *linefmt* positionally, i.e. ``stem(x, y, 'r')``.
+
+``stem(..., use_line_collection=False)``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+... is deprecated with no replacement. This was a compatibility fallback to a
+former more inefficient representation of the stem lines.
+
+Positional / keyword arguments
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Passing all but the very few first arguments positionally in the constructors
+of Artists is deprecated. Most arguments will become keyword-only in a future
+version.
+
+Passing too many positional arguments to ``tripcolor`` is now deprecated (extra
+arguments were previously silently ignored).
+
+Passing *emit* and *auto* parameters of ``set_xlim``, ``set_ylim``,
+``set_zlim``, ``set_rlim`` positionally is deprecated; they will become
+keyword-only in a future release.
+
+The *transOffset* parameter of `.Collection.set_offset_transform` and the
+various ``create_collection`` methods of legend handlers has been renamed to
+*offset_transform* (consistently with the property name).
+
+Calling ``MarkerStyle()`` with no arguments or ``MarkerStyle(None)`` is
+deprecated; use ``MarkerStyle("")`` to construct an empty marker style.
+
+``Axes.get_window_extent`` / ``Figure.get_window_extent`` accept only
+*renderer*. This aligns the API with the general `.Artist.get_window_extent`
+API. All other parameters were ignored anyway.
+
+The *cleared* parameter of ``get_renderer``, which only existed for AGG-based
+backends, has been deprecated. Use ``renderer.clear()`` instead to explicitly
+clear the renderer buffer.
+
+Methods to set parameters in ``LogLocator`` and ``LogFormatter*``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+In `~.LogFormatter` and derived subclasses, the methods ``base`` and
+``label_minor`` for setting the respective parameter are deprecated and
+replaced by ``set_base`` and ``set_label_minor``, respectively.
+
+In `~.LogLocator`, the methods ``base`` and ``subs`` for setting the respective
+parameter are deprecated. Instead, use ``set_params(base=..., subs=...)``.
+
+``Axes.get_renderer_cache``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The canvas now takes care of the renderer and whether to cache it or not. The
+alternative is to call ``axes.figure.canvas.get_renderer()``.
+
+Groupers from ``get_shared_x_axes`` / ``get_shared_y_axes`` will be immutable
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Modifications to the Groupers returned by ``get_shared_x_axes`` and
+``get_shared_y_axes`` are deprecated. In the future, these methods will return
+immutable views on the grouper structures. Note that previously, calling e.g.
+``join()`` would already fail to set up the correct structures for sharing
+axes; use `.Axes.sharex` or `.Axes.sharey` instead.
+
+Unused methods in ``Axis``, ``Tick``, ``XAxis``, and ``YAxis``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+``Tick.label`` has been pending deprecation since 3.1 and is now deprecated.
+Use ``Tick.label1`` instead.
+
+The following methods are no longer used and deprecated without a replacement:
+
+- ``Axis.get_ticklabel_extents``
+- ``Tick.get_pad_pixels``
+- ``XAxis.get_text_heights``
+- ``YAxis.get_text_widths``
+
+``mlab.stride_windows``
+~~~~~~~~~~~~~~~~~~~~~~~
+
+... is deprecated. Use ``np.lib.stride_tricks.sliding_window_view`` instead (or
+``np.lib.stride_tricks.as_strided`` on NumPy < 1.20).
+
+Event handlers
+~~~~~~~~~~~~~~
+
+The ``draw_event``, ``resize_event``, ``close_event``, ``key_press_event``,
+``key_release_event``, ``pick_event``, ``scroll_event``,
+``button_press_event``, ``button_release_event``, ``motion_notify_event``,
+``enter_notify_event`` and ``leave_notify_event`` methods of
+`.FigureCanvasBase` are deprecated. They had inconsistent signatures across
+backends, and made it difficult to improve event metadata.
+
+In order to trigger an event on a canvas, directly construct an `.Event` object
+of the correct class and call ``canvas.callbacks.process(event.name, event)``.
+
+Widgets
+~~~~~~~
+
+All parameters to ``MultiCursor`` starting from *useblit* are becoming
+keyword-only (passing them positionally is deprecated).
+
+The ``canvas`` and ``background`` attributes of ``MultiCursor`` are deprecated
+with no replacement.
+
+The *visible* attribute of Selector widgets has been deprecated; use
+``set_visible`` or ``get_visible`` instead.
+
+The *state_modifier_keys* attribute of Selector widgets has been privatized and
+the modifier keys must be set when creating the widget.
+
+``Axes3D.dist``
+~~~~~~~~~~~~~~~
+
+... has been privatized. Use the *zoom* keyword argument in
+`.Axes3D.set_box_aspect` instead.
+
+3D Axis
+~~~~~~~
+
+The previous constructor of `.axis3d.Axis`, with signature ``(self, adir,
+v_intervalx, d_intervalx, axes, *args, rotate_label=None, **kwargs)`` is
+deprecated in favor of a new signature closer to the one of 2D Axis; it is now
+``(self, axes, *, rotate_label=None, **kwargs)`` where ``kwargs`` are forwarded
+to the 2D Axis constructor. The axis direction is now inferred from the axis
+class' ``axis_name`` attribute (as in the 2D case); the ``adir`` attribute is
+deprecated.
+
+The ``init3d`` method of 3D Axis is also deprecated; all the relevant
+initialization is done as part of the constructor.
+
+The ``d_interval`` and ``v_interval`` attributes of 3D Axis are deprecated; use
+``get_data_interval`` and ``get_view_interval`` instead.
+
+The ``w_xaxis``, ``w_yaxis``, and ``w_zaxis`` attributes of ``Axis3D`` have
+been pending deprecation since 3.1. They are now deprecated. Instead use
+``xaxis``, ``yaxis``, and ``zaxis``.
+
+``mplot3d.axis3d.Axis.set_pane_pos`` is deprecated. This is an internal method
+where the provided values are overwritten during drawing. Hence, it does not
+serve any purpose to be directly accessible.
+
+The two helper functions ``mplot3d.axis3d.move_from_center`` and
+``mplot3d.axis3d.tick_update_position`` are considered internal and deprecated.
+If these are required, please vendor the code from the corresponding private
+methods ``_move_from_center`` and ``_tick_update_position``.
+
+``Figure.callbacks`` is deprecated
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The Figure ``callbacks`` property is deprecated. The only signal was
+"dpi_changed", which can be replaced by connecting to the "resize_event" on the
+canvas ``figure.canvas.mpl_connect("resize_event", func)`` instead.
+
+``FigureCanvas`` without a ``required_interactive_framework`` attribute
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Support for such canvas classes is deprecated. Note that canvas classes which
+inherit from ``FigureCanvasBase`` always have such an attribute.
+
+Backend-specific deprecations
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+- ``backend_gtk3.FigureManagerGTK3Agg`` and
+ ``backend_gtk4.FigureManagerGTK4Agg``; directly use
+ ``backend_gtk3.FigureManagerGTK3`` and ``backend_gtk4.FigureManagerGTK4``
+ instead.
+- The *window* parameter to ``backend_gtk3.NavigationToolbar2GTK3`` had no
+ effect, and is now deprecated.
+- ``backend_gtk3.NavigationToolbar2GTK3.win``
+- ``backend_gtk3.RendererGTK3Cairo`` and ``backend_gtk4.RendererGTK4Cairo``;
+ use `.RendererCairo` instead, which has gained the ``set_context`` method,
+ which also auto-infers the size of the underlying surface.
+- ``backend_cairo.RendererCairo.set_ctx_from_surface`` and
+ ``backend_cairo.RendererCairo.set_width_height`` in favor of
+ `.RendererCairo.set_context`.
+- ``backend_gtk3.error_msg_gtk``
+- ``backend_gtk3.icon_filename`` and ``backend_gtk3.window_icon``
+- ``backend_macosx.NavigationToolbar2Mac.prepare_configure_subplots`` has been
+ replaced by ``configure_subplots()``.
+- ``backend_pdf.Name.hexify``
+- ``backend_pdf.Operator`` and ``backend_pdf.Op.op`` are deprecated in favor of
+ a single standard `enum.Enum` interface on `.backend_pdf.Op`.
+- ``backend_pdf.fill``; vendor the code of the similarly named private
+ functions if you rely on these functions.
+- ``backend_pgf.LatexManager.texcommand`` and
+ ``backend_pgf.LatexManager.latex_header``
+- ``backend_pgf.NO_ESCAPE``
+- ``backend_pgf.common_texification``
+- ``backend_pgf.get_fontspec``
+- ``backend_pgf.get_preamble``
+- ``backend_pgf.re_mathsep``
+- ``backend_pgf.writeln``
+- ``backend_ps.convert_psfrags``
+- ``backend_ps.quote_ps_string``; vendor the code of the similarly named
+ private functions if you rely on it.
+- ``backend_qt.qApp``; use ``QtWidgets.QApplication.instance()`` instead.
+- ``backend_svg.escape_attrib``; vendor the code of the similarly named private
+ functions if you rely on it.
+- ``backend_svg.escape_cdata``; vendor the code of the similarly named private
+ functions if you rely on it.
+- ``backend_svg.escape_comment``; vendor the code of the similarly named
+ private functions if you rely on it.
+- ``backend_svg.short_float_fmt``; vendor the code of the similarly named
+ private functions if you rely on it.
+- ``backend_svg.generate_transform`` and ``backend_svg.generate_css``
+- ``backend_tk.NavigationToolbar2Tk.lastrect`` and
+ ``backend_tk.RubberbandTk.lastrect``
+- ``backend_tk.NavigationToolbar2Tk.window``; use ``toolbar.master`` instead.
+- ``backend_tools.ToolBase.destroy``; To run code upon tool removal, connect to
+ the ``tool_removed_event`` event.
+- ``backend_wx.RendererWx.offset_text_height``
+- ``backend_wx.error_msg_wx``
+
+- ``FigureCanvasBase.pick``; directly call `.Figure.pick`, which has taken over
+ the responsibility of checking the canvas widget lock as well.
+- ``FigureCanvasBase.resize``, which has no effect; use
+ ``FigureManagerBase.resize`` instead.
+
+- ``FigureManagerMac.close``
+
+- ``FigureFrameWx.sizer``; use ``frame.GetSizer()`` instead.
+- ``FigureFrameWx.figmgr`` and ``FigureFrameWx.get_figure_manager``; use
+ ``frame.canvas.manager`` instead.
+- ``FigureFrameWx.num``; use ``frame.canvas.manager.num`` instead.
+- ``FigureFrameWx.toolbar``; use ``frame.GetToolBar()`` instead.
+- ``FigureFrameWx.toolmanager``; use ``frame.canvas.manager.toolmanager``
+ instead.
+
+Modules
+~~~~~~~
+
+The modules ``matplotlib.afm``, ``matplotlib.docstring``,
+``matplotlib.fontconfig_pattern``, ``matplotlib.tight_bbox``,
+``matplotlib.tight_layout``, and ``matplotlib.type1font`` are considered
+internal and public access is deprecated.
+
+``checkdep_usetex`` deprecated
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+This method was only intended to disable tests in case no latex install was
+found. As such, it is considered to be private and for internal use only.
+
+Please vendor the code if you need this.
+
+``date_ticker_factory`` deprecated
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The ``date_ticker_factory`` method in the `matplotlib.dates` module is
+deprecated. Instead use `~.AutoDateLocator` and `~.AutoDateFormatter` for a
+more flexible and scalable locator and formatter.
+
+If you need the exact ``date_ticker_factory`` behavior, please copy the code.
+
+``dviread.find_tex_file`` will raise ``FileNotFoundError``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+In the future, ``dviread.find_tex_file`` will raise a `FileNotFoundError` for
+missing files. Previously, it would return an empty string in such cases.
+Raising an exception allows attaching a user-friendly message instead. During
+the transition period, a warning is raised.
+
+``transforms.Affine2D.identity()``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+... is deprecated in favor of directly calling the `.Affine2D` constructor with
+no arguments.
+
+Deprecations in ``testing.decorators``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The unused class ``CleanupTestCase`` and decorator ``cleanup`` are deprecated
+and will be removed. Vendor the code, including the private function
+``_cleanup_cm``.
+
+The function ``check_freetype_version`` is considered internal and deprecated.
+Vendor the code of the private function ``_check_freetype_version``.
+
+``text.get_rotation()``
+~~~~~~~~~~~~~~~~~~~~~~~
+
+... is deprecated with no replacement. Copy the original implementation if
+needed.
+
+Miscellaneous internals
+~~~~~~~~~~~~~~~~~~~~~~~
+
+- ``axes_grid1.axes_size.AddList``; use ``sum(sizes, start=Fixed(0))`` (for
+ example) to sum multiple size objects.
+- ``axes_size.Padded``; use ``size + pad`` instead
+- ``axes_size.SizeFromFunc``, ``axes_size.GetExtentHelper``
+- ``AxisArtistHelper.delta1`` and ``AxisArtistHelper.delta2``
+- ``axislines.GridHelperBase.new_gridlines`` and
+ ``axislines.Axes.new_gridlines``
+- ``cbook.maxdict``; use the standard library ``functools.lru_cache`` instead.
+- ``_DummyAxis.dataLim`` and ``_DummyAxis.viewLim``; use
+ ``get_data_interval()``, ``set_data_interval()``, ``get_view_interval()``,
+ and ``set_view_interval()`` instead.
+- ``GridSpecBase.get_grid_positions(..., raw=True)``
+- ``ImageMagickBase.delay`` and ``ImageMagickBase.output_args``
+- ``MathtextBackend``, ``MathtextBackendAgg``, ``MathtextBackendPath``,
+ ``MathTextWarning``
+- ``TexManager.get_font_config``; it previously returned an internal hashed key
+ for used for caching purposes.
+- ``TextToPath.get_texmanager``; directly construct a `.texmanager.TexManager`
+ instead.
+- ``ticker.is_close_to_int``; use ``math.isclose(x, round(x))`` instead.
+- ``ticker.is_decade``; use ``y = numpy.log(x)/numpy.log(base);
+ numpy.isclose(y, numpy.round(y))`` instead.
diff --git a/doc/api/prev_api_changes/api_changes_3.6.0/development.rst b/doc/api/prev_api_changes/api_changes_3.6.0/development.rst
new file mode 100644
index 000000000000..fb9f1f3e21c5
--- /dev/null
+++ b/doc/api/prev_api_changes/api_changes_3.6.0/development.rst
@@ -0,0 +1,42 @@
+Development changes
+-------------------
+
+Increase to minimum supported versions of dependencies
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+For Matplotlib 3.6, the :ref:`minimum supported versions ` are
+being bumped:
+
++------------+-----------------+---------------+
+| Dependency | min in mpl3.5 | min in mpl3.6 |
++============+=================+===============+
+| Python | 3.7 | 3.8 |
++------------+-----------------+---------------+
+| NumPy | 1.17 | 1.19 |
++------------+-----------------+---------------+
+
+This is consistent with our :ref:`min_deps_policy` and `NEP29
+`__
+
+Build setup options changes
+~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The ``gui_support.macosx`` setup option has been renamed to
+``packages.macosx``.
+
+New wheel architectures
+~~~~~~~~~~~~~~~~~~~~~~~
+
+Wheels have been added for:
+
+- Python 3.11
+- PyPy 3.8 and 3.9
+
+Increase to required versions of documentation dependencies
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+`sphinx`_ >= 3.0 and `numpydoc`_ >= 1.0 are now required for building the
+documentation.
+
+.. _numpydoc: https://pypi.org/project/numpydoc/
+.. _sphinx: https://pypi.org/project/Sphinx/
diff --git a/doc/api/prev_api_changes/api_changes_3.6.0/removals.rst b/doc/api/prev_api_changes/api_changes_3.6.0/removals.rst
new file mode 100644
index 000000000000..b261fdb30596
--- /dev/null
+++ b/doc/api/prev_api_changes/api_changes_3.6.0/removals.rst
@@ -0,0 +1,222 @@
+Removals
+--------
+
+The following deprecated APIs have been removed:
+
+Removed behaviour
+~~~~~~~~~~~~~~~~~
+
+Stricter validation of function parameters
+..........................................
+
+- Unknown keyword arguments to `.Figure.savefig`, `.pyplot.savefig`, and the
+ ``FigureCanvas.print_*`` methods now raise a `TypeError`, instead of being
+ ignored.
+- Extra parameters to the `~.axes.Axes` constructor, i.e., those other than
+ *fig* and *rect*, are now keyword only.
+- Passing arguments not specifically listed in the signatures of
+ `.Axes3D.plot_surface` and `.Axes3D.plot_wireframe` is no longer supported;
+ pass any extra arguments as keyword arguments instead.
+- Passing positional arguments to `.LineCollection` has been removed; use
+ specific keyword argument names now.
+
+``imread`` no longer accepts URLs
+.................................
+
+Passing a URL to `~.pyplot.imread()` has been removed. Please open the URL for
+reading and directly use the Pillow API (e.g.,
+``PIL.Image.open(urllib.request.urlopen(url))``, or
+``PIL.Image.open(io.BytesIO(requests.get(url).content))``) instead.
+
+MarkerStyle is immutable
+........................
+
+The methods ``MarkerStyle.set_fillstyle`` and ``MarkerStyle.set_marker`` have
+been removed. Create a new `.MarkerStyle` with the respective parameters
+instead.
+
+Passing bytes to ``FT2Font.set_text``
+.....................................
+
+... is no longer supported. Pass `str` instead.
+
+Support for passing tool names to ``ToolManager.add_tool``
+..........................................................
+
+... has been removed. The second parameter to `.ToolManager.add_tool` must now
+always be a tool class.
+
+``backend_tools.ToolFullScreen`` now inherits from ``ToolBase``, not from ``ToolToggleBase``
+............................................................................................
+
+`.ToolFullScreen` can only switch between the non-fullscreen and fullscreen
+states, but not unconditionally put the window in a given state; hence the
+``enable`` and ``disable`` methods were misleadingly named. Thus, the
+`.ToolToggleBase`-related API (``enable``, ``disable``, etc.) was removed.
+
+``BoxStyle._Base`` and ``transmute`` method of box styles
+.........................................................
+
+... have been removed. Box styles implemented as classes no longer need to
+inherit from a base class.
+
+Loaded modules logging
+......................
+
+The list of currently loaded modules is no longer logged at the DEBUG level at
+Matplotlib import time, because it can produce extensive output and make other
+valuable DEBUG statements difficult to find. If you were relying on this
+output, please arrange for your own logging (the built-in `sys.modules` can be
+used to get the currently loaded modules).
+
+Modules
+~~~~~~~
+
+- The ``cbook.deprecation`` module has been removed from the public API as it
+ is considered internal.
+- The ``mpl_toolkits.axes_grid`` module has been removed. All functionality from
+ ``mpl_toolkits.axes_grid`` can be found in either `mpl_toolkits.axes_grid1`
+ or `mpl_toolkits.axisartist`. Axes classes from ``mpl_toolkits.axes_grid``
+ based on ``Axis`` from `mpl_toolkits.axisartist` can be found in
+ `mpl_toolkits.axisartist`.
+
+Classes, methods and attributes
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The following module-level classes/variables have been removed:
+
+- ``cm.cmap_d``
+- ``colorbar.colorbar_doc``, ``colorbar.colorbar_kw_doc``
+- ``ColorbarPatch``
+- ``mathtext.Fonts`` and all its subclasses
+- ``mathtext.FontConstantsBase`` and all its subclasses
+- ``mathtext.latex_to_bakoma``, ``mathtext.latex_to_cmex``,
+ ``mathtext.latex_to_standard``
+- ``mathtext.MathtextBackendPdf``, ``mathtext.MathtextBackendPs``,
+ ``mathtext.MathtextBackendSvg``, ``mathtext.MathtextBackendCairo``; use
+ `.MathtextBackendPath` instead.
+- ``mathtext.Node`` and all its subclasses
+- ``mathtext.NUM_SIZE_LEVELS``
+- ``mathtext.Parser``
+- ``mathtext.Ship``
+- ``mathtext.SHRINK_FACTOR`` and ``mathtext.GROW_FACTOR``
+- ``mathtext.stix_virtual_fonts``,
+- ``mathtext.tex2uni``
+- ``backend_pgf.TmpDirCleaner``
+- ``backend_ps.GraphicsContextPS``; use ``GraphicsContextBase`` instead.
+- ``backend_wx.IDLE_DELAY``
+- ``axes_grid1.parasite_axes.ParasiteAxesAuxTransBase``; use
+ `.ParasiteAxesBase` instead.
+- ``axes_grid1.parasite_axes.ParasiteAxesAuxTrans``; use `.ParasiteAxes`
+ instead.
+
+The following class attributes have been removed:
+
+- ``Line2D.validCap`` and ``Line2D.validJoin``; validation is centralized in
+ ``rcsetup``.
+- ``Patch.validCap`` and ``Patch.validJoin``; validation is centralized in
+ ``rcsetup``.
+- ``renderer.M``, ``renderer.eye``, ``renderer.vvec``,
+ ``renderer.get_axis_position`` placed on the Renderer during 3D Axes draw;
+ these attributes are all available via `.Axes3D`, which can be accessed via
+ ``self.axes`` on all `.Artist`\s.
+- ``RendererPdf.mathtext_parser``, ``RendererPS.mathtext_parser``,
+ ``RendererSVG.mathtext_parser``, ``RendererCairo.mathtext_parser``
+- ``StandardPsFonts.pswriter``
+- ``Subplot.figbox``; use `.Axes.get_position` instead.
+- ``Subplot.numRows``; ``ax.get_gridspec().nrows`` instead.
+- ``Subplot.numCols``; ``ax.get_gridspec().ncols`` instead.
+- ``SubplotDivider.figbox``
+- ``cids``, ``cnt``, ``observers``, ``change_observers``, and
+ ``submit_observers`` on all `.Widget`\s
+
+The following class methods have been removed:
+
+- ``Axis.cla()``; use `.Axis.clear` instead.
+- ``RadialAxis.cla()`` and ``ThetaAxis.cla()``; use `.RadialAxis.clear` or
+ `.ThetaAxis.clear` instead.
+- ``Spine.cla()``; use `.Spine.clear` instead.
+- ``ContourLabeler.get_label_coords()``; there is no replacement as it was
+ considered an internal helper.
+- ``FancyArrowPatch.get_dpi_cor`` and ``FancyArrowPatch.set_dpi_cor``
+
+- ``FigureCanvas.get_window_title()`` and ``FigureCanvas.set_window_title()``;
+ use `.FigureManagerBase.get_window_title` or
+ `.FigureManagerBase.set_window_title` if using pyplot, or use GUI-specific
+ methods if embedding.
+- ``FigureManager.key_press()`` and ``FigureManager.button_press()``; trigger
+ the events directly on the canvas using
+ ``canvas.callbacks.process(event.name, event)`` for key and button events.
+
+- ``RendererAgg.get_content_extents()`` and
+ ``RendererAgg.tostring_rgba_minimized()``
+- ``NavigationToolbar2Wx.get_canvas()``
+
+- ``ParasiteAxesBase.update_viewlim()``; use ``ParasiteAxesBase.apply_aspect``
+ instead.
+- ``Subplot.get_geometry()``; use ``SubplotBase.get_subplotspec`` instead.
+- ``Subplot.change_geometry()``; use ``SubplotBase.set_subplotspec`` instead.
+- ``Subplot.update_params()``; this method did nothing.
+- ``Subplot.is_first_row()``; use ``ax.get_subplotspec().is_first_row``
+ instead.
+- ``Subplot.is_first_col()``; use ``ax.get_subplotspec().is_first_col``
+ instead.
+- ``Subplot.is_last_row()``; use ``ax.get_subplotspec().is_last_row`` instead.
+- ``Subplot.is_last_col()``; use ``ax.get_subplotspec().is_last_col`` instead.
+- ``SubplotDivider.change_geometry()``; use `.SubplotDivider.set_subplotspec`
+ instead.
+- ``SubplotDivider.get_geometry()``; use `.SubplotDivider.get_subplotspec`
+ instead.
+- ``SubplotDivider.update_params()``
+- ``get_depth``, ``parse``, ``to_mask``, ``to_rgba``, and ``to_png`` of
+ `.MathTextParser`; use `.mathtext.math_to_image` instead.
+
+- ``MovieWriter.cleanup()``; the cleanup logic is instead fully implemented in
+ `.MovieWriter.finish` and ``cleanup`` is no longer called.
+
+Functions
+~~~~~~~~~
+
+The following functions have been removed;
+
+- ``backend_template.new_figure_manager()``,
+ ``backend_template.new_figure_manager_given_figure()``, and
+ ``backend_template.draw_if_interactive()`` have been removed, as part of the
+ introduction of the simplified backend API.
+- Deprecation-related re-imports ``cbook.deprecated()``, and
+ ``cbook.warn_deprecated()``.
+- ``colorbar.colorbar_factory()``; use `.Colorbar` instead.
+ ``colorbar.make_axes_kw_doc()``
+- ``mathtext.Error()``
+- ``mathtext.ship()``
+- ``mathtext.tex2uni()``
+- ``axes_grid1.parasite_axes.parasite_axes_auxtrans_class_factory()``; use
+ `.parasite_axes_class_factory` instead.
+- ``sphinext.plot_directive.align()``; use
+ ``docutils.parsers.rst.directives.images.Image.align`` instead.
+
+Arguments
+~~~~~~~~~
+
+The following arguments have been removed:
+
+- *dpi* from ``print_ps()`` in the PS backend and ``print_pdf()`` in the PDF
+ backend. Instead, the methods will obtain the DPI from the ``savefig``
+ machinery.
+- *dpi_cor* from `~.FancyArrowPatch`
+- *minimum_descent* from ``TextArea``; it is now effectively always True
+- *origin* from ``FigureCanvasWx.gui_repaint()``
+- *project* from ``Line3DCollection.draw()``
+- *renderer* from `.Line3DCollection.do_3d_projection`,
+ `.Patch3D.do_3d_projection`, `.PathPatch3D.do_3d_projection`,
+ `.Path3DCollection.do_3d_projection`, `.Patch3DCollection.do_3d_projection`,
+ `.Poly3DCollection.do_3d_projection`
+- *resize_callback* from the Tk backend; use
+ ``get_tk_widget().bind('', ..., True)`` instead.
+- *return_all* from ``gridspec.get_position()``
+- Keyword arguments to ``gca()``; there is no replacement.
+
+rcParams
+~~~~~~~~
+
+The setting :rc:`ps.useafm` no longer has any effect on `matplotlib.mathtext`.
diff --git a/doc/api/prev_api_changes/api_changes_3.6.1.rst b/doc/api/prev_api_changes/api_changes_3.6.1.rst
new file mode 100644
index 000000000000..ad929d426885
--- /dev/null
+++ b/doc/api/prev_api_changes/api_changes_3.6.1.rst
@@ -0,0 +1,15 @@
+API Changes for 3.6.1
+=====================
+
+Deprecations
+------------
+
+Colorbars for orphaned mappables are deprecated, but no longer raise
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Before 3.6.0, Colorbars for mappables that do not have a parent Axes would
+steal space from the current Axes. 3.6.0 raised an error on this, but without a
+deprecation cycle. For 3.6.1 this is reverted; the current Axes is used, but a
+deprecation warning is shown instead. In this undetermined case, users and
+libraries should explicitly specify what Axes they want space to be stolen
+from: ``fig.colorbar(mappable, ax=plt.gca())``.
diff --git a/doc/api/prev_api_changes/api_changes_3.7.0.rst b/doc/api/prev_api_changes/api_changes_3.7.0.rst
new file mode 100644
index 000000000000..932a4ba34452
--- /dev/null
+++ b/doc/api/prev_api_changes/api_changes_3.7.0.rst
@@ -0,0 +1,14 @@
+API Changes for 3.7.0
+=====================
+
+.. contents::
+ :local:
+ :depth: 1
+
+.. include:: /api/prev_api_changes/api_changes_3.7.0/behaviour.rst
+
+.. include:: /api/prev_api_changes/api_changes_3.7.0/deprecations.rst
+
+.. include:: /api/prev_api_changes/api_changes_3.7.0/removals.rst
+
+.. include:: /api/prev_api_changes/api_changes_3.7.0/development.rst
diff --git a/doc/api/prev_api_changes/api_changes_3.7.0/behaviour.rst b/doc/api/prev_api_changes/api_changes_3.7.0/behaviour.rst
new file mode 100644
index 000000000000..6057bfa9af4c
--- /dev/null
+++ b/doc/api/prev_api_changes/api_changes_3.7.0/behaviour.rst
@@ -0,0 +1,136 @@
+Behaviour Changes
+-----------------
+
+All Axes have ``get_subplotspec`` and ``get_gridspec`` methods now, which returns None for Axes not positioned via a gridspec
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Previously, this method was only present for Axes positioned via a gridspec.
+Following this change, checking ``hasattr(ax, "get_gridspec")`` should now be
+replaced by ``ax.get_gridspec() is not None``. For compatibility with older
+Matplotlib releases, one can also check
+``hasattr(ax, "get_gridspec") and ax.get_gridspec() is not None``.
+
+``HostAxesBase.get_aux_axes`` now defaults to using the same base axes class as the host axes
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+If using an ``mpl_toolkits.axisartist``-based host Axes, the parasite Axes will
+also be based on ``mpl_toolkits.axisartist``. This behavior is consistent with
+``HostAxesBase.twin``, ``HostAxesBase.twinx``, and ``HostAxesBase.twiny``.
+
+``plt.get_cmap`` and ``matplotlib.cm.get_cmap`` return a copy
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Formerly, `~.pyplot.get_cmap` and `.cm.get_cmap` returned a global version of a
+`.Colormap`. This was prone to errors as modification of the colormap would
+propagate from one location to another without warning. Now, a new copy of the
+colormap is returned.
+
+``TrapezoidMapTriFinder`` uses different random number generator
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The random number generator used to determine the order of insertion of
+triangle edges in ``TrapezoidMapTriFinder`` has changed. This can result in a
+different triangle index being returned for a point that lies exactly on an
+edge between two triangles. This can also affect triangulation interpolation
+and refinement algorithms that use ``TrapezoidMapTriFinder``.
+
+``FuncAnimation(save_count=None)``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Passing ``save_count=None`` to `.FuncAnimation` no longer limits the number
+of frames to 100. Make sure that it either can be inferred from *frames*
+or provide an integer *save_count*.
+
+``CenteredNorm`` halfrange is not modified when vcenter changes
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Previously, the **halfrange** would expand in proportion to the
+amount that **vcenter** was moved away from either **vmin** or **vmax**.
+Now, the halfrange remains fixed when vcenter is changed, and **vmin** and
+**vmax** are updated based on the **vcenter** and **halfrange** values.
+
+For example, this is what the values were when changing vcenter previously.
+
+.. code-block::
+
+ norm = CenteredNorm(vcenter=0, halfrange=1)
+ # Move vcenter up by one
+ norm.vcenter = 1
+ # updates halfrange and vmax (vmin stays the same)
+ # norm.halfrange == 2, vmin == -1, vmax == 3
+
+and now, with that same example
+
+.. code-block::
+
+ norm = CenteredNorm(vcenter=0, halfrange=1)
+ norm.vcenter = 1
+ # updates vmin and vmax (halfrange stays the same)
+ # norm.halfrange == 1, vmin == 0, vmax == 2
+
+The **halfrange** can be set manually or ``norm.autoscale()``
+can be used to automatically set the limits after setting **vcenter**.
+
+``fig.subplot_mosaic`` no longer passes the ``gridspec_kw`` args to nested gridspecs.
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+For nested `.Figure.subplot_mosaic` layouts, it is almost always
+inappropriate for *gridspec_kw* arguments to be passed to lower nest
+levels, and these arguments are incompatible with the lower levels in
+many cases. This dictionary is no longer passed to the inner
+layouts. Users who need to modify *gridspec_kw* at multiple levels
+should use `.Figure.subfigures` to get nesting, and construct the
+inner layouts with `.Figure.subplots` or `.Figure.subplot_mosaic`.
+
+``HPacker`` alignment with **bottom** or **top** are now correct
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Previously, the **bottom** and **top** alignments were swapped.
+This has been corrected so that the alignments correspond appropriately.
+
+On Windows only fonts known to the registry will be discovered
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Previously, Matplotlib would recursively walk user and system font directories
+to discover fonts, however this lead to a number of undesirable behaviors
+including finding deleted fonts. Now Matplotlib will only find fonts that are
+known to the Windows registry.
+
+This means that any user installed fonts must go through the Windows font
+installer rather than simply being copied to the correct folder.
+
+This only impacts the set of fonts Matplotlib will consider when using
+`matplotlib.font_manager.findfont`. To use an arbitrary font, directly pass the
+path to a font as shown in
+:doc:`/gallery/text_labels_and_annotations/font_file`.
+
+``QuadMesh.set_array`` now always raises ``ValueError`` for inputs with incorrect shapes
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+It could previously also raise `TypeError` in some cases.
+
+``contour`` and ``contourf`` auto-select suitable levels when given boolean inputs
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+If the height array given to `.Axes.contour` or `.Axes.contourf` is of bool
+dtype and *levels* is not specified, *levels* now defaults to ``[0.5]`` for
+`~.Axes.contour` and ``[0, 0.5, 1]`` for `.Axes.contourf`.
+
+``contour`` no longer warns if no contour lines are drawn.
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+This can occur if the user explicitly passes a ``levels`` array with no values
+
+``AxesImage.set_extent`` now raises ``TypeError`` for unknown keyword arguments
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+It previously raised a `ValueError`.
+
+etween ``z.min()`` and ``z.max()``; or if ``z`` has the same value everywhere.
+
+Change of ``legend(loc="best")`` behavior
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The algorithm of the auto-legend locator has been tweaked to better handle
+non rectangular patches. Additional details on this change can be found in
+:ghissue:`9580` and :ghissue:`9598`.
diff --git a/doc/api/prev_api_changes/api_changes_3.7.0/deprecations.rst b/doc/api/prev_api_changes/api_changes_3.7.0/deprecations.rst
new file mode 100644
index 000000000000..dd6d9d8e0894
--- /dev/null
+++ b/doc/api/prev_api_changes/api_changes_3.7.0/deprecations.rst
@@ -0,0 +1,291 @@
+Deprecations
+------------
+
+``Axes`` subclasses should override ``clear`` instead of ``cla``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+For clarity, `.axes.Axes.clear` is now preferred over `.Axes.cla`. However, for
+backwards compatibility, the latter will remain as an alias for the former.
+
+For additional compatibility with third-party libraries, Matplotlib will
+continue to call the ``cla`` method of any `~.axes.Axes` subclasses if they
+define it. In the future, this will no longer occur, and Matplotlib will only
+call the ``clear`` method in `~.axes.Axes` subclasses.
+
+It is recommended to define only the ``clear`` method when on Matplotlib 3.6,
+and only ``cla`` for older versions.
+
+rcParams type
+~~~~~~~~~~~~~
+
+Relying on ``rcParams`` being a ``dict`` subclass is deprecated.
+
+Nothing will change for regular users because ``rcParams`` will continue to
+be dict-like (technically fulfill the ``MutableMapping`` interface).
+
+The `.RcParams` class does validation checking on calls to
+``.RcParams.__getitem__`` and ``.RcParams.__setitem__``. However, there are rare
+cases where we want to circumvent the validation logic and directly access the
+underlying data values. Previously, this could be accomplished via a call to
+the parent methods ``dict.__getitem__(rcParams, key)`` and
+``dict.__setitem__(rcParams, key, val)``.
+
+Matplotlib 3.7 introduces ``rcParams._set(key, val)`` and
+``rcParams._get(key)`` as a replacement to calling the parent methods. They are
+intentionally marked private to discourage external use; However, if direct
+`.RcParams` data access is needed, please switch from the dict functions to the
+new ``_get()`` and ``_set()``. Even though marked private, we guarantee API
+stability for these methods and they are subject to Matplotlib's API and
+deprecation policy.
+
+Please notify the Matplotlib developers if you rely on ``rcParams`` being a
+dict subclass in any other way, for which there is no migration path yet.
+
+Deprecation aliases in cbook
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The module ``matplotlib.cbook.deprecation`` was previously deprecated in
+Matplotlib 3.4, along with deprecation-related API in ``matplotlib.cbook``. Due
+to technical issues, ``matplotlib.cbook.MatplotlibDeprecationWarning`` and
+``matplotlib.cbook.mplDeprecation`` did not raise deprecation warnings on use.
+Changes in Python have now made it possible to warn when these aliases are
+being used.
+
+In order to avoid downstream breakage, these aliases will now warn, and their
+removal has been pushed from 3.6 to 3.8 to give time to notice said warnings.
+As replacement, please use `matplotlib.MatplotlibDeprecationWarning`.
+
+``draw_gouraud_triangle``
+~~~~~~~~~~~~~~~~~~~~~~~~~
+
+... is deprecated as in most backends this is a redundant call. Use
+`~.RendererBase.draw_gouraud_triangles` instead. A ``draw_gouraud_triangle``
+call in a custom `~matplotlib.artist.Artist` can readily be replaced as::
+
+ self.draw_gouraud_triangles(gc, points.reshape((1, 3, 2)),
+ colors.reshape((1, 3, 4)), trans)
+
+A `~.RendererBase.draw_gouraud_triangles` method can be implemented from an
+existing ``draw_gouraud_triangle`` method as::
+
+ transform = transform.frozen()
+ for tri, col in zip(triangles_array, colors_array):
+ self.draw_gouraud_triangle(gc, tri, col, transform)
+
+``matplotlib.pyplot.get_plot_commands``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+... is a pending deprecation. This is considered internal and no end-user
+should need it.
+
+``matplotlib.tri`` submodules are deprecated
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The ``matplotlib.tri.*`` submodules are deprecated. All functionality is
+available in ``matplotlib.tri`` directly and should be imported from there.
+
+Passing undefined *label_mode* to ``Grid``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+... is deprecated. This includes `mpl_toolkits.axes_grid1.axes_grid.Grid`,
+`mpl_toolkits.axes_grid1.axes_grid.AxesGrid`, and
+`mpl_toolkits.axes_grid1.axes_grid.ImageGrid` as well as the corresponding
+classes imported from `mpl_toolkits.axisartist.axes_grid`.
+
+Pass ``label_mode='keep'`` instead to get the previous behavior of not modifying labels.
+
+Colorbars for orphaned mappables are deprecated, but no longer raise
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Before 3.6.0, Colorbars for mappables that do not have a parent axes would
+steal space from the current Axes. 3.6.0 raised an error on this, but without
+a deprecation cycle. For 3.6.1 this is reverted, the current axes is used,
+but a deprecation warning is shown instead. In this undetermined case users
+and libraries should explicitly specify what axes they want space to be stolen
+from: ``fig.colorbar(mappable, ax=plt.gca())``.
+
+``Animation`` attributes
+~~~~~~~~~~~~~~~~~~~~~~~~
+
+The attributes ``repeat`` of `.TimedAnimation` and subclasses and
+``save_count`` of `.FuncAnimation` are considered private and deprecated.
+
+``contour.ClabelText`` and ``ContourLabeler.set_label_props``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+... are deprecated.
+
+Use ``Text(..., transform_rotates_text=True)`` as a replacement for
+``contour.ClabelText(...)`` and ``text.set(text=text, color=color,
+fontproperties=labeler.labelFontProps, clip_box=labeler.axes.bbox)`` as a
+replacement for the ``ContourLabeler.set_label_props(label, text, color)``.
+
+``ContourLabeler`` attributes
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The ``labelFontProps``, ``labelFontSizeList``, and ``labelTextsList``
+attributes of `.ContourLabeler` have been deprecated. Use the ``labelTexts``
+attribute and the font properties of the corresponding text objects instead.
+
+``backend_ps.PsBackendHelper`` and ``backend_ps.ps_backend_helper``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+... are deprecated with no replacement.
+
+``backend_webagg.ServerThread`` is deprecated
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+... with no replacement.
+
+``parse_fontconfig_pattern`` will no longer ignore unknown constant names
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Previously, in a fontconfig pattern like ``DejaVu Sans:foo``, the unknown
+``foo`` constant name would be silently ignored. This now raises a warning,
+and will become an error in the future.
+
+``BufferRegion.to_string`` and ``BufferRegion.to_string_argb``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+... are deprecated. Use ``np.asarray(buffer_region)`` to get an array view on
+a buffer region without making a copy; to convert that view from RGBA (the
+default) to ARGB, use ``np.take(..., [2, 1, 0, 3], axis=2)``.
+
+``num2julian``, ``julian2num`` and ``JULIAN_OFFSET``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+... of the `.dates` module are deprecated without replacements. These are
+undocumented and not exported. If you rely on these, please make a local copy.
+
+``unit_cube``, ``tunit_cube``, and ``tunit_edges``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+... of `.Axes3D` are deprecated without replacements. If you rely on them,
+please copy the code of the corresponding private function (name starting
+with ``_``).
+
+Most arguments to widgets have been made keyword-only
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Passing all but the very few first arguments positionally in the constructors
+of Widgets is deprecated. Most arguments will become keyword-only in a future
+version.
+
+``SimpleEvent``
+~~~~~~~~~~~~~~~
+
+The ``SimpleEvent`` nested class (previously accessible via the public
+subclasses of ``ConnectionStyle._Base``, such as `.ConnectionStyle.Arc`, has
+been deprecated.
+
+``RadioButtons.circles``
+~~~~~~~~~~~~~~~~~~~~~~~~
+
+... is deprecated. (RadioButtons now draws itself using `~.Axes.scatter`.)
+
+``CheckButtons.rectangles`` and ``CheckButtons.lines``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+``CheckButtons.rectangles`` and ``CheckButtons.lines`` are deprecated.
+(``CheckButtons`` now draws itself using `~.Axes.scatter`.)
+
+``OffsetBox.get_extent_offsets`` and ``OffsetBox.get_extent``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+... are deprecated; these methods are also deprecated on all subclasses of
+`.OffsetBox`.
+
+To get the offsetbox extents, instead of ``get_extent``, use
+`.OffsetBox.get_bbox`, which directly returns a `.Bbox` instance.
+
+To also get the child offsets, instead of ``get_extent_offsets``, separately
+call `~.OffsetBox.get_offset` on each children after triggering a draw.
+
+``legend.legendHandles``
+~~~~~~~~~~~~~~~~~~~~~~~~
+
+... was undocumented and has been renamed to ``legend_handles``. Using ``legendHandles`` is deprecated.
+
+``ticklabels`` parameter of `.Axis.set_ticklabels` renamed to ``labels``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+``offsetbox.bbox_artist``
+~~~~~~~~~~~~~~~~~~~~~~~~~
+
+... is deprecated. This is just a wrapper to call `.patches.bbox_artist` if a
+flag is set in the file, so use that directly if you need the behavior.
+
+``Quiver.quiver_doc`` and ``Barbs.barbs_doc``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+... are deprecated. These are the doc-string and should not be accessible as
+a named class member.
+
+Deprecate unused parameter *x* to ``TextBox.begin_typing``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+This parameter was unused in the method, but was a required argument.
+
+Deprecation of top-level cmap registration and access functions in ``mpl.cm``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+As part of a `multi-step process
+`_ we are refactoring
+the global state for managing the registered colormaps.
+
+In Matplotlib 3.5 we added a `.ColormapRegistry` class and exposed an instance
+at the top level as ``matplotlib.colormaps``. The existing top level functions
+in `matplotlib.cm` (``get_cmap``, ``register_cmap``, ``unregister_cmap``) were
+changed to be aliases around the same instance. In Matplotlib 3.6 we have
+marked those top level functions as pending deprecation.
+
+In Matplotlib 3.7, the following functions have been marked for deprecation:
+
+- ``matplotlib.cm.get_cmap``; use ``matplotlib.colormaps[name]`` instead if you
+ have a `str`.
+
+ **Added 3.6.1** Use `matplotlib.cm.ColormapRegistry.get_cmap` if you
+ have a string, `None` or a `matplotlib.colors.Colormap` object that you want
+ to convert to a `matplotlib.colors.Colormap` instance.
+- ``matplotlib.cm.register_cmap``; use `matplotlib.colormaps.register
+ <.ColormapRegistry.register>` instead
+- ``matplotlib.cm.unregister_cmap``; use `matplotlib.colormaps.unregister
+ <.ColormapRegistry.unregister>` instead
+- ``matplotlib.pyplot.register_cmap``; use `matplotlib.colormaps.register
+ <.ColormapRegistry.register>` instead
+
+The `matplotlib.pyplot.get_cmap` function will stay available for backward
+compatibility.
+
+``BrokenBarHCollection`` is deprecated
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+It was just a thin wrapper inheriting from `.PolyCollection`;
+`~.Axes.broken_barh` has now been changed to return a `.PolyCollection`
+instead.
+
+The ``BrokenBarHCollection.span_where`` helper is likewise deprecated; for the
+duration of the deprecation it has been moved to the parent `.PolyCollection`
+class. Use `~.Axes.fill_between` as a replacement; see
+:doc:`/gallery/lines_bars_and_markers/span_regions` for an example.
+
+Passing inconsistent ``loc`` and ``nth_coord`` to axisartist helpers
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Trying to construct for example a "top y-axis" or a "left x-axis" is now
+deprecated.
+
+``passthru_pt``
+~~~~~~~~~~~~~~~
+
+This attribute of ``AxisArtistHelper``\s is deprecated.
+
+``axes3d.vvec``, ``axes3d.eye``, ``axes3d.sx``, and ``axes3d.sy``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+... are deprecated without replacement.
+
+``Line2D``
+~~~~~~~~~~
+
+When creating a Line2D or using `.Line2D.set_xdata` and `.Line2D.set_ydata`,
+passing x/y data as non sequence is deprecated.
diff --git a/doc/api/prev_api_changes/api_changes_3.7.0/development.rst b/doc/api/prev_api_changes/api_changes_3.7.0/development.rst
new file mode 100644
index 000000000000..c2ae35970524
--- /dev/null
+++ b/doc/api/prev_api_changes/api_changes_3.7.0/development.rst
@@ -0,0 +1,49 @@
+Development changes
+-------------------
+
+
+Windows wheel runtime bundling
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Wheels built for Windows now bundle the MSVC runtime DLL ``msvcp140.dll``. This
+enables importing Matplotlib on systems that do not have the runtime installed.
+
+
+Increase to minimum supported versions of dependencies
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+
+For Matplotlib 3.7, the :ref:`minimum supported versions ` are
+being bumped:
+
++------------+-----------------+---------------+
+| Dependency | min in mpl3.6 | min in mpl3.7 |
++============+=================+===============+
+| NumPy | 1.19 | 1.20 |
++------------+-----------------+---------------+
+| pyparsing | 2.2.1 | 2.3.1 |
++------------+-----------------+---------------+
+| Qt | | 5.10 |
++------------+-----------------+---------------+
+
+- There are no wheels or conda packages that support both Qt 5.9 (or older) and
+ Python 3.8 (or newer).
+
+This is consistent with our :ref:`min_deps_policy` and `NEP29
+`__
+
+
+New dependencies
+~~~~~~~~~~~~~~~~
+
+* `importlib-resources `_
+ (>= 3.2.0; only required on Python < 3.10)
+
+Maximum line length increased to 88 characters
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The maximum line length for new contributions has been extended from 79 characters to
+88 characters.
+This change provides an extra 9 characters to allow code which is a single idea to fit
+on fewer lines (often a single line).
+The chosen length is the same as `black `_.
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
new file mode 100644
index 000000000000..c8f499666525
--- /dev/null
+++ b/doc/api/prev_api_changes/api_changes_3.7.0/removals.rst
@@ -0,0 +1,369 @@
+Removals
+--------
+
+``epoch2num`` and ``num2epoch`` are removed
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+These methods convert from unix timestamps to matplotlib floats, but are not
+used internally to Matplotlib, and should not be needed by end users. To
+convert a unix timestamp to datetime, simply use
+`datetime.datetime.utcfromtimestamp`, or to use NumPy `~numpy.datetime64`
+``dt = np.datetime64(e*1e6, 'us')``.
+
+Locator and Formatter wrapper methods
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The ``set_view_interval``, ``set_data_interval`` and ``set_bounds`` methods of
+`.Locator`\s and `.Formatter`\s (and their common base class, TickHelper) are
+removed. Directly manipulate the view and data intervals on the underlying
+axis instead.
+
+Interactive cursor details
+~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Setting a mouse cursor on a window has been moved from the toolbar to the
+canvas. Consequently, several implementation details on toolbars and within
+backends have been removed.
+
+``NavigationToolbar2.set_cursor`` and ``backend_tools.SetCursorBase.set_cursor``
+................................................................................
+
+Instead, use the `.FigureCanvasBase.set_cursor` method on the canvas (available
+as the ``canvas`` attribute on the toolbar or the Figure.)
+
+``backend_tools.SetCursorBase`` and subclasses
+..............................................
+
+``backend_tools.SetCursorBase`` was subclassed to provide backend-specific
+implementations of ``set_cursor``. As that is now removed, the subclassing
+is no longer necessary. Consequently, the following subclasses are also
+removed:
+
+- ``matplotlib.backends.backend_gtk3.SetCursorGTK3``
+- ``matplotlib.backends.backend_qt5.SetCursorQt``
+- ``matplotlib.backends._backend_tk.SetCursorTk``
+- ``matplotlib.backends.backend_wx.SetCursorWx``
+
+Instead, use the `.backend_tools.ToolSetCursor` class.
+
+``cursord`` in GTK and wx backends
+..................................
+
+The ``backend_gtk3.cursord`` and ``backend_wx.cursord`` dictionaries are
+removed. This makes the GTK module importable on headless environments.
+
+``auto_add_to_figure=True`` for ``Axes3D``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+... is no longer supported. Instead use ``fig.add_axes(ax)``.
+
+The first parameter of ``Axes.grid`` and ``Axis.grid`` has been renamed to *visible*
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The parameter was previously named *b*. This name change only matters if that
+parameter was passed using a keyword argument, e.g. ``grid(b=False)``.
+
+Removal of deprecations in the Selector widget API
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+RectangleSelector and EllipseSelector
+.....................................
+
+The *drawtype* keyword argument to `~matplotlib.widgets.RectangleSelector` is
+removed. From now on, the only behaviour will be ``drawtype='box'``.
+
+Support for ``drawtype=line`` is removed altogether. As a
+result, the *lineprops* keyword argument to
+`~matplotlib.widgets.RectangleSelector` is also removed.
+
+To retain the behaviour of ``drawtype='none'``, use ``rectprops={'visible':
+False}`` to make the drawn `~matplotlib.patches.Rectangle` invisible.
+
+Cleaned up attributes and arguments are:
+
+- The ``active_handle`` attribute has been privatized and removed.
+- The ``drawtype`` attribute has been privatized and removed.
+- The ``eventpress`` attribute has been privatized and removed.
+- The ``eventrelease`` attribute has been privatized and removed.
+- The ``interactive`` attribute has been privatized and removed.
+- The *marker_props* argument is removed, use *handle_props* instead.
+- The *maxdist* argument is removed, use *grab_range* instead.
+- The *rectprops* argument is removed, use *props* instead.
+- The ``rectprops`` attribute has been privatized and removed.
+- The ``state`` attribute has been privatized and removed.
+- The ``to_draw`` attribute has been privatized and removed.
+
+PolygonSelector
+...............
+
+- The *line* attribute is removed. If you want to change the selector artist
+ properties, use the ``set_props`` or ``set_handle_props`` methods.
+- The *lineprops* argument is removed, use *props* instead.
+- The *markerprops* argument is removed, use *handle_props* instead.
+- The *maxdist* argument and attribute is removed, use *grab_range* instead.
+- The *vertex_select_radius* argument and attribute is removed, use
+ *grab_range* instead.
+
+SpanSelector
+............
+
+- The ``active_handle`` attribute has been privatized and removed.
+- The ``eventpress`` attribute has been privatized and removed.
+- The ``eventrelease`` attribute has been privatized and removed.
+- The ``pressv`` attribute has been privatized and removed.
+- The ``prev`` attribute has been privatized and removed.
+- The ``rect`` attribute has been privatized and removed.
+- The *rectprops* parameter has been renamed to *props*.
+- The ``rectprops`` attribute has been privatized and removed.
+- The *span_stays* parameter has been renamed to *interactive*.
+- The ``span_stays`` attribute has been privatized and removed.
+- The ``state`` attribute has been privatized and removed.
+
+LassoSelector
+.............
+
+- The *lineprops* argument is removed, use *props* instead.
+- The ``onpress`` and ``onrelease`` methods are removed. They are straight
+ aliases for ``press`` and ``release``.
+- The ``matplotlib.widgets.TextBox.DIST_FROM_LEFT`` attribute has been
+ removed. It was marked as private in 3.5.
+
+``backend_template.show``
+~~~~~~~~~~~~~~~~~~~~~~~~~
+... has been removed, in order to better demonstrate the new backend definition
+API.
+
+Unused positional parameters to ``print_`` methods
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+None of the ``print_`` methods implemented by canvas subclasses used
+positional arguments other that the first (the output filename or file-like),
+so these extra parameters are removed.
+
+``QuadMesh`` signature
+~~~~~~~~~~~~~~~~~~~~~~
+
+The `.QuadMesh` signature ::
+
+ def __init__(meshWidth, meshHeight, coordinates,
+ antialiased=True, shading='flat', **kwargs)
+
+is removed and replaced by the new signature ::
+
+ def __init__(coordinates, *, antialiased=True, shading='flat', **kwargs)
+
+In particular:
+
+- The *coordinates* argument must now be a (M, N, 2) array-like. Previously,
+ the grid shape was separately specified as (*meshHeight* + 1, *meshWidth* +
+ 1) and *coordinates* could be an array-like of any shape with M * N * 2
+ elements.
+- All parameters except *coordinates* are keyword-only now.
+
+Expiration of ``FancyBboxPatch`` deprecations
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The `.FancyBboxPatch` constructor no longer accepts the *bbox_transmuter*
+parameter, nor can the *boxstyle* parameter be set to "custom" -- instead,
+directly set *boxstyle* to the relevant boxstyle instance. The
+*mutation_scale* and *mutation_aspect* parameters have also become
+keyword-only.
+
+The *mutation_aspect* parameter is now handled internally and no longer passed
+to the boxstyle callables when mutating the patch path.
+
+Testing support
+~~~~~~~~~~~~~~~
+
+``matplotlib.test()`` has been removed
+......................................
+
+Run tests using ``pytest`` from the commandline instead. The variable
+``matplotlib.default_test_modules`` was only used for ``matplotlib.test()`` and
+is thus removed as well.
+
+To test an installed copy, be sure to specify both ``matplotlib`` and
+``mpl_toolkits`` with ``--pyargs``::
+
+ python -m pytest --pyargs matplotlib.tests mpl_toolkits.tests
+
+See :ref:`testing` for more details.
+
+Auto-removal of grids by `~.Axes.pcolor` and `~.Axes.pcolormesh`
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+`~.Axes.pcolor` and `~.Axes.pcolormesh` previously remove any visible axes
+major grid. This behavior is removed; please explicitly call ``ax.grid(False)``
+to remove the grid.
+
+Modification of ``Axes`` children sublists
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+See :ref:`Behavioural API Changes 3.5 - Axes children combined` for more
+information; modification of the following sublists is no longer supported:
+
+* ``Axes.artists``
+* ``Axes.collections``
+* ``Axes.images``
+* ``Axes.lines``
+* ``Axes.patches``
+* ``Axes.tables``
+* ``Axes.texts``
+
+To remove an Artist, use its `.Artist.remove` method. To add an Artist, use the
+corresponding ``Axes.add_*`` method.
+
+Passing incorrect types to ``Axes.add_*`` methods
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The following ``Axes.add_*`` methods will now raise if passed an unexpected
+type. See their documentation for the types they expect.
+
+- `.Axes.add_collection`
+- `.Axes.add_image`
+- `.Axes.add_line`
+- `.Axes.add_patch`
+- `.Axes.add_table`
+
+
+``ConversionInterface.convert`` no longer accepts unitless values
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Previously, custom subclasses of `.units.ConversionInterface` needed to
+implement a ``convert`` method that not only accepted instances of the unit,
+but also unitless values (which are passed through as is). This is no longer
+the case (``convert`` is never called with a unitless value), and such support
+in ``.StrCategoryConverter`` is removed. Likewise, the
+``.ConversionInterface.is_numlike`` helper is removed.
+
+Consider calling `.Axis.convert_units` instead, which still supports unitless
+values.
+
+
+Normal list of `.Artist` objects now returned by `.HandlerLine2D.create_artists`
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+For Matplotlib 3.5 and 3.6 a proxy list was returned that simulated the return
+of `.HandlerLine2DCompound.create_artists`. Now a list containing only the
+single artist is return.
+
+
+rcParams will no longer cast inputs to str
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+rcParams that expect a (non-pathlike) str no longer cast non-str inputs using
+`str`. This will avoid confusing errors in subsequent code if e.g. a list input
+gets implicitly cast to a str.
+
+Case-insensitive scales
+~~~~~~~~~~~~~~~~~~~~~~~
+
+Previously, scales could be set case-insensitively (e.g.,
+``set_xscale("LoG")``). Now all builtin scales use lowercase names.
+
+Support for ``nx1 = None`` or ``ny1 = None`` in ``AxesLocator`` and ``Divider.locate``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+In `.axes_grid1.axes_divider`, various internal APIs no longer supports
+passing ``nx1 = None`` or ``ny1 = None`` to mean ``nx + 1`` or ``ny + 1``, in
+preparation for a possible future API which allows indexing and slicing of
+dividers (possibly ``divider[a:b] == divider.new_locator(a, b)``, but also
+``divider[a:] == divider.new_locator(a, )``). The user-facing
+`.Divider.new_locator` API is unaffected -- it correctly normalizes ``nx1 =
+None`` and ``ny1 = None`` as needed.
+
+
+change signature of ``.FigureCanvasBase.enter_notify_event``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The *xy* parameter is now required and keyword only. This was deprecated in
+3.0 and originally slated to be removed in 3.5.
+
+``Colorbar`` tick update parameters
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The *update_ticks* parameter of `.Colorbar.set_ticks` and
+`.Colorbar.set_ticklabels` was ignored since 3.5 and has been removed.
+
+plot directive removals
+~~~~~~~~~~~~~~~~~~~~~~~
+
+The public methods:
+
+- ``matplotlib.sphinxext.split_code_at_show``
+- ``matplotlib.sphinxext.unescape_doctest``
+- ``matplotlib.sphinxext.run_code``
+
+have been removed.
+
+The deprecated *encoding* option to the plot directive has been removed.
+
+Miscellaneous removals
+~~~~~~~~~~~~~~~~~~~~~~
+
+- ``is_url`` and ``URL_REGEX`` are removed. (They were previously defined in
+ the toplevel :mod:`matplotlib` module.)
+- The ``ArrowStyle.beginarrow`` and ``ArrowStyle.endarrow`` attributes are
+ removed; use the ``arrow`` attribute to define the desired heads and tails
+ of the arrow.
+- ``backend_pgf.LatexManager.str_cache`` is removed.
+- ``backends.qt_compat.ETS`` and ``backends.qt_compat.QT_RC_MAJOR_VERSION`` are
+ removed, with no replacement.
+- The ``blocking_input`` module is removed. Instead, use
+ ``canvas.start_event_loop()`` and ``canvas.stop_event_loop()`` while
+ connecting event callbacks as needed.
+- ``cbook.report_memory`` is removed; use ``psutil.virtual_memory`` instead.
+- ``cm.LUTSIZE`` is removed. Use :rc:`image.lut` instead. This value only
+ affects colormap quantization levels for default colormaps generated at
+ module import time.
+- ``Colorbar.patch`` is removed; this attribute was not correctly updated
+ anymore.
+- ``ContourLabeler.get_label_width`` is removed.
+- ``Dvi.baseline`` is removed (with no replacement).
+- 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
+ display coordinates can still be obtained, as for other patches, using
+ ``patch.get_transform().transform_path(patch.get_path())``.
+- The ``font_manager.win32InstalledFonts`` and
+ ``font_manager.get_fontconfig_fonts`` helper functions are removed.
+- All parameters of ``imshow`` starting from *aspect* are keyword-only.
+- ``QuadMesh.convert_mesh_to_paths`` and ``QuadMesh.convert_mesh_to_triangles``
+ are removed. ``QuadMesh.get_paths()`` can be used as an alternative for the
+ former; there is no replacement for the latter.
+- ``ScalarMappable.callbacksSM`` is removed. Use
+ ``ScalarMappable.callbacks`` instead.
+- ``streamplot.get_integrator`` is removed.
+- ``style.core.STYLE_FILE_PATTERN``, ``style.core.load_base_library``, and
+ ``style.core.iter_user_libraries`` are removed.
+- ``SubplotParams.validate`` is removed. Use `.SubplotParams.update` to
+ change `.SubplotParams` while always keeping it in a valid state.
+- The ``grey_arrayd``, ``font_family``, ``font_families``, and ``font_info``
+ attributes of `.TexManager` are removed.
+- ``Text.get_prop_tup`` is removed with no replacements (because the `.Text`
+ class cannot know whether a backend needs to update cache e.g. when the
+ text's color changes).
+- ``Tick.apply_tickdir`` didn't actually update the tick markers on the
+ existing Line2D objects used to draw the ticks and is removed; use
+ `.Axis.set_tick_params` instead.
+- ``tight_layout.auto_adjust_subplotpars`` is removed.
+- The ``grid_info`` attribute of ``axisartist`` classes has been removed.
+- ``axes_grid1.axes_grid.CbarAxes`` and ``axisartist.axes_grid.CbarAxes`` are
+ removed (they are now dynamically generated based on the owning axes
+ class).
+- The ``axes_grid1.Divider.get_vsize_hsize`` and
+ ``axes_grid1.Grid.get_vsize_hsize`` methods are removed.
+- ``AxesDivider.append_axes(..., add_to_figure=False)`` is removed. Use
+ ``ax.remove()`` to remove the Axes from the figure if needed.
+- ``FixedAxisArtistHelper.change_tick_coord`` is removed with no
+ replacement.
+- ``floating_axes.GridHelperCurveLinear.get_boundary`` is removed with no
+ replacement.
+- ``ParasiteAxesBase.get_images_artists`` is removed.
+- The "units finalize" signal (previously emitted by Axis instances) is
+ removed. Connect to "units" instead.
+- Passing formatting parameters positionally to ``stem()`` is no longer
+ possible.
+- ``axisartist.clip_path`` is removed with no replacement.
+
diff --git a/doc/api/projections/geo.rst b/doc/api/projections/geo.rst
new file mode 100644
index 000000000000..beaa7ec343f3
--- /dev/null
+++ b/doc/api/projections/geo.rst
@@ -0,0 +1,7 @@
+******************************
+``matplotlib.projections.geo``
+******************************
+
+.. automodule:: matplotlib.projections.geo
+ :members:
+ :show-inheritance:
diff --git a/doc/api/projections/polar.rst b/doc/api/projections/polar.rst
new file mode 100644
index 000000000000..3491fd92d16e
--- /dev/null
+++ b/doc/api/projections/polar.rst
@@ -0,0 +1,7 @@
+********************************
+``matplotlib.projections.polar``
+********************************
+
+.. automodule:: matplotlib.projections.polar
+ :members:
+ :show-inheritance:
diff --git a/doc/api/projections_api.rst b/doc/api/projections_api.rst
index e7c807957925..f0c742c241e7 100644
--- a/doc/api/projections_api.rst
+++ b/doc/api/projections_api.rst
@@ -6,11 +6,13 @@
:members:
:show-inheritance:
+Built-in projections
+====================
+Matplotlib has built-in support for polar and some geographic projections.
+See the following pages for more information:
-********************************
-``matplotlib.projections.polar``
-********************************
+.. toctree::
+ :maxdepth: 1
-.. automodule:: matplotlib.projections.polar
- :members:
- :show-inheritance:
+ projections/polar
+ projections/geo
diff --git a/doc/api/pyplot_summary.rst b/doc/api/pyplot_summary.rst
index f3f4c88b78e8..616e9c257aa5 100644
--- a/doc/api/pyplot_summary.rst
+++ b/doc/api/pyplot_summary.rst
@@ -2,31 +2,337 @@
``matplotlib.pyplot``
*********************
-Pyplot function overview
+.. currentmodule:: matplotlib.pyplot
+
+.. automodule:: matplotlib.pyplot
+ :no-members:
+ :no-undoc-members:
+
+
+Managing Figure and Axes
------------------------
-.. currentmodule:: matplotlib
+.. autosummary::
+ :toctree: _as_gen
+ :template: autosummary.rst
+ :nosignatures:
+
+ axes
+ cla
+ clf
+ close
+ delaxes
+ fignum_exists
+ figure
+ gca
+ gcf
+ get_figlabels
+ get_fignums
+ sca
+ subplot
+ subplot2grid
+ subplot_mosaic
+ subplots
+ twinx
+ twiny
+
+
+Adding data to the plot
+-----------------------
+
+Basic
+^^^^^
.. autosummary::
:toctree: _as_gen
- :template: autofunctions.rst
+ :template: autosummary.rst
+ :nosignatures:
- pyplot
+ plot
+ errorbar
+ scatter
+ plot_date
+ step
+ loglog
+ semilogx
+ semilogy
+ fill_between
+ fill_betweenx
+ bar
+ barh
+ bar_label
+ stem
+ eventplot
+ pie
+ stackplot
+ broken_barh
+ vlines
+ hlines
+ fill
+ polar
-.. currentmodule:: matplotlib.pyplot
-.. autofunction:: plotting
+Spans
+^^^^^
+.. autosummary::
+ :toctree: _as_gen
+ :template: autosummary.rst
+ :nosignatures:
-Colors in Matplotlib
---------------------
+ axhline
+ axhspan
+ axvline
+ axvspan
+ axline
-There are many colormaps you can use to map data onto color values.
-Below we list several ways in which color can be utilized in Matplotlib.
-For a more in-depth look at colormaps, see the
-:doc:`/tutorials/colors/colormaps` tutorial.
+Spectral
+^^^^^^^^
-.. currentmodule:: matplotlib.pyplot
+.. autosummary::
+ :toctree: _as_gen
+ :template: autosummary.rst
+ :nosignatures:
+
+ acorr
+ angle_spectrum
+ cohere
+ csd
+ magnitude_spectrum
+ phase_spectrum
+ psd
+ specgram
+ xcorr
+
+
+Statistics
+^^^^^^^^^^
+
+.. autosummary::
+ :toctree: _as_gen
+ :template: autosummary.rst
+ :nosignatures:
+
+ boxplot
+ violinplot
+
+
+Binned
+^^^^^^
+
+.. autosummary::
+ :toctree: _as_gen
+ :template: autosummary.rst
+ :nosignatures:
+
+ hexbin
+ hist
+ hist2d
+ stairs
+
+
+Contours
+^^^^^^^^
+
+.. autosummary::
+ :toctree: _as_gen
+ :template: autosummary.rst
+ :nosignatures:
+
+ clabel
+ contour
+ contourf
+
+
+2D arrays
+^^^^^^^^^
+
+.. autosummary::
+ :toctree: _as_gen
+ :template: autosummary.rst
+ :nosignatures:
+
+ imshow
+ matshow
+ pcolor
+ pcolormesh
+ spy
+ figimage
+
+
+Unstructured triangles
+^^^^^^^^^^^^^^^^^^^^^^
+
+.. autosummary::
+ :toctree: _as_gen
+ :template: autosummary.rst
+ :nosignatures:
+
+ triplot
+ tripcolor
+ tricontour
+ tricontourf
+
+
+Text and annotations
+^^^^^^^^^^^^^^^^^^^^
+
+.. autosummary::
+ :toctree: _as_gen
+ :template: autosummary.rst
+ :nosignatures:
+
+ annotate
+ text
+ figtext
+ table
+ arrow
+ figlegend
+ legend
+
+
+Vector fields
+^^^^^^^^^^^^^
+
+.. autosummary::
+ :toctree: _as_gen
+ :template: autosummary.rst
+ :nosignatures:
+
+ barbs
+ quiver
+ quiverkey
+ streamplot
+
+
+Axis configuration
+------------------
+
+.. autosummary::
+ :toctree: _as_gen
+ :template: autosummary.rst
+ :nosignatures:
+
+ autoscale
+ axis
+ box
+ grid
+ locator_params
+ minorticks_off
+ minorticks_on
+ rgrids
+ thetagrids
+ tick_params
+ ticklabel_format
+ xlabel
+ xlim
+ xscale
+ xticks
+ ylabel
+ ylim
+ yscale
+ yticks
+ suptitle
+ title
+
+
+Layout
+------
+
+.. autosummary::
+ :toctree: _as_gen
+ :template: autosummary.rst
+ :nosignatures:
+
+ margins
+ subplots_adjust
+ subplot_tool
+ tight_layout
+
+
+Colormapping
+------------
+
+.. autosummary::
+ :toctree: _as_gen
+ :template: autosummary.rst
+ :nosignatures:
+
+ clim
+ colorbar
+ gci
+ sci
+ get_cmap
+ set_cmap
+ imread
+ imsave
+
+Colormaps are available via the colormap registry `matplotlib.colormaps`. For
+convenience this registry is available in ``pyplot`` as
+
+.. autodata:: colormaps
+ :no-value:
+
+Additionally, there are shortcut functions to set builtin colormaps; e.g.
+``plt.viridis()`` is equivalent to ``plt.set_cmap('viridis')``.
+
+
+.. autodata:: color_sequences
+ :no-value:
+
+
+Configuration
+-------------
+
+.. autosummary::
+ :toctree: _as_gen
+ :template: autosummary.rst
+ :nosignatures:
+
+ rc
+ rc_context
+ rcdefaults
+
+
+Output
+------
+
+.. autosummary::
+ :toctree: _as_gen
+ :template: autosummary.rst
+ :nosignatures:
+
+ draw
+ draw_if_interactive
+ ioff
+ ion
+ install_repl_displayhook
+ isinteractive
+ pause
+ savefig
+ show
+ switch_backend
+ uninstall_repl_displayhook
+
+
+Other
+-----
+
+.. autosummary::
+ :toctree: _as_gen
+ :template: autosummary.rst
+ :nosignatures:
-.. autofunction:: colormaps
+ connect
+ disconnect
+ findobj
+ get
+ getp
+ get_current_fig_manager
+ ginput
+ new_figure_manager
+ set_loglevel
+ setp
+ waitforbuttonpress
+ xkcd
diff --git a/doc/api/sphinxext_mathmpl_api.rst b/doc/api/sphinxext_mathmpl_api.rst
new file mode 100644
index 000000000000..839334ca39fe
--- /dev/null
+++ b/doc/api/sphinxext_mathmpl_api.rst
@@ -0,0 +1,7 @@
+================================
+``matplotlib.sphinxext.mathmpl``
+================================
+
+.. automodule:: matplotlib.sphinxext.mathmpl
+ :exclude-members: latex_math
+ :no-undoc-members:
diff --git a/doc/api/testing_api.rst b/doc/api/testing_api.rst
index 808d2b870109..7731d4510b27 100644
--- a/doc/api/testing_api.rst
+++ b/doc/api/testing_api.rst
@@ -3,11 +3,6 @@
**********************
-:func:`matplotlib.test`
-=======================
-
-.. autofunction:: matplotlib.test
-
:mod:`matplotlib.testing`
=========================
diff --git a/doc/api/text_api.rst b/doc/api/text_api.rst
index c88d45f2832b..af37e5c526a3 100644
--- a/doc/api/text_api.rst
+++ b/doc/api/text_api.rst
@@ -2,7 +2,32 @@
``matplotlib.text``
*******************
+.. redirect-from:: /api/textpath_api
+
.. automodule:: matplotlib.text
+ :no-members:
+
+.. autoclass:: matplotlib.text.Text
+ :members:
+ :undoc-members:
+ :show-inheritance:
+
+.. autoclass:: matplotlib.text.Annotation
+ :members:
+ :undoc-members:
+ :show-inheritance:
+
+.. autoclass:: matplotlib.text.OffsetFrom
+ :members:
+ :undoc-members:
+ :show-inheritance:
+
+.. autoclass:: matplotlib.text.TextPath
+ :members:
+ :undoc-members:
+ :show-inheritance:
+
+.. autoclass:: matplotlib.text.TextToPath
:members:
:undoc-members:
:show-inheritance:
diff --git a/doc/api/textpath_api.rst b/doc/api/textpath_api.rst
deleted file mode 100644
index 875e4b376867..000000000000
--- a/doc/api/textpath_api.rst
+++ /dev/null
@@ -1,8 +0,0 @@
-***********************
-``matplotlib.textpath``
-***********************
-
-.. automodule:: matplotlib.textpath
- :members:
- :undoc-members:
- :show-inheritance:
diff --git a/doc/api/tight_bbox_api.rst b/doc/api/tight_bbox_api.rst
index 3a96b5b6d027..9e8dd2fa66f9 100644
--- a/doc/api/tight_bbox_api.rst
+++ b/doc/api/tight_bbox_api.rst
@@ -2,7 +2,12 @@
``matplotlib.tight_bbox``
*************************
-.. automodule:: matplotlib.tight_bbox
+.. attention::
+ This module is considered internal.
+
+ Its use is deprecated and it will be removed in a future version.
+
+.. automodule:: matplotlib._tight_bbox
:members:
:undoc-members:
:show-inheritance:
diff --git a/doc/api/tight_layout_api.rst b/doc/api/tight_layout_api.rst
index 1f1a32281aa0..35f92e3ddced 100644
--- a/doc/api/tight_layout_api.rst
+++ b/doc/api/tight_layout_api.rst
@@ -2,7 +2,12 @@
``matplotlib.tight_layout``
***************************
-.. automodule:: matplotlib.tight_layout
+.. attention::
+ This module is considered internal.
+
+ Its use is deprecated and it will be removed in a future version.
+
+.. automodule:: matplotlib._tight_layout
:members:
:undoc-members:
:show-inheritance:
diff --git a/doc/api/toolkits/axes_grid.rst b/doc/api/toolkits/axes_grid.rst
deleted file mode 100644
index 991b0ff6813a..000000000000
--- a/doc/api/toolkits/axes_grid.rst
+++ /dev/null
@@ -1,26 +0,0 @@
-.. _axes_grid-api-index:
-
-Matplotlib axes_grid Toolkit
-============================
-
-.. currentmodule:: mpl_toolkits
-
-
-.. note::
- AxesGrid toolkit has been a part of matplotlib since v
- 0.99. Originally, the toolkit had a single namespace of
- *axes_grid*. In more recent version, the toolkit
- has divided into two separate namespace (*axes_grid1* and *axisartist*).
- While *axes_grid* namespace is maintained for the backward compatibility,
- use of *axes_grid1* and *axisartist* is recommended.
- For the documentation on ``axes_grid``,
- see the `previous version of the docs
- `_.
-
-.. toctree::
- :maxdepth: 1
-
- axes_grid1
- axisartist
-
-
diff --git a/doc/api/toolkits/axes_grid1.rst b/doc/api/toolkits/axes_grid1.rst
index 3abbaf8f22c0..c48a6a31af90 100644
--- a/doc/api/toolkits/axes_grid1.rst
+++ b/doc/api/toolkits/axes_grid1.rst
@@ -1,13 +1,14 @@
.. module:: mpl_toolkits.axes_grid1
-Matplotlib axes_grid1 Toolkit
-=============================
+.. redirect-from:: /api/toolkits/axes_grid
-The matplotlib :mod:`mpl_toolkits.axes_grid1` toolkit is a collection of
-helper classes to ease displaying multiple images in matplotlib. While the
-aspect parameter in matplotlib adjust the position of the single axes,
-axes_grid1 toolkit provides a framework to adjust the position of
-multiple axes according to their aspects.
+``mpl_toolkits.axes_grid1``
+===========================
+
+:mod:`mpl_toolkits.axes_grid1` provides a framework of helper classes to adjust
+the positioning of multiple fixed-aspect Axes (e.g., displaying images). It
+can be contrasted with the ``aspect`` property of Matplotlib Axes, which
+adjusts the position of a single Axes.
See :ref:`axes_grid1_users-guide-index` for a guide on the usage of axes_grid1.
@@ -16,6 +17,13 @@ See :ref:`axes_grid1_users-guide-index` for a guide on the usage of axes_grid1.
:align: center
:scale: 50
+.. note::
+
+ This module contains classes and function that were formerly part of the
+ ``mpl_toolkits.axes_grid`` module that was removed in 3.6. Additional
+ classes from that older module may also be found in
+ `mpl_toolkits.axisartist`.
+
.. currentmodule:: mpl_toolkits
**The submodules of the axes_grid1 API are:**
@@ -32,5 +40,3 @@ See :ref:`axes_grid1_users-guide-index` for a guide on the usage of axes_grid1.
axes_grid1.inset_locator
axes_grid1.mpl_axes
axes_grid1.parasite_axes
-
-
diff --git a/doc/api/toolkits/axisartist.rst b/doc/api/toolkits/axisartist.rst
index f18246fef128..8cac4d68a266 100644
--- a/doc/api/toolkits/axisartist.rst
+++ b/doc/api/toolkits/axisartist.rst
@@ -1,15 +1,15 @@
.. module:: mpl_toolkits.axisartist
-Matplotlib axisartist Toolkit
-=============================
+``mpl_toolkits.axisartist``
+===========================
-The *axisartist* namespace includes a derived Axes implementation (
-:class:`mpl_toolkits.axisartist.Axes`). The
-biggest difference is that the artists that are responsible for drawing
-axis lines, ticks, ticklabels, and axis labels are separated out from the
-mpl's Axis class. This change was strongly motivated to support curvilinear grid.
+The *axisartist* namespace provides a derived Axes implementation
+(:class:`mpl_toolkits.axisartist.Axes`), designed to support curvilinear
+grids. The biggest difference is that the artists that are responsible for
+drawing axis lines, ticks, ticklabels, and axis labels are separated out from
+Matplotlib's Axis class.
-You can find a tutorial describing usage of axisartist at the
+You can find a tutorial describing usage of axisartist at the
:ref:`axisartist_users-guide-index` user guide.
.. figure:: ../../gallery/axisartist/images/sphx_glr_demo_curvelinear_grid_001.png
@@ -17,6 +17,13 @@ You can find a tutorial describing usage of axisartist at the
:align: center
:scale: 50
+.. note::
+
+ This module contains classes and function that were formerly part of the
+ ``mpl_toolkits.axes_grid`` module that was removed in 3.6. Additional
+ classes from that older module may also be found in
+ `mpl_toolkits.axes_grid1`.
+
.. currentmodule:: mpl_toolkits
**The submodules of the axisartist API are:**
@@ -32,9 +39,7 @@ You can find a tutorial describing usage of axisartist at the
axisartist.axis_artist
axisartist.axisline_style
axisartist.axislines
- axisartist.clip_path
axisartist.floating_axes
axisartist.grid_finder
axisartist.grid_helper_curvelinear
axisartist.parasite_axes
-
diff --git a/doc/api/toolkits/index.rst b/doc/api/toolkits/index.rst
deleted file mode 100644
index 59c01ab21a69..000000000000
--- a/doc/api/toolkits/index.rst
+++ /dev/null
@@ -1,46 +0,0 @@
-.. _toolkits-index:
-
-.. _toolkits:
-
-########
-Toolkits
-########
-
-Toolkits are collections of application-specific functions that extend
-Matplotlib.
-
-.. _toolkit_mplot3d:
-
-mplot3d
-=======
-
-:mod:`mpl_toolkits.mplot3d` provides some basic 3D
-plotting (scatter, surf, line, mesh) tools. Not the fastest or most feature
-complete 3D library out there, but it ships with Matplotlib and thus may be a
-lighter weight solution for some use cases. Check out the
-:doc:`mplot3d tutorial ` for more
-information.
-
-.. figure:: ../../gallery/mplot3d/images/sphx_glr_contourf3d_2_001.png
- :target: ../../gallery/mplot3d/contourf3d_2.html
- :align: center
- :scale: 50
-
-.. toctree::
- :maxdepth: 2
-
- mplot3d/index.rst
- mplot3d/faq.rst
-
-Links
------
-* mpl3d API: :ref:`toolkit_mplot3d-api`
-
-.. include:: axes_grid1.rst
- :start-line: 1
-
-.. include:: axisartist.rst
- :start-line: 1
-
-.. include:: axes_grid.rst
- :start-line: 1
diff --git a/doc/api/toolkits/mplot3d.rst b/doc/api/toolkits/mplot3d.rst
index 97d3bf13246f..fc6c4cbad6d1 100644
--- a/doc/api/toolkits/mplot3d.rst
+++ b/doc/api/toolkits/mplot3d.rst
@@ -1,8 +1,35 @@
-.. _toolkit_mplot3d-api:
+.. _toolkit_mplot3d-index:
+.. currentmodule:: mpl_toolkits.mplot3d
+
+************************
+``mpl_toolkits.mplot3d``
+************************
+
+The mplot3d toolkit adds simple 3D plotting capabilities (scatter, surface,
+line, mesh, etc.) to Matplotlib by supplying an Axes object that can create
+a 2D projection of a 3D scene. The resulting graph will have the same look
+and feel as regular 2D plots. Not the fastest or most feature complete 3D
+library out there, but it ships with Matplotlib and thus may be a lighter
+weight solution for some use cases.
+
+See the :doc:`mplot3d tutorial ` for
+more information.
+
+.. image:: /_static/demo_mplot3d.png
+ :align: center
-***********
-mplot3d API
-***********
+The interactive backends also provide the ability to rotate and zoom the 3D
+scene. One can rotate the 3D scene by simply clicking-and-dragging the scene.
+Panning is done by clicking the middle mouse button, and zooming is done by
+right-clicking the scene and dragging the mouse up and down. Unlike 2D plots,
+the toolbar pan and zoom buttons are not used.
+
+.. toctree::
+ :maxdepth: 2
+
+ mplot3d/faq.rst
+ mplot3d/view_angles.rst
+ mplot3d/axes3d.rst
.. note::
`.pyplot` cannot be used to add content to 3D plots, because its function
@@ -25,11 +52,8 @@ mplot3d API
Please report any functions that do not behave as expected as a bug.
In addition, help and patches would be greatly appreciated!
-.. autosummary::
- :toctree: ../_as_gen
- :template: autosummary.rst
- axes3d.Axes3D
+`axes3d.Axes3D` (fig[, rect, elev, azim, roll, ...]) 3D Axes object.
.. module:: mpl_toolkits.mplot3d.axis3d
diff --git a/doc/api/toolkits/mplot3d/axes3d.rst b/doc/api/toolkits/mplot3d/axes3d.rst
new file mode 100644
index 000000000000..e334fee2fea5
--- /dev/null
+++ b/doc/api/toolkits/mplot3d/axes3d.rst
@@ -0,0 +1,306 @@
+mpl\_toolkits.mplot3d.axes3d.Axes3D
+===================================
+
+
+.. currentmodule:: mpl_toolkits.mplot3d.axes3d
+
+
+.. autoclass:: Axes3D
+ :no-members:
+ :no-undoc-members:
+ :show-inheritance:
+
+
+.. currentmodule:: mpl_toolkits.mplot3d.axes3d.Axes3D
+
+
+Plotting
+--------
+
+.. autosummary::
+ :toctree: ../../_as_gen
+ :template: autosummary.rst
+ :nosignatures:
+
+ plot
+ scatter
+ bar
+ bar3d
+
+ plot_surface
+ plot_wireframe
+ plot_trisurf
+
+ clabel
+ contour
+ tricontour
+ contourf
+ tricontourf
+
+ quiver
+ voxels
+ errorbar
+ stem
+
+
+Text and annotations
+--------------------
+
+.. autosummary::
+ :toctree: ../../_as_gen
+ :template: autosummary.rst
+ :nosignatures:
+
+ text
+ text2D
+
+
+Clearing
+--------
+
+.. autosummary::
+ :toctree: ../../_as_gen
+ :template: autosummary.rst
+ :nosignatures:
+
+ clear
+
+
+Appearance
+----------
+
+.. autosummary::
+ :toctree: ../../_as_gen
+ :template: autosummary.rst
+ :nosignatures:
+
+ set_axis_off
+ set_axis_on
+ grid
+ get_frame_on
+ set_frame_on
+
+
+Axis
+----
+
+Axis limits and direction
+^^^^^^^^^^^^^^^^^^^^^^^^^
+
+.. autosummary::
+ :toctree: ../../_as_gen
+ :template: autosummary.rst
+ :nosignatures:
+
+ get_zaxis
+ get_xlim
+ get_ylim
+ get_zlim
+ set_zlim
+ get_w_lims
+ invert_zaxis
+ zaxis_inverted
+ get_zbound
+ set_zbound
+
+
+Axis labels and title
+^^^^^^^^^^^^^^^^^^^^^
+
+.. autosummary::
+ :toctree: ../../_as_gen
+ :template: autosummary.rst
+ :nosignatures:
+
+ set_zlabel
+ get_zlabel
+ set_title
+
+
+Axis scales
+^^^^^^^^^^^
+
+.. autosummary::
+ :toctree: ../../_as_gen
+ :template: autosummary.rst
+ :nosignatures:
+
+ set_xscale
+ set_yscale
+ set_zscale
+ get_zscale
+
+
+Autoscaling and margins
+^^^^^^^^^^^^^^^^^^^^^^^
+
+.. autosummary::
+ :toctree: ../../_as_gen
+ :template: autosummary.rst
+ :nosignatures:
+
+ set_zmargin
+ margins
+ autoscale
+ autoscale_view
+ set_autoscalez_on
+ get_autoscalez_on
+ auto_scale_xyz
+
+
+Aspect ratio
+^^^^^^^^^^^^
+
+.. autosummary::
+ :toctree: ../../_as_gen
+ :template: autosummary.rst
+ :nosignatures:
+
+ set_aspect
+ set_box_aspect
+ apply_aspect
+
+
+Ticks
+^^^^^
+
+.. autosummary::
+ :toctree: ../../_as_gen
+ :template: autosummary.rst
+ :nosignatures:
+
+ tick_params
+ set_zticks
+ get_zticks
+ set_zticklabels
+ get_zticklines
+ get_zgridlines
+ get_zminorticklabels
+ get_zmajorticklabels
+ zaxis_date
+
+
+Units
+-----
+
+.. autosummary::
+ :toctree: ../../_as_gen
+ :template: autosummary.rst
+ :nosignatures:
+
+ convert_zunits
+
+
+Adding artists
+--------------
+
+.. autosummary::
+ :toctree: ../../_as_gen
+ :template: autosummary.rst
+ :nosignatures:
+
+ add_collection3d
+
+
+Sharing
+-------
+
+.. autosummary::
+ :toctree: ../../_as_gen
+ :template: autosummary.rst
+ :nosignatures:
+
+ sharez
+
+
+Interactive
+-----------
+
+.. autosummary::
+ :toctree: ../../_as_gen
+ :template: autosummary.rst
+ :nosignatures:
+
+ can_zoom
+ can_pan
+ disable_mouse_rotation
+ mouse_init
+ drag_pan
+ format_zdata
+ format_coord
+
+
+Projection and perspective
+--------------------------
+
+.. autosummary::
+ :toctree: ../../_as_gen
+ :template: autosummary.rst
+ :nosignatures:
+
+ view_init
+ set_proj_type
+ get_proj
+ set_top_view
+
+
+Drawing
+-------
+
+.. autosummary::
+ :toctree: ../../_as_gen
+ :template: autosummary.rst
+ :nosignatures:
+
+ draw
+ get_tightbbox
+
+
+Aliases and deprecated methods
+------------------------------
+
+.. autosummary::
+ :toctree: ../../_as_gen
+ :template: autosummary.rst
+ :nosignatures:
+
+ set_zlim3d
+ stem3D
+ text3D
+ tunit_cube
+ tunit_edges
+ unit_cube
+ w_xaxis
+ w_yaxis
+ w_zaxis
+
+
+Other
+-----
+
+.. autosummary::
+ :toctree: ../../_as_gen
+ :template: autosummary.rst
+ :nosignatures:
+
+ get_axis_position
+ add_contour_set
+ add_contourf_set
+ update_datalim
+
+
+.. currentmodule:: mpl_toolkits.mplot3d
+
+Sample 3D data
+--------------
+
+.. autosummary::
+ :toctree: ../../_as_gen
+ :template: autosummary.rst
+ :nosignatures:
+
+ axes3d.get_test_data
+
+
+.. minigallery:: mpl_toolkits.mplot3d.axes3d.Axes3D
+ :add-heading:
diff --git a/doc/api/toolkits/mplot3d/faq.rst b/doc/api/toolkits/mplot3d/faq.rst
index dfc23b55e069..7e53cabc6e9a 100644
--- a/doc/api/toolkits/mplot3d/faq.rst
+++ b/doc/api/toolkits/mplot3d/faq.rst
@@ -49,4 +49,3 @@ Work is being done to eliminate this issue. For matplotlib v1.1.0, there is
a semi-official manner to modify these parameters. See the note in the
:mod:`.mplot3d.axis3d` section of the mplot3d API documentation for
more information.
-
diff --git a/doc/api/toolkits/mplot3d/index.rst b/doc/api/toolkits/mplot3d/index.rst
deleted file mode 100644
index 8b153c06903f..000000000000
--- a/doc/api/toolkits/mplot3d/index.rst
+++ /dev/null
@@ -1,28 +0,0 @@
-.. _toolkit_mplot3d-index:
-.. currentmodule:: mpl_toolkits.mplot3d
-
-*******
-mplot3d
-*******
-
-Matplotlib mplot3d toolkit
-==========================
-The mplot3d toolkit adds simple 3D plotting capabilities to matplotlib by
-supplying an axes object that can create a 2D projection of a 3D scene.
-The resulting graph will have the same look and feel as regular 2D plots.
-
-See the :doc:`mplot3d tutorial ` for
-more information on how to use this toolkit.
-
-.. image:: /_static/demo_mplot3d.png
-
-The interactive backends also provide the ability to rotate and zoom
-the 3D scene. One can rotate the 3D scene by simply clicking-and-dragging
-the scene. Zooming is done by right-clicking the scene and dragging the
-mouse up and down. Note that one does not use the zoom button like one
-would use for regular 2D plots.
-
-.. toctree::
- :maxdepth: 2
-
- faq.rst
diff --git a/doc/api/toolkits/mplot3d/view_angles.rst b/doc/api/toolkits/mplot3d/view_angles.rst
new file mode 100644
index 000000000000..10d4fac39e8c
--- /dev/null
+++ b/doc/api/toolkits/mplot3d/view_angles.rst
@@ -0,0 +1,40 @@
+.. _toolkit_mplot3d-view-angles:
+
+*******************
+mplot3d View Angles
+*******************
+
+How to define the view angle
+============================
+
+The position of the viewport "camera" in a 3D plot is defined by three angles:
+*elevation*, *azimuth*, and *roll*. From the resulting position, it always
+points towards the center of the plot box volume. The angle direction is a
+common convention, and is shared with
+`PyVista `_ and
+`MATLAB `_
+(though MATLAB lacks a roll angle). Note that a positive roll angle rotates the
+viewing plane clockwise, so the 3d axes will appear to rotate
+counter-clockwise.
+
+.. image:: /_static/mplot3d_view_angles.png
+ :align: center
+ :scale: 50
+
+Rotating the plot using the mouse will control only the azimuth and elevation,
+but all three angles can be set programmatically::
+
+ import matplotlib.pyplot as plt
+ ax = plt.figure().add_subplot(projection='3d')
+ ax.view_init(elev=30, azim=45, roll=15)
+
+
+Primary view planes
+===================
+
+To look directly at the primary view planes, the required elevation, azimuth,
+and roll angles are shown in the diagram of an "unfolded" plot below. These are
+further documented in the `.mplot3d.axes3d.Axes3D.view_init` API.
+
+.. plot:: gallery/mplot3d/view_planes_3d.py
+ :align: center
diff --git a/doc/api/transformations.rst b/doc/api/transformations.rst
index 58c29598704c..186db9aea728 100644
--- a/doc/api/transformations.rst
+++ b/doc/api/transformations.rst
@@ -2,7 +2,7 @@
``matplotlib.transforms``
*************************
-.. inheritance-diagram:: matplotlib.transforms matplotlib.path
+.. inheritance-diagram:: matplotlib.transforms
:parts: 1
.. automodule:: matplotlib.transforms
@@ -15,4 +15,3 @@
interval_contains, interval_contains_open
:show-inheritance:
:special-members:
-
diff --git a/doc/api/tri_api.rst b/doc/api/tri_api.rst
index 9205e34ff93b..0b4e046eec08 100644
--- a/doc/api/tri_api.rst
+++ b/doc/api/tri_api.rst
@@ -2,7 +2,9 @@
``matplotlib.tri``
******************
-.. automodule:: matplotlib.tri
+Unstructured triangular grid functions.
+
+.. py:module:: matplotlib.tri
.. autoclass:: matplotlib.tri.Triangulation
:members:
@@ -17,7 +19,7 @@
:show-inheritance:
.. autoclass:: matplotlib.tri.TriInterpolator
-
+
.. autoclass:: matplotlib.tri.LinearTriInterpolator
:members: __call__, gradient
:show-inheritance:
@@ -30,7 +32,7 @@
.. autoclass:: matplotlib.tri.UniformTriRefiner
:show-inheritance:
- :members:
+ :members:
.. autoclass:: matplotlib.tri.TriAnalyzer
- :members:
+ :members:
diff --git a/doc/api/type1font.rst b/doc/api/type1font.rst
index 2cb2a68eb5d5..00ef38f4d447 100644
--- a/doc/api/type1font.rst
+++ b/doc/api/type1font.rst
@@ -2,7 +2,12 @@
``matplotlib.type1font``
************************
-.. automodule:: matplotlib.type1font
+.. attention::
+ This module is considered internal.
+
+ Its use is deprecated and it will be removed in a future version.
+
+.. automodule:: matplotlib._type1font
:members:
:undoc-members:
:show-inheritance:
diff --git a/doc/citing.rst b/doc/citing.rst
deleted file mode 100644
index c1a1b5fe679d..000000000000
--- a/doc/citing.rst
+++ /dev/null
@@ -1,150 +0,0 @@
-:orphan:
-
-Citing Matplotlib
-=================
-
-If Matplotlib contributes to a project that leads to a scientific publication,
-please acknowledge this fact by citing `J. D. Hunter, "Matplotlib: A 2D
-Graphics Environment", Computing in Science & Engineering, vol. 9, no. 3,
-pp. 90-95, 2007 `_.
-
-.. literalinclude:: MCSE.2007.55.bib
- :language: bibtex
-
-.. container:: sphx-glr-download
-
- :download:`Download BibTeX bibliography file: MCSE.2007.55.bib `
-
-DOIs
-----
-
-The following DOI represents *all* Matplotlib versions. Please select a more
-specific DOI from the list below, referring to the version used for your publication.
-
- .. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.592536.svg
- :target: https://doi.org/10.5281/zenodo.592536
-
-By version
-~~~~~~~~~~
-.. START OF AUTOGENERATED
-
-
-v3.4.2
- .. image:: _static/zenodo_cache/4743323.svg
- :target: https://doi.org/10.5281/zenodo.4743323
-v3.4.1
- .. image:: _static/zenodo_cache/4649959.svg
- :target: https://doi.org/10.5281/zenodo.4649959
-v3.4.0
- .. image:: _static/zenodo_cache/4638398.svg
- :target: https://doi.org/10.5281/zenodo.4638398
-v3.3.4
- .. image:: _static/zenodo_cache/4475376.svg
- :target: https://doi.org/10.5281/zenodo.4475376
-v3.3.3
- .. image:: _static/zenodo_cache/4268928.svg
- :target: https://doi.org/10.5281/zenodo.4268928
-v3.3.2
- .. image:: _static/zenodo_cache/4030140.svg
- :target: https://doi.org/10.5281/zenodo.4030140
-v3.3.1
- .. image:: _static/zenodo_cache/3984190.svg
- :target: https://doi.org/10.5281/zenodo.3984190
-v3.3.0
- .. image:: _static/zenodo_cache/3948793.svg
- :target: https://doi.org/10.5281/zenodo.3948793
-v3.2.2
- .. image:: _static/zenodo_cache/3898017.svg
- :target: https://doi.org/10.5281/zenodo.3898017
-v3.2.1
- .. image:: _static/zenodo_cache/3714460.svg
- :target: https://doi.org/10.5281/zenodo.3714460
-v3.2.0
- .. image:: _static/zenodo_cache/3695547.svg
- :target: https://doi.org/10.5281/zenodo.3695547
-v3.1.3
- .. image:: _static/zenodo_cache/3633844.svg
- :target: https://doi.org/10.5281/zenodo.3633844
-v3.1.2
- .. image:: _static/zenodo_cache/3563226.svg
- :target: https://doi.org/10.5281/zenodo.3563226
-v3.1.1
- .. image:: _static/zenodo_cache/3264781.svg
- :target: https://doi.org/10.5281/zenodo.3264781
-v3.1.0
- .. image:: _static/zenodo_cache/2893252.svg
- :target: https://doi.org/10.5281/zenodo.2893252
-v3.0.3
- .. image:: _static/zenodo_cache/2577644.svg
- :target: https://doi.org/10.5281/zenodo.2577644
-v3.0.2
- .. image:: _static/zenodo_cache/1482099.svg
- :target: https://doi.org/10.5281/zenodo.1482099
-v3.0.1
- .. image:: _static/zenodo_cache/1482098.svg
- :target: https://doi.org/10.5281/zenodo.1482098
-v2.2.5
- .. image:: _static/zenodo_cache/3633833.svg
- :target: https://doi.org/10.5281/zenodo.3633833
-v3.0.0
- .. image:: _static/zenodo_cache/1420605.svg
- :target: https://doi.org/10.5281/zenodo.1420605
-v2.2.4
- .. image:: _static/zenodo_cache/2669103.svg
- :target: https://doi.org/10.5281/zenodo.2669103
-v2.2.3
- .. image:: _static/zenodo_cache/1343133.svg
- :target: https://doi.org/10.5281/zenodo.1343133
-v2.2.2
- .. image:: _static/zenodo_cache/1202077.svg
- :target: https://doi.org/10.5281/zenodo.1202077
-v2.2.1
- .. image:: _static/zenodo_cache/1202050.svg
- :target: https://doi.org/10.5281/zenodo.1202050
-v2.2.0
- .. image:: _static/zenodo_cache/1189358.svg
- :target: https://doi.org/10.5281/zenodo.1189358
-v2.1.2
- .. image:: _static/zenodo_cache/1154287.svg
- :target: https://doi.org/10.5281/zenodo.1154287
-v2.1.1
- .. image:: _static/zenodo_cache/1098480.svg
- :target: https://doi.org/10.5281/zenodo.1098480
-v2.1.0
- .. image:: _static/zenodo_cache/1004650.svg
- :target: https://doi.org/10.5281/zenodo.1004650
-v2.0.2
- .. image:: _static/zenodo_cache/573577.svg
- :target: https://doi.org/10.5281/zenodo.573577
-v2.0.1
- .. image:: _static/zenodo_cache/570311.svg
- :target: https://doi.org/10.5281/zenodo.570311
-v2.0.0
- .. image:: _static/zenodo_cache/248351.svg
- :target: https://doi.org/10.5281/zenodo.248351
-v1.5.3
- .. image:: _static/zenodo_cache/61948.svg
- :target: https://doi.org/10.5281/zenodo.61948
-v1.5.2
- .. image:: _static/zenodo_cache/56926.svg
- :target: https://doi.org/10.5281/zenodo.56926
-v1.5.1
- .. image:: _static/zenodo_cache/44579.svg
- :target: https://doi.org/10.5281/zenodo.44579
-v1.5.0
- .. image:: _static/zenodo_cache/32914.svg
- :target: https://doi.org/10.5281/zenodo.32914
-v1.4.3
- .. image:: _static/zenodo_cache/15423.svg
- :target: https://doi.org/10.5281/zenodo.15423
-v1.4.2
- .. image:: _static/zenodo_cache/12400.svg
- :target: https://doi.org/10.5281/zenodo.12400
-v1.4.1
- .. image:: _static/zenodo_cache/12287.svg
- :target: https://doi.org/10.5281/zenodo.12287
-v1.4.0
- .. image:: _static/zenodo_cache/11451.svg
- :target: https://doi.org/10.5281/zenodo.11451
-
-.. END OF AUTOGENERATED
diff --git a/doc/conf.py b/doc/conf.py
index f78cb851b27b..acb36254db82 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -1,26 +1,43 @@
# Matplotlib documentation build configuration file, created by
# sphinx-quickstart on Fri May 2 12:33:25 2008.
#
-# This file is execfile()d with the current directory set to its containing dir.
+# This file is execfile()d with the current directory set to its containing
+# dir.
#
# The contents of this file are pickled, so don't put values in the namespace
-# that aren't pickleable (module imports are okay, they're removed automatically).
+# that aren't picklable (module imports are okay, they're removed
+# automatically).
#
# All configuration values have a default value; values that are commented out
# serve to show the default value.
+import logging
import os
from pathlib import Path
import shutil
import subprocess
import sys
+from urllib.parse import urlsplit, urlunsplit
import warnings
import matplotlib
-from matplotlib._api import MatplotlibDeprecationWarning
-import sphinx
from datetime import datetime
+import time
+
+# debug that building expected version
+print(f"Building Documentation for Matplotlib: {matplotlib.__version__}")
+
+# Release mode enables optimizations and other related options.
+is_release_build = tags.has('release') # noqa
+
+# are we running circle CI?
+CIRCLECI = 'CIRCLECI' in os.environ
+
+# Parse year using SOURCE_DATE_EPOCH, falling back to current time.
+# https://reproducible-builds.org/specs/source-date-epoch/
+sourceyear = datetime.utcfromtimestamp(
+ int(os.environ.get('SOURCE_DATE_EPOCH', time.time()))).year
# If your extensions are in another directory, add it here. If the directory
# is relative to the documentation root, use os.path.abspath to make it
@@ -36,20 +53,14 @@
# usage in the gallery.
warnings.filterwarnings('error', append=True)
-# Strip backslashes in function's signature
-# To be removed when numpydoc > 0.9.x
-strip_signature_backslash = True
-
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.autosummary',
- 'sphinx.ext.doctest',
'sphinx.ext.inheritance_diagram',
'sphinx.ext.intersphinx',
'sphinx.ext.ifconfig',
- 'sphinx.ext.viewcode',
'IPython.sphinxext.ipython_console_highlighting',
'IPython.sphinxext.ipython_directive',
'numpydoc', # Needs to be loaded *after* autodoc.
@@ -65,24 +76,21 @@
'sphinxext.skip_deprecated',
'sphinxext.redirect_from',
'sphinx_copybutton',
+ 'sphinx_design',
]
exclude_patterns = [
'api/prev_api_changes/api_changes_*/*',
- # Be sure to update users/whats_new.rst:
- 'users/prev_whats_new/whats_new_3.4.0.rst',
]
def _check_dependencies():
names = {
+ **{ext: ext.split(".")[0] for ext in extensions},
+ # Explicitly list deps that are not extensions, or whose PyPI package
+ # name does not match the (toplevel) module name.
"colorspacious": 'colorspacious',
- "IPython.sphinxext.ipython_console_highlighting": 'ipython',
- "matplotlib": 'matplotlib',
- "numpydoc": 'numpydoc',
- "PIL.Image": 'pillow',
- "sphinx_copybutton": 'sphinx_copybutton',
- "sphinx_gallery": 'sphinx_gallery',
+ "mpl_sphinx_theme": 'mpl_sphinx_theme',
"sphinxcontrib.inkscapeconverter": 'sphinxcontrib-svg2pdfconverter',
}
missing = []
@@ -107,6 +115,7 @@ def _check_dependencies():
# gallery_order.py from the sphinxext folder provides the classes that
# allow custom ordering of sections and subsections of the gallery
import sphinxext.gallery_order as gallery_order
+
# The following import is only necessary to monkey patch the signature later on
from sphinx_gallery import gen_rst
@@ -117,7 +126,7 @@ def _check_dependencies():
# we should ignore warnings coming from importing deprecated modules for
# autodoc purposes, as this will disappear automatically when they are removed
-warnings.filterwarnings('ignore', category=MatplotlibDeprecationWarning,
+warnings.filterwarnings('ignore', category=DeprecationWarning,
module='importlib', # used by sphinx.autodoc.importer
message=r'(\n|.)*module was deprecated.*')
@@ -126,12 +135,10 @@ def _check_dependencies():
# make sure to ignore warnings that stem from simply inspecting deprecated
# class-level attributes
-warnings.filterwarnings('ignore', category=MatplotlibDeprecationWarning,
+warnings.filterwarnings('ignore', category=DeprecationWarning,
module='sphinx.util.inspect')
-# missing-references names matches sphinx>=3 behavior, so we can't be nitpicky
-# for older sphinxes.
-nitpicky = sphinx.version_info >= (3,)
+nitpicky = True
# change this to True to update the allowed failures
missing_references_write_json = False
missing_references_warn_unused_ignores = False
@@ -145,42 +152,102 @@ def _check_dependencies():
'pandas': ('https://pandas.pydata.org/pandas-docs/stable/', None),
'pytest': ('https://pytest.org/en/stable/', None),
'python': ('https://docs.python.org/3/', None),
- 'scipy': ('https://docs.scipy.org/doc/scipy/reference/', None),
+ 'scipy': ('https://docs.scipy.org/doc/scipy/', None),
+ 'tornado': ('https://www.tornadoweb.org/en/stable/', None),
+ 'xarray': ('https://docs.xarray.dev/en/stable/', None),
}
# Sphinx gallery configuration
+
+def matplotlib_reduced_latex_scraper(block, block_vars, gallery_conf,
+ **kwargs):
+ """
+ Reduce srcset when creating a PDF.
+
+ Because sphinx-gallery runs *very* early, we cannot modify this even in the
+ earliest builder-inited signal. Thus we do it at scraping time.
+ """
+ from sphinx_gallery.scrapers import matplotlib_scraper
+
+ if gallery_conf['builder_name'] == 'latex':
+ gallery_conf['image_srcset'] = []
+ return matplotlib_scraper(block, block_vars, gallery_conf, **kwargs)
+
+
sphinx_gallery_conf = {
- 'examples_dirs': ['../examples', '../tutorials'],
- 'filename_pattern': '^((?!sgskip).)*$',
- 'gallery_dirs': ['gallery', 'tutorials'],
- 'doc_module': ('matplotlib', 'mpl_toolkits'),
- 'reference_url': {
- 'matplotlib': None,
- 'numpy': 'https://docs.scipy.org/doc/numpy/',
- 'scipy': 'https://docs.scipy.org/doc/scipy/reference/',
- },
'backreferences_dir': Path('api') / Path('_as_gen'),
- 'subsection_order': gallery_order.sectionorder,
- 'within_subsection_order': gallery_order.subsectionorder,
- 'remove_config_comments': True,
+ # Compression is a significant effort that we skip for local and CI builds.
+ 'compress_images': ('thumbnails', 'images') if is_release_build else (),
+ 'doc_module': ('matplotlib', 'mpl_toolkits'),
+ 'examples_dirs': ['../examples', '../tutorials', '../plot_types'],
+ 'filename_pattern': '^((?!sgskip).)*$',
+ 'gallery_dirs': ['gallery', 'tutorials', 'plot_types'],
+ 'image_scrapers': (matplotlib_reduced_latex_scraper, ),
+ 'image_srcset': ["2x"],
+ 'junit': '../test-results/sphinx-gallery/junit.xml' if CIRCLECI else '',
+ 'matplotlib_animations': True,
'min_reported_time': 1,
+ 'plot_gallery': 'True', # sphinx-gallery/913
+ 'reference_url': {'matplotlib': None},
+ 'remove_config_comments': True,
+ 'reset_modules': (
+ 'matplotlib',
+ # clear basic_units module to re-register with unit registry on import
+ lambda gallery_conf, fname: sys.modules.pop('basic_units', None)
+ ),
+ 'subsection_order': gallery_order.sectionorder,
'thumbnail_size': (320, 224),
- 'compress_images': ('thumbnails', 'images'),
- 'matplotlib_animations': True,
+ 'within_subsection_order': gallery_order.subsectionorder,
+ 'capture_repr': (),
}
-plot_gallery = 'True'
+if 'plot_gallery=0' in sys.argv:
+ # Gallery images are not created. Suppress warnings triggered where other
+ # parts of the documentation link to these images.
+
+ def gallery_image_warning_filter(record):
+ msg = record.msg
+ for gallery_dir in sphinx_gallery_conf['gallery_dirs']:
+ if msg.startswith(f'image file not readable: {gallery_dir}'):
+ return False
+
+ if msg == 'Could not obtain image size. :scale: option is ignored.':
+ return False
+
+ return True
+
+ logger = logging.getLogger('sphinx')
+ logger.addFilter(gallery_image_warning_filter)
+
+
+mathmpl_fontsize = 11.0
+mathmpl_srcset = ['2x']
+
+# Monkey-patching gallery header to include search keywords
+gen_rst.EXAMPLE_HEADER = """
+.. DO NOT EDIT.
+.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY.
+.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE:
+.. "{0}"
+.. LINE NUMBERS ARE GIVEN BELOW.
-# Monkey-patching gallery signature to include search keywords
-gen_rst.SPHX_GLR_SIG = """\n
.. only:: html
- .. rst-class:: sphx-glr-signature
+ .. meta::
+ :keywords: codex
+
+ .. note::
+ :class: sphx-glr-download-link-note
+
+ Click :ref:`here `
+ to download the full example code{2}
+
+.. rst-class:: sphx-glr-example-title
- Keywords: matplotlib code example, codex, python plot, pyplot
- `Gallery generated by Sphinx-Gallery
- `_\n"""
+.. _sphx_glr_{1}:
+
+"""
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
@@ -191,29 +258,29 @@ def _check_dependencies():
# This is the default encoding, but it doesn't hurt to be explicit
source_encoding = "utf-8"
-# The master toctree document.
-master_doc = 'contents'
+# The toplevel toctree document (renamed to root_doc in Sphinx 4.0)
+root_doc = master_doc = 'users/index'
# General substitutions.
try:
SHA = subprocess.check_output(
['git', 'describe', '--dirty']).decode('utf-8').strip()
-# Catch the case where git is not installed locally, and use the versioneer
+# Catch the case where git is not installed locally, and use the setuptools_scm
# version number instead
except (subprocess.CalledProcessError, FileNotFoundError):
SHA = matplotlib.__version__
+
html_context = {
- 'sha': SHA,
- # This will disable any analytics in the HTML templates (currently Google
- # Analytics.)
- 'include_analytics': False,
+ "doc_version": SHA,
}
project = 'Matplotlib'
-copyright = ('2002 - 2012 John Hunter, Darren Dale, Eric Firing, '
- 'Michael Droettboom and the Matplotlib development '
- f'team; 2012 - {datetime.now().year} The Matplotlib development team')
+copyright = (
+ '2002–2012 John Hunter, Darren Dale, Eric Firing, Michael Droettboom '
+ 'and the Matplotlib development team; '
+ f'2012–{sourceyear} The Matplotlib development team'
+)
# The default replacements for |version| and |release|, also used in various
@@ -227,7 +294,7 @@ def _check_dependencies():
# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
-#today = ''
+# today = ''
# Else, today_fmt is used as the format for a strftime call.
today_fmt = '%B %d, %Y'
@@ -235,15 +302,15 @@ def _check_dependencies():
unused_docs = []
# If true, '()' will be appended to :func: etc. cross-reference text.
-#add_function_parentheses = True
+# add_function_parentheses = True
# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
-#add_module_names = True
+# add_module_names = True
# If true, sectionauthor and moduleauthor directives will be shown in the
# output. They are ignored by default.
-#show_authors = False
+# show_authors = False
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
@@ -253,28 +320,104 @@ def _check_dependencies():
# Plot directive configuration
# ----------------------------
-plot_formats = [('png', 100), ('pdf', 100)]
+# For speedup, decide which plot_formats to build based on build targets:
+# html only -> png
+# latex only -> pdf
+# all other cases, including html + latex -> png, pdf
+# For simplicity, we assume that the build targets appear in the command line.
+# We're falling back on using all formats in case that assumption fails.
+formats = {'html': ('png', 100), 'latex': ('pdf', 100)}
+plot_formats = [formats[target] for target in ['html', 'latex']
+ if target in sys.argv] or list(formats.values())
+
# GitHub extension
github_project_url = "https://github.com/matplotlib/matplotlib/"
+
# Options for HTML output
# -----------------------
+def add_html_cache_busting(app, pagename, templatename, context, doctree):
+ """
+ Add cache busting query on CSS and JavaScript assets.
+
+ This adds the Matplotlib version as a query to the link reference in the
+ HTML, if the path is not absolute (i.e., it comes from the `_static`
+ directory) and doesn't already have a query.
+ """
+ from sphinx.builders.html import Stylesheet, JavaScript
+
+ css_tag = context['css_tag']
+ js_tag = context['js_tag']
+
+ def css_tag_with_cache_busting(css):
+ if isinstance(css, Stylesheet) and css.filename is not None:
+ url = urlsplit(css.filename)
+ if not url.netloc and not url.query:
+ url = url._replace(query=SHA)
+ css = Stylesheet(urlunsplit(url), priority=css.priority,
+ **css.attributes)
+ return css_tag(css)
+
+ def js_tag_with_cache_busting(js):
+ if isinstance(js, JavaScript) and js.filename is not None:
+ url = urlsplit(js.filename)
+ if not url.netloc and not url.query:
+ url = url._replace(query=SHA)
+ js = JavaScript(urlunsplit(url), priority=js.priority,
+ **js.attributes)
+ return js_tag(js)
+
+ context['css_tag'] = css_tag_with_cache_busting
+ context['js_tag'] = js_tag_with_cache_busting
+
+
# The style sheet to use for HTML and HTML Help pages. A file of that name
# must exist either in Sphinx' static/ path, or in one of the custom paths
# given in html_static_path.
-#html_style = 'matplotlib.css'
-html_style = f'mpl.css?{SHA}'
+html_css_files = [
+ "mpl.css",
+]
+
+html_theme = "mpl_sphinx_theme"
# The name for this set of Sphinx documents. If None, it defaults to
# " v documentation".
-#html_title = None
+# html_title = None
# The name of an image file (within the static path) to place at the top of
# the sidebar.
-#html_logo = 'logo.png'
+html_logo = "_static/logo2.svg"
+html_theme_options = {
+ "navbar_links": "internal",
+ # collapse_navigation in pydata-sphinx-theme is slow, so skipped for local
+ # and CI builds https://github.com/pydata/pydata-sphinx-theme/pull/386
+ "collapse_navigation": not is_release_build,
+ "show_prev_next": False,
+ "switcher": {
+ # Add a unique query to the switcher.json url. This will be ignored by
+ # the server, but will be used as part of the key for caching by browsers
+ # so when we do a new minor release the switcher will update "promptly" on
+ # the stable and devdocs.
+ "json_url": f"https://matplotlib.org/devdocs/_static/switcher.json?{SHA}",
+ "version_match": (
+ # The start version to show. This must be in switcher.json.
+ # We either go to 'stable' or to 'devdocs'
+ 'stable' if matplotlib.__version_info__.releaselevel == 'final'
+ else 'devdocs')
+ },
+ "logo": {"link": "index",
+ "image_light": "images/logo2.svg",
+ "image_dark": "images/logo_dark.svg"},
+ "navbar_end": ["theme-switcher", "version-switcher", "mpl_icon_links"],
+ "secondary_sidebar_items": "page-toc.html",
+ "footer_items": ["copyright", "sphinx-version", "doc_version"],
+}
+include_analytics = is_release_build
+if include_analytics:
+ html_theme_options["analytics"] = {"google_analytics_id": "UA-55954603-1"}
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
@@ -285,6 +428,9 @@ def _check_dependencies():
# default is ``".html"``.
html_file_suffix = '.html'
+# this makes this the canonical link for all the pages on the site...
+html_baseurl = 'https://matplotlib.org/stable/'
+
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
html_last_updated_fmt = '%b %d, %Y'
@@ -293,27 +439,36 @@ def _check_dependencies():
html_index = 'index.html'
# Custom sidebar templates, maps document names to template names.
-#html_sidebars = {}
+# html_sidebars = {}
# Custom sidebar templates, maps page names to templates.
html_sidebars = {
- 'index': [
+ "index": [
# 'sidebar_announcement.html',
- 'sidebar_versions.html',
- 'donate_sidebar.html'],
- '**': ['localtoc.html', 'pagesource.html']
+ "sidebar_versions.html",
+ "cheatsheet_sidebar.html",
+ "donate_sidebar.html",
+ ],
+ # '**': ['localtoc.html', 'pagesource.html']
}
-# If false, no module index is generated.
-#html_use_modindex = True
-html_domain_indices = ["py-modindex"]
+# Copies only relevant code, not the '>>>' prompt
+copybutton_prompt_text = r'>>> |\.\.\. '
+copybutton_prompt_is_regexp = True
+
+# If true, add an index to the HTML documents.
+html_use_index = False
+
+# If true, generate domain-specific indices in addition to the general index.
+# For e.g. the Python domain, this is the global module index.
+html_domain_index = False
# If true, the reST sources are included in the HTML build as _sources/.
-#html_copy_source = True
+# html_copy_source = True
# If true, an OpenSearch description file will be output, and all pages will
# contain a tag referring to it.
-html_use_opensearch = 'False'
+html_use_opensearch = 'https://matplotlib.org/stable'
# Output file base name for HTML help builder.
htmlhelp_basename = 'Matplotlibdoc'
@@ -330,11 +485,13 @@ def _check_dependencies():
# The paper size ('letter' or 'a4').
latex_paper_size = 'letter'
-# Grouping the document tree into LaTeX files. List of tuples
-# (source start file, target name, title, author, document class [howto/manual]).
+# Grouping the document tree into LaTeX files.
+# List of tuples:
+# (source start file, target name, title, author,
+# document class [howto/manual])
latex_documents = [
- ('contents', 'Matplotlib.tex', 'Matplotlib',
+ (root_doc, 'Matplotlib.tex', 'Matplotlib',
'John Hunter\\and Darren Dale\\and Eric Firing\\and Michael Droettboom'
'\\and and the matplotlib development team', 'manual'),
]
@@ -364,7 +521,7 @@ def _check_dependencies():
# Sphinx 2.0 adopts GNU FreeFont by default, but it does not have all
# the Unicode codepoints needed for the section about Mathtext
# "Writing mathematical expressions"
-fontpkg = r"""
+latex_elements['fontpkg'] = r"""
\IfFontExistsTF{XITS}{
\setmainfont{XITS}
}{
@@ -404,12 +561,7 @@ def _check_dependencies():
Extension = .otf,
]}
"""
-latex_elements['fontpkg'] = fontpkg
-# Sphinx <1.8.0 or >=2.0.0 does this by default, but the 1.8.x series
-# did not for latex_engine = 'xelatex' (as it used Latin Modern font).
-# We need this for code-blocks as FreeMono has wide glyphs.
-latex_elements['fvset'] = r'\fvset{fontsize=\small}'
# Fix fancyhdr complaining about \headheight being too small
latex_elements['passoptionstopackages'] = r"""
\PassOptionsToPackage{headheight=14pt}{geometry}
@@ -417,6 +569,8 @@ def _check_dependencies():
# Additional stuff for the LaTeX preamble.
latex_elements['preamble'] = r"""
+ % Show Parts and Chapters in Table of Contents
+ \setcounter{tocdepth}{0}
% One line per author on title page
\DeclareRobustCommand{\and}%
{\end{tabular}\kern-\tabcolsep\\\begin{tabular}[t]{c}}%
@@ -464,7 +618,7 @@ def _check_dependencies():
autoclass_content = 'both'
texinfo_documents = [
- ("contents", 'matplotlib', 'Matplotlib Documentation',
+ (root_doc, 'matplotlib', 'Matplotlib Documentation',
'John Hunter@*Darren Dale@*Eric Firing@*Michael Droettboom@*'
'The matplotlib development team',
'Matplotlib', "Python plotting package", 'Programming',
@@ -475,19 +629,97 @@ def _check_dependencies():
numpydoc_show_class_members = False
-html4_writer = True
-
-inheritance_node_attrs = dict(fontsize=16)
+# We want to prevent any size limit, as we'll add scroll bars with CSS.
+inheritance_graph_attrs = dict(dpi=100, size='1000.0', splines='polyline')
+# Also remove minimum node dimensions, and increase line size a bit.
+inheritance_node_attrs = dict(height=0.02, margin=0.055, penwidth=1,
+ width=0.01)
+inheritance_edge_attrs = dict(penwidth=1)
graphviz_dot = shutil.which('dot')
# Still use PNG until SVG linking is fixed
# https://github.com/sphinx-doc/sphinx/issues/3176
# graphviz_output_format = 'svg'
+# -----------------------------------------------------------------------------
+# Source code links
+# -----------------------------------------------------------------------------
+link_github = True
+# You can add build old with link_github = False
+
+if link_github:
+ import inspect
+ from packaging.version import parse
+
+ extensions.append('sphinx.ext.linkcode')
+
+ def linkcode_resolve(domain, info):
+ """
+ Determine the URL corresponding to Python object
+ """
+ if domain != 'py':
+ return None
+
+ modname = info['module']
+ fullname = info['fullname']
+
+ submod = sys.modules.get(modname)
+ if submod is None:
+ return None
+
+ obj = submod
+ for part in fullname.split('.'):
+ try:
+ obj = getattr(obj, part)
+ except AttributeError:
+ return None
+
+ if inspect.isfunction(obj):
+ obj = inspect.unwrap(obj)
+ try:
+ fn = inspect.getsourcefile(obj)
+ except TypeError:
+ fn = None
+ if not fn or fn.endswith('__init__.py'):
+ try:
+ fn = inspect.getsourcefile(sys.modules[obj.__module__])
+ except (TypeError, AttributeError, KeyError):
+ fn = None
+ if not fn:
+ return None
+
+ try:
+ source, lineno = inspect.getsourcelines(obj)
+ except (OSError, TypeError):
+ lineno = None
+
+ linespec = (f"#L{lineno:d}-L{lineno + len(source) - 1:d}"
+ if lineno else "")
+
+ startdir = Path(matplotlib.__file__).parent.parent
+ try:
+ fn = os.path.relpath(fn, start=startdir).replace(os.path.sep, '/')
+ except ValueError:
+ return None
+
+ if not fn.startswith(('matplotlib/', 'mpl_toolkits/')):
+ return None
+
+ version = parse(matplotlib.__version__)
+ tag = 'main' if version.is_devrelease else f'v{version.public}'
+ return ("https://github.com/matplotlib/matplotlib/blob"
+ f"/{tag}/lib/{fn}{linespec}")
+else:
+ extensions.append('sphinx.ext.viewcode')
+
+# -----------------------------------------------------------------------------
+# Sphinx setup
+# -----------------------------------------------------------------------------
def setup(app):
- if any(st in version for st in ('post', 'alpha', 'beta')):
+ if any(st in version for st in ('post', 'dev', 'alpha', 'beta')):
bld_type = 'dev'
else:
bld_type = 'rel'
app.add_config_value('releaselevel', bld_type, 'env')
+ app.connect('html-page-context', add_html_cache_busting, priority=1000)
diff --git a/doc/contents.rst b/doc/contents.rst
deleted file mode 100644
index 407f81e53b9d..000000000000
--- a/doc/contents.rst
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-Overview
-========
-
-.. only:: html
-
- :Release: |version|
- :Date: |today|
-
- Download `PDF `_
-
-
-.. toctree::
- :maxdepth: 2
-
- users/index.rst
- faq/index.rst
- api/index.rst
- resources/index.rst
- thirdpartypackages/index.rst
- devel/index.rst
-
-.. only:: html
-
- * :ref:`genindex`
- * :ref:`modindex`
- * :ref:`search`
diff --git a/doc/devel/MEP/MEP08.rst b/doc/devel/MEP/MEP08.rst
index 67ce5d3d76ef..18419ac2bf11 100644
--- a/doc/devel/MEP/MEP08.rst
+++ b/doc/devel/MEP/MEP08.rst
@@ -9,7 +9,10 @@
Status
======
-**Completed**
+**Superseded**
+
+Current guidelines for style, including usage of pep8 are maintained
+in `our pull request guidelines `_.
We are currently enforcing a sub-set of pep8 on new code contributions.
diff --git a/doc/devel/MEP/MEP11.rst b/doc/devel/MEP/MEP11.rst
index 9ddd0109c06b..659b7e101480 100644
--- a/doc/devel/MEP/MEP11.rst
+++ b/doc/devel/MEP/MEP11.rst
@@ -117,7 +117,7 @@ Implementation
For installing from source, and assuming the user has all of the
C-level compilers and dependencies, this can be accomplished fairly
easily using distribute_ and following the instructions `here
-`_. The only anticipated
+`_. The only anticipated
change to the matplotlib library code will be to import pyparsing_
from the top-level namespace rather than from within matplotlib. Note
that distribute_ will also allow us to remove the direct dependency
diff --git a/doc/devel/MEP/MEP12.rst b/doc/devel/MEP/MEP12.rst
index 87489393b2f5..009f013e0be9 100644
--- a/doc/devel/MEP/MEP12.rst
+++ b/doc/devel/MEP/MEP12.rst
@@ -106,7 +106,7 @@ sections described above. "Clean-up" should involve:
* PEP8_ clean-ups (running `flake8
- `_, or a similar checker, is
+ `_, or a similar checker, is
highly recommended)
* Commented-out code should be removed.
* Replace uses of `pylab` interface with `.pyplot` (+ `numpy`,
@@ -142,8 +142,8 @@ page instead of the gallery examples.
references to that example. For example, the API documentation for
:file:`axes.py` and :file:`pyplot.py` may use these examples to generate
plots. Use your favorite search tool (e.g., grep, ack, `grin
-`_, `pss
-`_) to search the matplotlib
+`_, `pss
+`_) to search the matplotlib
package. See `2dc9a46
`_
and `aa6b410
diff --git a/doc/devel/MEP/MEP14.rst b/doc/devel/MEP/MEP14.rst
index e3e7127abda9..574c733e10bf 100644
--- a/doc/devel/MEP/MEP14.rst
+++ b/doc/devel/MEP/MEP14.rst
@@ -78,11 +78,11 @@ number of other projects:
- `Microsoft DirectWrite`_
- `Apple Core Text`_
-.. _pango: https://www.pango.org/
-.. _harfbuzz: https://www.freedesktop.org/wiki/Software/HarfBuzz/
+.. _pango: https://pango.gnome.org
+.. _harfbuzz: https://github.com/harfbuzz/harfbuzz
.. _QtTextLayout: https://doc.qt.io/archives/qt-4.8/qtextlayout.html
.. _Microsoft DirectWrite: https://docs.microsoft.com/en-ca/windows/win32/directwrite/introducing-directwrite
-.. _Apple Core Text: https://developer.apple.com/library/content/documentation/StringsTextFonts/Conceptual/CoreText_Programming/Overview/Overview.html
+.. _Apple Core Text: https://developer.apple.com/library/archive/documentation/StringsTextFonts/Conceptual/CoreText_Programming/Overview/Overview.html
Of the above options, it should be noted that harfbuzz_ is designed
from the start as a cross platform option with minimal dependencies,
diff --git a/doc/devel/MEP/MEP15.rst b/doc/devel/MEP/MEP15.rst
index dc1802e33b8c..8e2f80707429 100644
--- a/doc/devel/MEP/MEP15.rst
+++ b/doc/devel/MEP/MEP15.rst
@@ -1,6 +1,6 @@
-==========================================================================
- MEP15 - Fix axis autoscaling when limits are specified for one axis only
-==========================================================================
+=========================================================================
+ MEP15: Fix axis autoscaling when limits are specified for one axis only
+=========================================================================
.. contents::
:local:
diff --git a/doc/devel/MEP/MEP19.rst b/doc/devel/MEP/MEP19.rst
index 3fc276a238ee..fd93ba619aed 100644
--- a/doc/devel/MEP/MEP19.rst
+++ b/doc/devel/MEP/MEP19.rst
@@ -67,7 +67,7 @@ great!]:
**Documentation**
-Documentation of master is now built by travis and uploaded to http://matplotlib.org/devdocs/index.html
+Documentation of main is now built by travis and uploaded to https://matplotlib.org/devdocs/index.html
@NelleV, I believe, generates the docs automatically and posts them on
the web to chart MEP10 progress.
@@ -122,7 +122,7 @@ This section outlines the requirements that we would like to have.
#. Make it easy to test a large but sparse matrix of different
versions of matplotlib's dependencies. The matplotlib user survey
provides some good data as to where to focus our efforts:
- https://docs.google.com/spreadsheet/ccc?key=0AjrPjlTMRTwTdHpQS25pcTZIRWdqX0pNckNSU01sMHc
+ https://docs.google.com/spreadsheets/d/1jbK0J4cIkyBNncnS-gP7pINSliNy9lI-N4JHwxlNSXE/edit
#. Nice to have: A decentralized design so that those with more
obscure platforms can publish build results to a central dashboard.
diff --git a/doc/devel/MEP/MEP22.rst b/doc/devel/MEP/MEP22.rst
index d7e93bb5744d..8f8fe69b41a6 100644
--- a/doc/devel/MEP/MEP22.rst
+++ b/doc/devel/MEP/MEP22.rst
@@ -13,16 +13,18 @@ Status
Branches and Pull requests
==========================
-Previous work
- * https://github.com/matplotlib/matplotlib/pull/1849
- * https://github.com/matplotlib/matplotlib/pull/2557
- * https://github.com/matplotlib/matplotlib/pull/2465
+Previous work:
+
+* https://github.com/matplotlib/matplotlib/pull/1849
+* https://github.com/matplotlib/matplotlib/pull/2557
+* https://github.com/matplotlib/matplotlib/pull/2465
Pull Requests:
- * Removing the NavigationToolbar classes
- https://github.com/matplotlib/matplotlib/pull/2740 **CLOSED**
- * Keeping the NavigationToolbar classes https://github.com/matplotlib/matplotlib/pull/2759 **CLOSED**
- * Navigation by events: https://github.com/matplotlib/matplotlib/pull/3652
+
+* Removing the NavigationToolbar classes
+ https://github.com/matplotlib/matplotlib/pull/2740 **CLOSED**
+* Keeping the NavigationToolbar classes https://github.com/matplotlib/matplotlib/pull/2759 **CLOSED**
+* Navigation by events: https://github.com/matplotlib/matplotlib/pull/3652
Abstract
========
@@ -39,7 +41,7 @@ reconfiguration.
This approach will make easier to create and share tools among
users. In the far future, we can even foresee a kind of Marketplace
-for ``Tool``\ s where the most popular can be added into the main
+for ``Tool``\s where the most popular can be added into the main
distribution.
Detailed description
@@ -55,18 +57,18 @@ https://github.com/matplotlib/matplotlib/issues/2699
The proposed solution is to take the actions out of the ``Toolbar`` and the
shortcuts out of the ``Canvas``. The actions and shortcuts will be in the form
-of ``Tool``\ s.
+of ``Tool``\s.
A new class ``Navigation`` will be the bridge between the events from the
``Canvas`` and ``Toolbar`` and redirect them to the appropriate ``Tool``.
At the end the user interaction will be divided into three classes:
- * NavigationBase: This class is instantiated for each FigureManager
- and connect the all user interactions with the Tools
- * ToolbarBase: This existing class is relegated only as a GUI access
- to Tools.
- * ToolBase: Is the basic definition of Tools.
+* NavigationBase: This class is instantiated for each FigureManager
+ and connect the all user interactions with the Tools
+* ToolbarBase: This existing class is relegated only as a GUI access
+ to Tools.
+* ToolBase: Is the basic definition of Tools.
Implementation
@@ -80,37 +82,44 @@ present in the Toolbar as ``Quit``.
The `.ToolBase` has the following class attributes for configuration at definition time
- * keymap = None: Key(s) to be used to trigger the tool
- * description = '': Small description of the tool
- * image = None: Image that is used in the toolbar
+* keymap = None: Key(s) to be used to trigger the tool
+* description = '': Small description of the tool
+* image = None: Image that is used in the toolbar
The following instance attributes are set at instantiation:
- * name
- * navigation
-
-**Methods**
- * trigger(self, event): This is the main method of the Tool, it is called when the Tool is triggered by:
- * Toolbar button click
- * keypress associated with the Tool Keymap
- * Call to navigation.trigger_tool(name)
- * set_figure(self, figure): Set the figure and navigation attributes
- * ``destroy(self, *args)``: Destroy the ``Tool`` graphical interface (if
- exists)
-
-**Available Tools**
- * ToolQuit
- * ToolEnableAllNavigation
- * ToolEnableNavigation
- * ToolToggleGrid
- * ToolToggleFullScreen
- * ToolToggleYScale
- * ToolToggleXScale
- * ToolHome
- * ToolBack
- * ToolForward
- * SaveFigureBase
- * ConfigureSubplotsBase
+* name
+* navigation
+
+Methods
+~~~~~~~
+
+* ``trigger(self, event)``: This is the main method of the Tool, it is called
+ when the Tool is triggered by:
+
+ * Toolbar button click
+ * keypress associated with the Tool Keymap
+ * Call to navigation.trigger_tool(name)
+
+* ``set_figure(self, figure)``: Set the figure and navigation attributes
+* ``destroy(self, *args)``: Destroy the ``Tool`` graphical interface (if
+ exists)
+
+Available Tools
+~~~~~~~~~~~~~~~
+
+* ToolQuit
+* ToolEnableAllNavigation
+* ToolEnableNavigation
+* ToolToggleGrid
+* ToolToggleFullScreen
+* ToolToggleYScale
+* ToolToggleXScale
+* ToolHome
+* ToolBack
+* ToolForward
+* SaveFigureBase
+* ConfigureSubplotsBase
ToolToggleBase(ToolBase)
------------------------
@@ -118,58 +127,63 @@ ToolToggleBase(ToolBase)
The `.ToolToggleBase` has the following class attributes for
configuration at definition time
- * radio_group = None: Attribute to group 'radio' like tools (mutually
- exclusive)
- * cursor = None: Cursor to use when the tool is active
+* radio_group = None: Attribute to group 'radio' like tools (mutually
+ exclusive)
+* cursor = None: Cursor to use when the tool is active
The **Toggleable** Tools, can capture keypress, mouse moves, and mouse
button press
-It defines the following methods
- * enable(self, event): Called by `.ToolToggleBase.trigger` method
- * disable(self, event): Called when the tool is untoggled
- * toggled : **Property** True or False
+Methods
+~~~~~~~
-**Available Tools**
- * ToolZoom
- * ToolPan
+* ``enable(self, event)``: Called by `.ToolToggleBase.trigger` method
+* ``disable(self, event)``: Called when the tool is untoggled
+* ``toggled``: **Property** True or False
-NavigationBase
---------------
+Available Tools
+~~~~~~~~~~~~~~~
-Defines the following attributes
- * canvas:
- * keypresslock: Lock to know if the ``canvas`` ``key_press_event`` is
- available and process it
- * messagelock: Lock to know if the message is available to write
-
-Public methods for **User use**:
- * nav_connect(self, s, func): Connect to to navigation for events
- * nav_disconnect(self, cid): Disconnect from navigation event
- * message_event(self, message, sender=None): Emit a
- tool_message_event event
- * active_toggle(self): **Property** The currently toggled tools or
- None
- * get_tool_keymap(self, name): Return a list of keys that are
- associated with the tool
- * set_tool_keymap(self, name, ``*keys``): Set the keys for the given tool
- * remove_tool(self, name): Removes tool from the navigation control.
- * add_tools(self, tools): Add multiple tools to ``Navigation``
- * add_tool(self, name, tool, group=None, position=None): Add a tool
- to the ``Navigation``
- * tool_trigger_event(self, name, sender=None, canvasevent=None,
- data=None): Trigger a tool and fire the event
-
- * tools(self) **Property**: Return a dict with available tools with
- corresponding keymaps, descriptions and objects
- * get_tool(self, name): Return the tool object
+* ToolZoom
+* ToolPan
+NavigationBase
+--------------
+Defines the following attributes:
+
+* canvas:
+* keypresslock: Lock to know if the ``canvas`` ``key_press_event`` is
+ available and process it
+* messagelock: Lock to know if the message is available to write
+
+Methods (intended for the end user)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+* ``nav_connect(self, s, func)``: Connect to navigation for events
+* ``nav_disconnect(self, cid)``: Disconnect from navigation event
+* ``message_event(self, message, sender=None)``: Emit a
+ tool_message_event event
+* ``active_toggle(self)``: **Property** The currently toggled tools or
+ None
+* ``get_tool_keymap(self, name)``: Return a list of keys that are
+ associated with the tool
+* ``set_tool_keymap(self, name, ``*keys``)``: Set the keys for the given tool
+* ``remove_tool(self, name)``: Removes tool from the navigation control.
+* ``add_tools(self, tools)``: Add multiple tools to ``Navigation``
+* ``add_tool(self, name, tool, group=None, position=None)``: Add a tool
+ to the ``Navigation``
+* ``tool_trigger_event(self, name, sender=None, canvasevent=None,
+ data=None)``: Trigger a tool and fire the event
+* ``tools``: **Property** A dict with available tools with
+ corresponding keymaps, descriptions and objects
+* ``get_tool(self, name)``: Return the tool object
ToolbarBase
-----------
-Methods for **Backend implementation**
+Methods (for backend implementation)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* ``add_toolitem(self, name, group, position, image, description, toggle)``:
Add a toolitem to the toolbar. This method is a callback from
diff --git a/doc/devel/MEP/MEP24.rst b/doc/devel/MEP/MEP24.rst
index 53f0609f3e9b..b0620ce3dc8f 100644
--- a/doc/devel/MEP/MEP24.rst
+++ b/doc/devel/MEP/MEP24.rst
@@ -1,5 +1,5 @@
=======================================
- MEP24: negative radius in polar plots
+ MEP24: Negative radius in polar plots
=======================================
.. contents::
diff --git a/doc/devel/MEP/MEP26.rst b/doc/devel/MEP/MEP26.rst
index 929393a683d2..9d3af8f8c703 100644
--- a/doc/devel/MEP/MEP26.rst
+++ b/doc/devel/MEP/MEP26.rst
@@ -34,7 +34,7 @@ Detailed description
====================
Currently, the look and appearance of existing artist objects (figure,
-axes, Line2D etc...) can only be updated via ``set_`` and ``get_`` methods
+axes, Line2D, etc.) can only be updated via ``set_`` and ``get_`` methods
on the artist object, which is quite laborious, especially if no
reference to the artist(s) has been stored. The new style sheets
introduced in 1.4 allow styling before a plot is created, but do not
@@ -51,7 +51,7 @@ of primitives.
The new methodology would require development of a number of steps:
- A new stylesheet syntax (likely based on CSS) to allow selection of
- artists by type, class, id etc...
+ artists by type, class, id, etc.
- A mechanism by which to parse a stylesheet into a tree
- A mechanism by which to translate the parse-tree into something
which can be used to update the properties of relevant
diff --git a/doc/devel/MEP/MEP27.rst b/doc/devel/MEP/MEP27.rst
index 13ed37cb73cb..81eca8f9c53d 100644
--- a/doc/devel/MEP/MEP27.rst
+++ b/doc/devel/MEP/MEP27.rst
@@ -1,5 +1,5 @@
======================================
- MEP27: decouple pyplot from backends
+ MEP27: Decouple pyplot from backends
======================================
.. contents::
@@ -13,9 +13,11 @@ Status
Branches and Pull requests
==========================
Main PR (including GTK3):
+
+ https://github.com/matplotlib/matplotlib/pull/4143
Backend specific branch diffs:
+
+ https://github.com/OceanWolf/matplotlib/compare/backend-refactor...OceanWolf:backend-refactor-tkagg
+ https://github.com/OceanWolf/matplotlib/compare/backend-refactor...OceanWolf:backend-refactor-qt
+ https://github.com/OceanWolf/matplotlib/compare/backend-refactor...backend-refactor-wx
@@ -49,15 +51,14 @@ Two main places for generic code appear in the classes derived from
1. ``FigureManagerBase`` has **three** jobs at the moment:
- 1. The documentation describes it as a *``Helper class for pyplot
- mode, wraps everything up into a neat bundle''*
+ 1. The documentation describes it as a *Helper class for pyplot
+ mode, wraps everything up into a neat bundle*
2. But it doesn't just wrap the canvas and toolbar, it also does
all of the windowing tasks itself. The conflation of these two
- tasks gets seen the best in the following line: ```python
- self.set_window_title("Figure %d" % num) ``` This combines
+ tasks gets seen the best in the following line:
+ ``self.set_window_title("Figure %d" % num)`` This combines
backend specific code ``self.set_window_title(title)`` with
matplotlib generic code ``title = "Figure %d" % num``.
-
3. Currently the backend specific subclass of ``FigureManager``
decides when to end the mainloop. This also seems very wrong
as the figure should have no control over the other figures.
@@ -95,7 +96,7 @@ The description of this MEP gives us most of the solution:
1. This allows us to break up the conversion of backends into
separate PRs as we can keep the existing ``FigureManagerBase``
class and its dependencies intact.
- 2. and this also anticipates MEP22 where the new
+ 2. And this also anticipates MEP22 where the new
``NavigationBase`` has morphed into a backend independent
``ToolManager``.
diff --git a/doc/devel/MEP/MEP28.rst b/doc/devel/MEP/MEP28.rst
index 631be1e2b548..07b83c17800e 100644
--- a/doc/devel/MEP/MEP28.rst
+++ b/doc/devel/MEP/MEP28.rst
@@ -46,7 +46,7 @@ Detailed description
Currently, the ``Axes.boxplot`` method accepts parameters that allow the
users to specify medians and confidence intervals for each box that
-will be drawn in the plot. These were provided so that avdanced users
+will be drawn in the plot. These were provided so that advanced users
could provide statistics computed in a different fashion that the simple
method provided by matplotlib. However, handling this input requires
complex logic to make sure that the forms of the data structure match what
diff --git a/doc/devel/MEP/MEP29.rst b/doc/devel/MEP/MEP29.rst
index ae7eae9fe43e..d937889d55de 100644
--- a/doc/devel/MEP/MEP29.rst
+++ b/doc/devel/MEP/MEP29.rst
@@ -34,7 +34,7 @@ one has to look at the gallery where one such example is provided:
This example takes a list of strings as well as a list of colors which makes it
cumbersome to use. An alternative would be to use a restricted set of pango_-like markup and to interpret this markup.
-.. _pango: https://developer.gnome.org/pygtk/stable/pango-markup-language.html
+.. _pango: https://docs.gtk.org/Pango/pango_markup.html#pango-markup
Some markup examples::
@@ -54,7 +54,7 @@ Improvements
to use the html.parser from the standard library.
* Computation of text fragment positions could benefit from the OffsetFrom
- class. See for example item 5 in `Using Complex Coordinates with Annotations `_
+ class. See for example item 5 in `Using Complex Coordinates with Annotations `_
Problems
--------
diff --git a/doc/devel/MEP/template.rst b/doc/devel/MEP/template.rst
index 81191fc44eeb..00bdbc87a95e 100644
--- a/doc/devel/MEP/template.rst
+++ b/doc/devel/MEP/template.rst
@@ -24,7 +24,7 @@ MEPs go through a number of phases in their lifetime:
- **Progress**: Consensus was reached and implementation work has begun.
-- **Completed**: The implementation has been merged into master.
+- **Completed**: The implementation has been merged into main.
- **Superseded**: This MEP has been abandoned in favor of another
approach.
diff --git a/doc/devel/README.txt b/doc/devel/README.txt
index 3fc074035aff..d7636cd4c37c 100644
--- a/doc/devel/README.txt
+++ b/doc/devel/README.txt
@@ -2,8 +2,8 @@ All documentation in the gitwash directory are automatically generated by runnin
script in the project's root directory using the following parameters:
python gitwash_dumper.py doc/devel Matplotlib --repo-name=matplotlib --github-user=matplotlib \
- --project-url=http://matplotlib.org \
+ --project-url=https://matplotlib.org \
--project-ml-url=https://mail.python.org/mailman/listinfo/matplotlib-devel
The script is hosted at https://raw.githubusercontent.com/matthew-brett/gitwash/master/gitwash_dumper.py.
-For more information please visit https://github.com/matthew-brett/gitwash
\ No newline at end of file
+For more information please visit https://github.com/matthew-brett/gitwash
diff --git a/doc/devel/add_new_projection.rst b/doc/devel/add_new_projection.rst
deleted file mode 100644
index 4eb2f80be490..000000000000
--- a/doc/devel/add_new_projection.rst
+++ /dev/null
@@ -1,129 +0,0 @@
-.. _adding-new-scales:
-
-=========================================================
-Developer's guide for creating scales and transformations
-=========================================================
-
-.. ::author Michael Droettboom
-
-Matplotlib supports the addition of custom procedures that transform
-the data before it is displayed.
-
-There is an important distinction between two kinds of
-transformations. Separable transformations, working on a single
-dimension, are called "scales", and non-separable transformations,
-that handle data in two or more dimensions at a time, are called
-"projections".
-
-From the user's perspective, the scale of a plot can be set with
-`.Axes.set_xscale` and `.Axes.set_yscale`. Projections can be chosen using the
-*projection* keyword argument of functions that create Axes, such as
-`.pyplot.subplot` or `.pyplot.axes`, e.g. ::
-
- plt.subplot(projection="custom")
-
-This document is intended for developers and advanced users who need
-to create new scales and projections for Matplotlib. The necessary
-code for scales and projections can be included anywhere: directly
-within a plot script, in third-party code, or in the Matplotlib source
-tree itself.
-
-.. _creating-new-scale:
-
-Creating a new scale
-====================
-
-Adding a new scale consists of defining a subclass of
-:class:`matplotlib.scale.ScaleBase`, that includes the following
-elements:
-
-- A transformation from data coordinates into display coordinates.
-
-- An inverse of that transformation. This is used, for example, to
- convert mouse positions from screen space back into data space.
-
-- A function to limit the range of the axis to acceptable values
- (``limit_range_for_scale()``). A log scale, for instance, would
- prevent the range from including values less than or equal to zero.
-
-- Locators (major and minor) that determine where to place ticks in
- the plot, and optionally, how to adjust the limits of the plot to
- some "good" values. Unlike ``limit_range_for_scale()``, which is
- always enforced, the range setting here is only used when
- automatically setting the range of the plot.
-
-- Formatters (major and minor) that specify how the tick labels
- should be drawn.
-
-Once the class is defined, it must be registered with Matplotlib so
-that the user can select it.
-
-A full-fledged and heavily annotated example is in
-:doc:`/gallery/scales/custom_scale`. There are also some classes
-in :mod:`matplotlib.scale` that may be used as starting points.
-
-
-.. _creating-new-projection:
-
-Creating a new projection
-=========================
-
-Adding a new projection consists of defining a projection axes which
-subclasses :class:`matplotlib.axes.Axes` and includes the following
-elements:
-
-- A transformation from data coordinates into display coordinates.
-
-- An inverse of that transformation. This is used, for example, to
- convert mouse positions from screen space back into data space.
-
-- Transformations for the gridlines, ticks and ticklabels. Custom
- projections will often need to place these elements in special
- locations, and Matplotlib has a facility to help with doing so.
-
-- Setting up default values (overriding :meth:`~matplotlib.axes.Axes.cla`),
- since the defaults for a rectilinear axes may not be appropriate.
-
-- Defining the shape of the axes, for example, an elliptical axes, that will be
- used to draw the background of the plot and for clipping any data elements.
-
-- Defining custom locators and formatters for the projection. For
- example, in a geographic projection, it may be more convenient to
- display the grid in degrees, even if the data is in radians.
-
-- Set up interactive panning and zooming. This is left as an
- "advanced" feature left to the reader, but there is an example of
- this for polar plots in :mod:`matplotlib.projections.polar`.
-
-- Any additional methods for additional convenience or features.
-
-Once the projection axes is defined, it can be used in one of two ways:
-
-- By defining the class attribute ``name``, the projection axes can be
- registered with :func:`matplotlib.projections.register_projection`
- and subsequently simply invoked by name::
-
- plt.axes(projection='my_proj_name')
-
-- For more complex, parameterisable projections, a generic "projection" object
- may be defined which includes the method ``_as_mpl_axes``. ``_as_mpl_axes``
- should take no arguments and return the projection's axes subclass and a
- dictionary of additional arguments to pass to the subclass' ``__init__``
- method. Subsequently a parameterised projection can be initialised with::
-
- plt.axes(projection=MyProjection(param1=param1_value))
-
- where MyProjection is an object which implements a ``_as_mpl_axes`` method.
-
-
-A full-fledged and heavily annotated example is in
-:doc:`/gallery/misc/custom_projection`. The polar plot
-functionality in :mod:`matplotlib.projections.polar` may also be of
-interest.
-
-API documentation
-=================
-
-* :mod:`matplotlib.scale`
-* :mod:`matplotlib.projections`
-* :mod:`matplotlib.projections.polar`
diff --git a/doc/devel/coding_guide.rst b/doc/devel/coding_guide.rst
index 053527477cf9..d584a1c986e7 100644
--- a/doc/devel/coding_guide.rst
+++ b/doc/devel/coding_guide.rst
@@ -13,18 +13,103 @@
Pull request guidelines
***********************
-Pull requests (PRs) are the mechanism for contributing to Matplotlibs code and
-documentation.
+`Pull requests (PRs) on GitHub
+`__
+are the mechanism for contributing to Matplotlib's code and documentation.
+
+It is recommended to check that your contribution complies with the following
+rules before submitting a pull request:
+
+* If your pull request addresses an issue, please use the title to describe the
+ issue (e.g. "Add ability to plot timedeltas") and mention the issue number
+ in the pull request description to ensure that a link is created to the
+ original issue (e.g. "Closes #8869" or "Fixes #8869"). This will ensure the
+ original issue mentioned is automatically closed when your PR is merged. See
+ `the GitHub documentation
+ `__
+ for more details.
+
+* Formatting should follow the recommendations of PEP8_, as enforced by
+ flake8_. Matplotlib modifies PEP8 to extend the maximum line length to 88
+ characters. You can check flake8 compliance from the command line with ::
+
+ python -m pip install flake8
+ flake8 /path/to/module.py
+
+ or your editor may provide integration with it. Note that Matplotlib
+ intentionally does not use the black_ auto-formatter (1__), in particular due
+ to its unability to understand the semantics of mathematical expressions
+ (2__, 3__).
+
+ .. _PEP8: https://www.python.org/dev/peps/pep-0008/
+ .. _flake8: https://flake8.pycqa.org/
+ .. _black: https://black.readthedocs.io/
+ .. __: https://github.com/matplotlib/matplotlib/issues/18796
+ .. __: https://github.com/psf/black/issues/148
+ .. __: https://github.com/psf/black/issues/1984
+
+* All public methods should have informative docstrings with sample usage when
+ appropriate. Use the :ref:`docstring standards `.
+
+* For high-level plotting functions, consider adding a simple example either in
+ the ``Example`` section of the docstring or the
+ :ref:`examples gallery `.
+
+* Changes (both new features and bugfixes) should have good test coverage. See
+ :ref:`testing` for more details.
+
+* Import the following modules using the standard scipy conventions::
+
+ import numpy as np
+ import numpy.ma as ma
+ import matplotlib as mpl
+ import matplotlib.pyplot as plt
+ import matplotlib.cbook as cbook
+ import matplotlib.patches as mpatches
+
+ In general, Matplotlib modules should **not** import `.rcParams` using ``from
+ matplotlib import rcParams``, but rather access it as ``mpl.rcParams``. This
+ is because some modules are imported very early, before the `.rcParams`
+ singleton is constructed.
+
+* If your change is a major new feature, add an entry to the ``What's new``
+ section by adding a new file in ``doc/users/next_whats_new`` (see
+ :file:`doc/users/next_whats_new/README.rst` for more information).
+
+* If you change the API in a backward-incompatible way, please document it in
+ :file:`doc/api/next_api_changes/behavior`, by adding a new file with the
+ naming convention ``99999-ABC.rst`` where the pull request number is followed
+ by the contributor's initials. (see :file:`doc/api/api_changes.rst` for more
+ information)
+
+* See below for additional points about :ref:`keyword-argument-processing`, if
+ applicable for your pull request.
+
+.. note::
+
+ The current state of the Matplotlib code base is not compliant with all
+ of these guidelines, but we expect that enforcing these constraints on all
+ new contributions will move the overall code base quality in the right
+ direction.
+
+
+.. seealso::
+
+ * :ref:`coding_guidelines`
+ * :ref:`testing`
+ * :ref:`documenting-matplotlib`
-Summary for PR authors
-======================
+
+
+Summary for pull request authors
+================================
.. note::
* We value contributions from people with all levels of experience. In
particular if this is your first PR not everything has to be perfect.
We'll guide you through the PR process.
- * Nevertheless, try to follow the guidelines below as well as you can to
+ * Nevertheless, please try to follow the guidelines below as well as you can to
help make the PR process quick and smooth.
* Be patient with reviewers. We try our best to respond quickly, but we
have limited bandwidth. If there is no feedback within a couple of days,
@@ -34,26 +119,28 @@ When making a PR, pay attention to:
.. rst-class:: checklist
-* :ref:`Target the master branch `.
+* :ref:`Target the main branch `.
* Adhere to the :ref:`coding_guidelines`.
* Update the :ref:`documentation ` if necessary.
* Aim at making the PR as "ready-to-go" as you can. This helps to speed up
the review process.
* It is ok to open incomplete or work-in-progress PRs if you need help or
feedback from the developers. You may mark these as
- `draft pull requests `_
+ `draft pull requests `_
on GitHub.
* When updating your PR, instead of adding new commits to fix something, please
consider amending your initial commit(s) to keep the history clean.
- You can achieve this using::
+ You can achieve this by using
+
+ .. code-block:: bash
- git commit --amend --no-edit
- git push [your-remote-repo] [your-branch] --force-with-lease
+ git commit --amend --no-edit
+ git push [your-remote-repo] [your-branch] --force-with-lease
See also :ref:`contributing` for how to make a PR.
-Summary for PR reviewers
-========================
+Summary for pull request reviewers
+==================================
.. note::
@@ -70,22 +157,27 @@ Content topics:
* Does the PR conform with the :ref:`coding_guidelines`?
* Is the :ref:`documentation ` (docstrings, examples,
what's new, API changes) updated?
+* Is the change purely stylistic? Generally, such changes are discouraged when
+ not part of other non-stylistic work because it obscures the git history of
+ functional changes to the code. Reflowing a method or docstring as part of a
+ larger refactor/rewrite is acceptable.
+
Organizational topics:
.. rst-class:: checklist
* Make sure all :ref:`automated tests ` pass.
-* The PR should :ref:`target the master branch `.
+* The PR should :ref:`target the main branch `.
* Tag with descriptive :ref:`labels `.
* Set the :ref:`milestone `.
* Keep an eye on the :ref:`number of commits `.
-* Approve if all of the above topics handled.
+* Approve if all of the above topics are handled.
* :ref:`Merge ` if a sufficient number of approvals is reached.
.. _pr-guidelines-details:
-Detailed Guidelines
+Detailed guidelines
===================
.. _pr-documentation:
@@ -106,13 +198,60 @@ Documentation
* See :ref:`documenting-matplotlib` for our documentation style guide.
-* If your change is a major new feature, add an entry to
- :file:`doc/users/whats_new.rst`.
+.. _release_notes:
+
+New features and API changes
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+When adding a major new feature or changing the API in a backward incompatible
+way, please document it by including a versioning directive in the docstring
+and adding an entry to the folder for either the what's new or API change notes.
+
++-------------------+-----------------------------+----------------------------------+
+| for this addition | include this directive | create entry in this folder |
++===================+=============================+==================================+
+| new feature | ``.. versionadded:: 3.N`` | :file:`doc/users/next_whats_new/`|
++-------------------+-----------------------------+----------------------------------+
+| API change | ``.. versionchanged:: 3.N`` | :file:`doc/api/next_api_changes/`|
+| | | |
+| | | probably in ``behavior/`` |
++-------------------+-----------------------------+----------------------------------+
-* If you change the API in a backward-incompatible way, please
- document it by adding a file in the relevant subdirectory of
- :file:`doc/api/next_api_changes/`, probably in the ``behavior/``
- subdirectory.
+The directives should be placed at the end of a description block. For example::
+
+ class Foo:
+ """
+ This is the summary.
+
+ Followed by a longer description block.
+
+ Consisting of multiple lines and paragraphs.
+
+ .. versionadded:: 3.5
+
+ Parameters
+ ----------
+ a : int
+ The first parameter.
+ b: bool, default: False
+ This was added later.
+
+ .. versionadded:: 3.6
+ """
+
+ def set_b(b):
+ """
+ Set b.
+
+ .. versionadded:: 3.6
+
+ Parameters
+ ----------
+ b: bool
+
+For classes and functions, the directive should be placed before the
+*Parameters* section. For parameters, the directive should be placed at the
+end of the parameter description. The patch release version is omitted and
+the directive should not be added to entire modules.
.. _pr-labels:
@@ -121,6 +260,8 @@ Labels
* If you have the rights to set labels, tag the PR with descriptive labels.
See the `list of labels `__.
+* If the PR makes changes to the wheel building Action, add the
+ "Run cibuildwheel" label to enable testing wheels.
.. _pr-milestones:
@@ -130,20 +271,20 @@ Milestones
* Set the milestone according to these rules:
* *New features and API changes* are milestoned for the next minor release
- ``v3.X.0``.
+ ``v3.N.0``.
- * *Bugfixes and docstring changes* are milestoned for the next patch
- release ``v3.X.Y``
+ * *Bugfixes, tests for released code, and docstring changes* are milestoned
+ for the next patch release ``v3.N.M``.
* *Documentation changes* (all .rst files and examples) are milestoned
- ``v3.X-doc``
+ ``v3.N-doc``.
If multiple rules apply, choose the first matching from the above list.
Setting a milestone does not imply or guarantee that a PR will be merged for that
release, but if it were to be merged what release it would be in.
- All of these PRs should target the master branch. The milestone tag triggers
+ All of these PRs should target the main branch. The milestone tag triggers
an :ref:`automatic backport ` for milestones which have
a corresponding branch.
@@ -159,7 +300,7 @@ Merging
core developers (those with commit rights) should review all pull
requests. If you are the first to review a PR and approve of the
changes use the GitHub `'approve review'
- `__
+ `__
tool to mark it as such. If you are a subsequent reviewer please
approve the review and if you think no more review is needed, merge
the PR.
@@ -219,6 +360,18 @@ will run on all supported platforms and versions of Python.
.. _tox: https://tox.readthedocs.io/
+* If you know your changes do not need to be tested (this is very rare!), all
+ CIs can be skipped for a given commit by including ``[ci skip]`` or
+ ``[skip ci]`` in the commit message. If you know only a subset of CIs need
+ to be run (e.g., if you are changing some block of plain reStructuredText and
+ want only CircleCI to run to render the result), individual CIs can be
+ skipped on individual commits as well by using the following substrings
+ in commit messages:
+
+ - GitHub Actions: ``[skip actions]``
+ - AppVeyor: ``[skip appveyor]`` (must be in the first line of the commit)
+ - Azure Pipelines: ``[skip azp]``
+ - CircleCI: ``[skip circle]``
.. _pr-squashing:
@@ -246,20 +399,20 @@ Number of commits and squashing
.. _branches_and_backports:
-Branches and Backports
+Branches and backports
======================
Current branches
----------------
The current active branches are
-*master*
+*main*
The current development version. Future minor releases (*v3.N.0*) will be
- branched from this. Supports Python 3.7+.
+ branched from this.
*v3.N.x*
Maintenance branch for Matplotlib 3.N. Future patch releases will be
- branched from this. Supports Python 3.6+.
+ branched from this.
*v3.N.M-doc*
Documentation for the current release. On a patch release, this will be
@@ -271,7 +424,7 @@ The current active branches are
Branch selection for pull requests
----------------------------------
-Generally, all pull requests should target the master branch.
+Generally, all pull requests should target the main branch.
Other branches are fed through :ref:`automatic ` or
:ref:`manual `. Directly
@@ -330,7 +483,7 @@ When doing backports please copy the form used by meeseekdev,
conflicts make note of them and how you resolved them in the commit
message.
-We do a backport from master to v2.2.x assuming:
+We do a backport from main to v2.2.x assuming:
* ``matplotlib`` is a read-only remote branch of the matplotlib/matplotlib repo
@@ -340,22 +493,26 @@ the merge notification) or through the git CLI tools.
Assuming that you already have a local branch ``v2.2.x`` (if not, then
``git checkout -b v2.2.x``), and that your remote pointing to
-``https://github.com/matplotlib/matplotlib`` is called ``upstream``::
+``https://github.com/matplotlib/matplotlib`` is called ``upstream``:
+
+.. code-block:: bash
- git fetch upstream
- git checkout v2.2.x # or include -b if you don't already have this.
- git reset --hard upstream/v2.2.x
- git cherry-pick -m 1 TARGET_SHA
- # resolve conflicts and commit if required
+ git fetch upstream
+ git checkout v2.2.x # or include -b if you don't already have this.
+ git reset --hard upstream/v2.2.x
+ git cherry-pick -m 1 TARGET_SHA
+ # resolve conflicts and commit if required
Files with conflicts can be listed by ``git status``,
and will have to be fixed by hand (search on ``>>>>>``). Once
the conflict is resolved, you will have to re-add the file(s) to the branch
-and then continue the cherry pick::
+and then continue the cherry pick:
+
+.. code-block:: bash
- git add lib/matplotlib/conflicted_file.py
- git add lib/matplotlib/conflicted_file2.py
- git cherry-pick --continue
+ git add lib/matplotlib/conflicted_file.py
+ git add lib/matplotlib/conflicted_file2.py
+ git cherry-pick --continue
Use your discretion to push directly to upstream or to open a PR; be
-sure to push or PR against the ``v2.2.x`` upstream branch, not ``master``!
+sure to push or PR against the ``v2.2.x`` upstream branch, not ``main``!
diff --git a/doc/devel/color_changes.rst b/doc/devel/color_changes.rst
index d36a873c7225..f7646ded7c14 100644
--- a/doc/devel/color_changes.rst
+++ b/doc/devel/color_changes.rst
@@ -1,10 +1,11 @@
.. _color_changes:
*********************
-Default Color changes
+Default color changes
*********************
-As discussed at length elsewhere [insert links], ``jet`` is an
+As discussed at length `elsewhere `__ ,
+``jet`` is an
empirically bad colormap and should not be the default colormap.
Due to the position that changing the appearance of the plot breaks
backward compatibility, this change has been put off for far longer
@@ -14,7 +15,7 @@ plots and to adopt a different colormap for filled plots (``imshow``,
``pcolor``, ``contourf``, etc) and for scatter like plots.
-Default Heat Map Colormap
+Default heat map colormap
-------------------------
The choice of a new colormap is fertile ground to bike-shedding ("No,
@@ -57,10 +58,10 @@ Nathaniel Smith) to evaluate proposed colormaps.
Example script
++++++++++++++
-Proposed Colormaps
+Proposed colormaps
++++++++++++++++++
-Default Scatter Colormap
+Default scatter colormap
------------------------
For heat-map like applications it can be desirable to cover as much of
@@ -99,10 +100,10 @@ Example script
qd = np.random.rand(np.prod(X.shape))
Q.set_array(qd)
-Proposed Colormaps
+Proposed colormaps
++++++++++++++++++
-Color Cycle / Qualitative colormap
+Color cycle / qualitative colormap
-----------------------------------
When plotting lines it is frequently desirable to plot multiple lines
@@ -131,5 +132,5 @@ Example script
ax2.set_xlim(0, 2*np.pi)
-Proposed Color cycle
+Proposed color cycle
++++++++++++++++++++
diff --git a/doc/devel/contributing.rst b/doc/devel/contributing.rst
index e0c0e9583bb9..6026c7b4d443 100644
--- a/doc/devel/contributing.rst
+++ b/doc/devel/contributing.rst
@@ -4,41 +4,100 @@
Contributing
============
-This project is a community effort, and everyone is welcome to
-contribute. Everyone within the community
-is expected to abide by our
-`code of conduct `_.
+You've discovered a bug or something else you want to change
+in Matplotlib — excellent!
-The project is hosted on
-https://github.com/matplotlib/matplotlib
+You've worked out a way to fix it — even better!
-Contributor Incubator
-=====================
-
-If you are interested in becoming a regular contributor to Matplotlib, but
-don't know where to start or feel insecure about it, you can join our non-public
-communication channel for new contributors. To do so, please go to `gitter
-`_ and ask to be added to '#incubator'.
-This is a private gitter room moderated by core Matplotlib developers where you can
-get guidance and support for your first few PRs. This is a place you can ask questions
-about anything: how to use git, github, how our PR review process works, technical questions
-about the code, what makes for good documentation or a blog post, how to get involved involved
-in community work, or get "pre-review" on your PR.
+You want to tell us about it — best of all!
+This project is a community effort, and everyone is welcome to
+contribute. Everyone within the community
+is expected to abide by our
+`code of conduct `_.
+
+Below, you can find a number of ways to contribute, and how to connect with the
+Matplotlib community.
+
+Get Connected
+=============
+
+Do I really have something to contribute to Matplotlib?
+-------------------------------------------------------
+
+100% yes. There are so many ways to contribute to our community.
+
+When in doubt, we recommend going together! Get connected with our community of
+active contributors, many of whom felt just like you when they started out and
+are happy to welcome you and support you as you get to know how we work, and
+where things are. Take a look at the next sections to learn more.
+
+Contributor incubator
+---------------------
+
+The incubator is our non-public communication channel for new contributors. It
+is a private gitter room moderated by core Matplotlib developers where you can
+get guidance and support for your first few PRs. It's a place you can ask
+questions about anything: how to use git, GitHub, how our PR review process
+works, technical questions about the code, what makes for good documentation
+or a blog post, how to get involved in community work, or get
+"pre-review" on your PR.
+
+To join, please go to our public `gitter
+`_ community channel, and ask to be
+added to '#incubator'. One of our core developers will see your message and will
+add you.
+
+New Contributors meeting
+------------------------
+
+Once a month, we host a meeting to discuss topics that interest new
+contributors. Anyone can attend, present, or sit in and listen to the call.
+Among our attendees are fellow new contributors, as well as maintainers, and
+veteran contributors, who are keen to support onboarding of new folks and
+share their experience. You can find our community calendar link at the
+`Scientific Python website `_, and
+you can browse previous meeting notes on `GitHub
+`_.
+We recommend joining the meeting to clarify any doubts, or lingering
+questions you might have, and to get to know a few of the people behind the
+GitHub handles 😉. You can reach out to @noatamir on `gitter
+`_ for any clarifications or
+suggestions. We <3 feedback!
.. _new_contributors:
-Issues for New Contributors
+Issues for new contributors
---------------------------
While any contributions are welcome, we have marked some issues as
-particularly suited for new contributors by the label
-`good first issue `_
-These are well documented issues, that do not require a deep understanding of
-the internals of Matplotlib. The issues may additionally be tagged with a
-difficulty. ``Difficulty: Easy`` is suited for people with little Python experience.
-``Difficulty: Medium`` and ``Difficulty: Hard`` are not trivial to solve and
-require more thought and programming experience.
+particularly suited for new contributors by the label `good first issue
+`_. These
+are well documented issues, that do not require a deep understanding of the
+internals of Matplotlib. The issues may additionally be tagged with a
+difficulty. ``Difficulty: Easy`` is suited for people with little Python
+experience. ``Difficulty: Medium`` and ``Difficulty: Hard`` require more
+programming experience. This could be for a variety of reasons, among them,
+though not necessarily all at the same time:
+
+- The issue is in areas of the code base which have more interdependencies,
+ or legacy code.
+- It has less clearly defined tasks, which require some independent
+ exploration, making suggestions, or follow-up discussions to clarify a good
+ path to resolve the issue.
+- It involves Python features such as decorators and context managers, which
+ have subtleties due to our implementation decisions.
+
+In general, the Matplotlib project does not assign issues. Issues are
+"assigned" or "claimed" by opening a PR; there is no other assignment
+mechanism. If you have opened such a PR, please comment on the issue thread to
+avoid duplication of work. Please check if there is an existing PR for the
+issue you are addressing. If there is, try to work with the author by
+submitting reviews of their code or commenting on the PR rather than opening
+a new PR; duplicate PRs are subject to being closed. However, if the existing
+PR is an outline, unlikely to work, or stalled, and the original author is
+unresponsive, feel free to open a new PR referencing the old one.
.. _submitting-a-bug-report:
@@ -73,11 +132,13 @@ If you are reporting a bug, please do your best to include the following:
>>> platform.python_version()
'3.9.2'
-We have preloaded the issue creation page with a Markdown template that you can
+We have preloaded the issue creation page with a Markdown form that you can
use to organize this information.
Thank you for your help in keeping bug reports complete, targeted and descriptive.
+.. _request-a-new-feature:
+
Requesting a new feature
========================
@@ -117,13 +178,13 @@ A brief overview is:
git clone https://github.com//matplotlib.git
4. Enter the directory and install the local version of Matplotlib.
- See ref`` for instructions
+ See :ref:`installing_for_devs` for instructions
5. Create a branch to hold your changes::
- git checkout -b my-feature origin/master
+ git checkout -b my-feature origin/main
- and start making changes. Never work in the ``master`` branch!
+ and start making changes. Never work in the ``main`` branch!
6. Work on this copy, on your computer, using Git to do the version control.
When you're done editing e.g., ``lib/matplotlib/collections.py``, do::
@@ -138,97 +199,8 @@ A brief overview is:
Finally, go to the web page of your fork of the Matplotlib repo, and click
'Pull request' to send your changes to the maintainers for review.
-.. seealso::
-
- * `Git documentation `_
- * `Git-Contributing to a Project `_
- * `Introduction to GitHub `_
- * :ref:`development-workflow` for best practices for Matplotlib
- * :ref:`using-git`
-
-Contributing pull requests
---------------------------
-
-It is recommended to check that your contribution complies with the following
-rules before submitting a pull request:
-
-* If your pull request addresses an issue, please use the title to describe the
- issue and mention the issue number in the pull request description to ensure
- that a link is created to the original issue.
-
-* All public methods should have informative docstrings with sample usage when
- appropriate. Use the `numpy docstring standard
- `_.
-
-* Formatting should follow the recommendations of `PEP8
- `__. You should consider
- installing/enabling automatic PEP8 checking in your editor. Part of the test
- suite is checking PEP8 compliance, things go smoother if the code is mostly
- PEP8 compliant to begin with.
-
-* Each high-level plotting function should have a simple example in the
- ``Example`` section of the docstring. This should be as simple as possible
- to demonstrate the method. More complex examples should go in the
- ``examples`` tree.
-
-* Changes (both new features and bugfixes) should be tested. See :ref:`testing`
- for more details.
-
-* Import the following modules using the standard scipy conventions::
-
- import numpy as np
- import numpy.ma as ma
- import matplotlib as mpl
- import matplotlib.pyplot as plt
- import matplotlib.cbook as cbook
- import matplotlib.patches as mpatches
-
- In general, Matplotlib modules should **not** import `.rcParams` using ``from
- matplotlib import rcParams``, but rather access it as ``mpl.rcParams``. This
- is because some modules are imported very early, before the `.rcParams`
- singleton is constructed.
-
-* If your change is a major new feature, add an entry to the ``What's new``
- section by adding a new file in ``doc/users/next_whats_new`` (see
- :file:`doc/users/next_whats_new/README.rst` for more information).
-
-* If you change the API in a backward-incompatible way, please document it in
- :file:`doc/api/next_api_changes/behavior`, by adding a new file with the
- naming convention ``99999-ABC.rst`` where the pull request number is followed
- by the contributor's initials. (see :file:`doc/api/api_changes.rst` for more
- information)
-
-* See below for additional points about :ref:`keyword-argument-processing`, if
- applicable for your pull request.
-
-In addition, you can check for common programming errors with the following
-tools:
-
-* Code with a good unittest coverage (at least 70%, better 100%), check with::
-
- python -m pip install coverage
- python -m pytest --cov=matplotlib --showlocals -v
-
-* No pyflakes warnings, check with::
-
- python -m pip install pyflakes
- pyflakes path/to/module.py
-
-.. note::
-
- The current state of the Matplotlib code base is not compliant with all
- of those guidelines, but we expect that enforcing those constraints on all
- new contributions will move the overall code base quality in the right
- direction.
-
-
-.. seealso::
-
- * :ref:`coding_guidelines`
- * :ref:`testing`
- * :ref:`documenting-matplotlib`
-
-
+For more detailed instructions on how to set up Matplotlib for development and
+best practices for contribution, see :ref:`installing_for_devs`.
.. _contributing_documentation:
@@ -264,7 +236,7 @@ Other ways to contribute
It also helps us if you spread the word: reference the project from your blog
and articles or link to it from your website! If Matplotlib contributes to a
project that leads to a scientific publication, please follow the
-:doc:`/citing` guidelines.
+:doc:`/users/project/citing` guidelines.
.. _coding_guidelines:
@@ -274,30 +246,66 @@ Coding guidelines
API changes
-----------
-Changes to the public API must follow a standard deprecation procedure to
-prevent unexpected breaking of code that uses Matplotlib.
-
-- Deprecations must be announced via a new file in
- a new file in :file:`doc/api/next_api_changes/deprecations/` with
- naming convention ``99999-ABC.rst`` where ``99999`` is the pull request
- number and ``ABC`` are the contributor's initials.
-- Deprecations are targeted at the next point-release (i.e. 3.x.0).
-- The deprecated API should, to the maximum extent possible, remain fully
- functional during the deprecation period. In cases where this is not
- possible, the deprecation must never make a given piece of code do something
- different than it was before; at least an exception should be raised.
-- If possible, usage of an deprecated API should emit a
- `.MatplotlibDeprecationWarning`. There are a number of helper tools for this:
-
- - Use ``cbook.warn_deprecated()`` for general deprecation warnings.
- - Use the decorator ``@cbook.deprecated`` to deprecate classes, functions,
- methods, or properties.
- - To warn on changes of the function signature, use the decorators
- ``@cbook._delete_parameter``, ``@cbook._rename_parameter``, and
- ``@cbook._make_keyword_only``.
-
-- Deprecated API may be removed two point-releases after they were deprecated.
-
+API consistency and stability are of great value. Therefore, API changes
+(e.g. signature changes, behavior changes, removals) will only be conducted
+if the added benefit is worth the user effort for adapting.
+
+Because we are a visualization library our primary output is the final
+visualization the user sees. Thus it is our :ref:`long standing
+` policy that the appearance of the figure is part of the API
+and any changes, either semantic or esthetic, will be treated as a
+backwards-incompatible API change.
+
+API changes in Matplotlib have to be performed following the deprecation process
+below, except in very rare circumstances as deemed necessary by the development team.
+This ensures that users are notified before the change will take effect and thus
+prevents unexpected breaking of code.
+
+Rules
+~~~~~
+
+- Deprecations are targeted at the next point.release (e.g. 3.x)
+- Deprecated API is generally removed two point-releases after introduction
+ of the deprecation. Longer deprecations can be imposed by core developers on
+ a case-by-case basis to give more time for the transition
+- The old API must remain fully functional during the deprecation period
+- If alternatives to the deprecated API exist, they should be available
+ during the deprecation period
+- If in doubt, decisions about API changes are finally made by the
+ API consistency lead developer
+
+Introducing
+~~~~~~~~~~~
+
+1. Announce the deprecation in a new file
+ :file:`doc/api/next_api_changes/deprecations/99999-ABC.rst` where ``99999``
+ is the pull request number and ``ABC`` are the contributor's initials.
+2. If possible, issue a `~matplotlib.MatplotlibDeprecationWarning` when the
+ deprecated API is used. There are a number of helper tools for this:
+
+ - Use ``_api.warn_deprecated()`` for general deprecation warnings
+ - Use the decorator ``@_api.deprecated`` to deprecate classes, functions,
+ methods, or properties
+ - To warn on changes of the function signature, use the decorators
+ ``@_api.delete_parameter``, ``@_api.rename_parameter``, and
+ ``@_api.make_keyword_only``
+
+ All these helpers take a first parameter *since*, which should be set to
+ the next point release, e.g. "3.x".
+
+ You can use standard rst cross references in *alternative*.
+
+Expiring
+~~~~~~~~
+
+1. Announce the API changes in a new file
+ :file:`doc/api/next_api_changes/[kind]/99999-ABC.rst` where ``99999``
+ is the pull request number and ``ABC`` are the contributor's initials, and
+ ``[kind]`` is one of the folders :file:`behavior`, :file:`development`,
+ :file:`removals`. See :file:`doc/api/next_api_changes/README.rst` for more
+ information. For the content, you can usually copy the deprecation notice
+ and adapt it slightly.
+2. Change the code functionality and remove any related deprecation warnings.
Adding new API
--------------
@@ -323,7 +331,7 @@ New modules and files: installation
* If you have added new files or directories, or reorganized existing
ones, make sure the new files are included in the match patterns in
- :file:`MANIFEST.in`, and/or in *package_data* in :file:`setup.py`.
+ in *package_data* in :file:`setupext.py`.
C/C++ extensions
----------------
@@ -342,28 +350,33 @@ C/C++ extensions
docstrings, and the Numpydoc format is well understood in the
scientific Python community.
+* C/C++ code in the :file:`extern/` directory is vendored, and should be kept
+ close to upstream whenever possible. It can be modified to fix bugs or
+ implement new features only if the required changes cannot be made elsewhere
+ in the codebase. In particular, avoid making style fixes to it.
+
.. _keyword-argument-processing:
Keyword argument processing
---------------------------
Matplotlib makes extensive use of ``**kwargs`` for pass-through customizations
-from one function to another. A typical example is in `matplotlib.pyplot.text`.
-The definition of the pylab text function is a simple pass-through to
-`matplotlib.axes.Axes.text`::
+from one function to another. A typical example is
+`~matplotlib.axes.Axes.text`. The definition of `matplotlib.pyplot.text` is a
+simple pass-through to `matplotlib.axes.Axes.text`::
- # in pylab.py
- def text(*args, **kwargs):
- return gca().text(*args, **kwargs)
+ # in pyplot.py
+ def text(x, y, s, fontdict=None, **kwargs):
+ return gca().text(x, y, s, fontdict=fontdict, **kwargs)
-`~matplotlib.axes.Axes.text` in simplified form looks like this, i.e., it just
+`matplotlib.axes.Axes.text` (simplified for illustration) just
passes all ``args`` and ``kwargs`` on to ``matplotlib.text.Text.__init__``::
# in axes/_axes.py
- def text(self, x, y, s, fontdict=None, withdash=False, **kwargs):
+ def text(self, x, y, s, fontdict=None, **kwargs):
t = Text(x=x, y=y, text=s, **kwargs)
-and ``matplotlib.text.Text.__init__`` (again with liberties for illustration)
+and ``matplotlib.text.Text.__init__`` (again, simplified)
just passes them on to the `matplotlib.artist.Artist.update` method::
# in text.py
@@ -434,11 +447,13 @@ or manually with ::
logging.basicConfig(level=logging.DEBUG)
import matplotlib.pyplot as plt
-Then they will receive messages like::
+Then they will receive messages like
+
+.. code-block:: none
- DEBUG:matplotlib.backends:backend MacOSX version unknown
- DEBUG:matplotlib.yourmodulename:Here is some information
- DEBUG:matplotlib.yourmodulename:Here is some more detailed information
+ DEBUG:matplotlib.backends:backend MacOSX version unknown
+ DEBUG:matplotlib.yourmodulename:Here is some information
+ DEBUG:matplotlib.yourmodulename:Here is some more detailed information
Which logging level to use?
~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -483,14 +498,14 @@ Matplotlib. For example, for the module::
if bottom == top:
warnings.warn('Attempting to set identical bottom==top')
-
running the script::
from matplotlib import my_matplotlib_module
- my_matplotlib_module.set_range(0, 0) #set range
+ my_matplotlib_module.set_range(0, 0) # set range
+will display
-will display::
+.. code-block:: none
UserWarning: Attempting to set identical bottom==top
warnings.warn('Attempting to set identical bottom==top')
@@ -503,10 +518,12 @@ Modifying the module to use `._api.warn_external`::
if bottom == top:
_api.warn_external('Attempting to set identical bottom==top')
-and running the same script will display::
+and running the same script will display
+
+.. code-block:: none
- UserWarning: Attempting to set identical bottom==top
- my_matplotlib_module.set_range(0, 0) #set range
+ UserWarning: Attempting to set identical bottom==top
+ my_matplotlib_module.set_range(0, 0) # set range
.. _logging tutorial: https://docs.python.org/3/howto/logging.html#logging-basic-tutorial
diff --git a/doc/devel/dependencies.rst b/doc/devel/dependencies.rst
index c28283517005..da67cae0061e 100644
--- a/doc/devel/dependencies.rst
+++ b/doc/devel/dependencies.rst
@@ -4,84 +4,95 @@
Dependencies
============
+Runtime dependencies
+====================
+
+
Mandatory dependencies
-======================
+----------------------
When installing through a package manager like ``pip`` or ``conda``, the
mandatory dependencies are automatically installed. This list is mainly for
reference.
-* `Python `_ (>= 3.7)
-* `NumPy `_ (>= 1.16)
-* `setuptools `_
+* `Python `_ (>= 3.8)
+* `contourpy `_ (>= 1.0.1)
* `cycler `_ (>= 0.10.0)
-* `dateutil `_ (>= 2.7)
+* `dateutil `_ (>= 2.7)
+* `fontTools `_ (>= 4.22.0)
* `kiwisolver `_ (>= 1.0.1)
+* `NumPy `_ (>= 1.20)
+* `packaging `_ (>= 20.0)
* `Pillow `_ (>= 6.2)
-* `pyparsing `_ (>=2.2.1)
+* `pyparsing `_ (>= 2.3.1)
+* `setuptools `_
+* `pyparsing `_ (>= 2.3.1)
+* `importlib-resources `_
+ (>= 3.2.0; only required on Python < 3.10)
.. _optional_dependencies:
Optional dependencies
-=====================
+---------------------
The following packages and tools are not required but extend the capabilities
of Matplotlib.
Backends
---------
+~~~~~~~~
Matplotlib figures can be rendered to various user interfaces. 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_ (>= 8.4, != 8.6.0 or 8.6.1): for the Tk-based backends. Tk is part of
+ most standard Python installations, but it's not part of Python itself and
+ thus may not be present in rare cases.
+* PyQt6_ (>= 6.1), PySide6_, PyQt5_, or PySide2_: for the Qt-based backends.
+* PyGObject_ and pycairo_ (>= 1.14.0): for the GTK-based backends. If using pip
+ (but not conda or system package manager) PyGObject must be built from
+ source; see `pygobject documentation
+ `_.
+* pycairo_ (>= 1.14.0) or cairocffi_ (>= 0.8): for cairo-based backends.
+* wxPython_ (>= 4): for the wx-based backends. If using pip (but not conda or
+ system package manager) on Linux wxPython wheels must be manually downloaded
+ from https://wxpython.org/pages/downloads/.
+* Tornado_ (>= 5): for the WebAgg backend.
+* ipykernel_: for the nbagg backend.
+* macOS (>= 10.12): for the macosx 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
+.. _PyQt5: https://pypi.org/project/PyQt5/
+.. _PySide2: https://pypi.org/project/PySide2/
+.. _PyQt6: https://pypi.org/project/PyQt6/
+.. _PySide6: https://pypi.org/project/PySide6/
.. _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
-
-.. [#] Tk is part of most standard Python installations, but it's not part of
- Python itself and thus may not be present in rare cases.
-.. [#] 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/.
+.. _Tornado: https://pypi.org/project/tornado/
+.. _ipykernel: https://pypi.org/project/ipykernel/
Animations
-----------
+~~~~~~~~~~
* `ffmpeg `_: for saving movies.
* `ImageMagick `_: for saving
animated gifs.
Font handling and rendering
----------------------------
+~~~~~~~~~~~~~~~~~~~~~~~~~~~
* `LaTeX `_ (with `cm-super
- `__ ) and `GhostScript (>=9.0)
- `_ : for rendering text with LaTeX.
+ `__ and `underscore
+ `__) and `GhostScript (>= 9.0)
+ `_: for rendering text with LaTeX.
* `fontconfig `_ (>= 2.7): for detection of system
fonts on Linux.
C libraries
-===========
+-----------
Matplotlib brings its own copies of the following libraries:
@@ -102,7 +113,7 @@ rasterize characters differently) and of Qhull. As an exception, Matplotlib
defaults to the system version of FreeType on AIX.
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:
+your system, create a :file:`mplsetup.cfg` file with the following contents:
.. code-block:: cfg
@@ -161,3 +172,164 @@ 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
+
+
+Minimum pip / manylinux support (linux)
+---------------------------------------
+
+Matplotlib publishes `manylinux wheels `_
+which have a minimum version of pip which will recognize the wheels
+
+- Python 3.8: ``manylinx2010`` / pip >= 19.0
+- Python 3.9+: ``manylinx2014`` / pip >= 19.3
+
+In all cases the required version of pip is embedded in the CPython source.
+
+
+
+.. _development-dependencies:
+
+Dependencies for building Matplotlib
+====================================
+
+.. _setup-dependencies:
+
+Setup dependencies
+------------------
+
+- `certifi `_ (>= 2020.06.20). Used while
+ downloading the freetype and QHull source during build. This is not a
+ runtime dependency.
+- `setuptools_scm `_ (>= 7). Used to
+ update the reported ``mpl.__version__`` based on the current git commit.
+ Also a runtime dependency for editable installs.
+- `NumPy `_ (>= 1.20). Also a runtime dependency.
+
+
+.. _compile-dependencies:
+
+C++ compiler
+------------
+
+Matplotlib requires a C++ compiler that supports C++11.
+
+- `gcc 4.8.1 `_ or higher. For gcc <6.5 you will
+ need to set ``$CFLAGS=-std=c++11`` to enable C++11 support.
+ `Installing GCC: Binaries `_.
+- `clang 3.3 `_ or higher.
+ `LLVM Download Page `_.
+- `Visual Studio 2015
+ `_
+ (aka VS 14.0) or higher. A free version of Build Tools for Visual Studio is available for
+ `download `_.
+
+
+.. _test-dependencies:
+
+Dependencies for testing Matplotlib
+===================================
+This section lists the additional software required for
+:ref:`running the tests `.
+
+Required:
+
+- pytest_ (>= 3.6)
+
+Optional:
+
+In addition to all of the optional dependencies on the main library, for
+testing the following will be used if they are installed.
+
+- Ghostscript_ (>= 9.0, to render PDF files)
+- Inkscape_ (to render SVG files)
+- nbformat_ and nbconvert_ used to test the notebook backend
+- pandas_ used to test compatibility with Pandas
+- pikepdf_ used in some tests for the pgf and pdf backends
+- psutil_ used in testing the interactive backends
+- pytest-cov_ (>= 2.3.1) to collect coverage information
+- pytest-flake8_ to test coding standards using flake8_
+- pytest-timeout_ to limit runtime in case of stuck tests
+- pytest-xdist_ to run tests in parallel
+- pytest-xvfb_ to run tests without windows popping up (Linux)
+- pytz_ used to test pytz int
+- sphinx_ used to test our sphinx extensions
+- WenQuanYi Zen Hei and `Noto Sans CJK `_
+ fonts for testing font fallback and non-western fonts
+- xarray_ used to test compatibility with xarray
+
+If any of these dependencies are not discovered the tests that rely on them
+will be skipped by pytest.
+
+.. note::
+
+ When installing Inkscape on Windows, make sure that you select “Add
+ Inkscape to system PATHâ€, either for all users or current user, or the
+ tests will not find it.
+
+.. _Ghostscript: https://ghostscript.com/
+.. _Inkscape: https://inkscape.org
+.. _flake8: https://pypi.org/project/flake8/
+.. _nbconvert: https://pypi.org/project/nbconvert/
+.. _nbformat: https://pypi.org/project/nbformat/
+.. _pandas: https://pypi.org/project/pandas/
+.. _pikepdf: https://pypi.org/project/pikepdf/
+.. _psutil: https://pypi.org/project/psutil/
+.. _pytz: https://fonts.google.com/noto/use#faq
+.. _pytest-cov: https://pytest-cov.readthedocs.io/en/latest/
+.. _pytest-flake8: https://pypi.org/project/pytest-flake8/
+.. _pytest-timeout: https://pypi.org/project/pytest-timeout/
+.. _pytest-xdist: https://pypi.org/project/pytest-xdist/
+.. _pytest-xvfb: https://pypi.org/project/pytest-xvfb/
+.. _pytest: http://doc.pytest.org/en/latest/
+.. _sphinx: https://pypi.org/project/Sphinx/
+.. _xarray: https://pypi.org/project/xarray/
+
+
+.. _doc-dependencies:
+
+Dependencies for building Matplotlib's documentation
+====================================================
+
+Python packages
+---------------
+The additional Python packages required to build the
+:ref:`documentation ` are listed in
+:file:`doc-requirements.txt` and can be installed using ::
+
+ pip install -r requirements/doc/doc-requirements.txt
+
+The content of :file:`doc-requirements.txt` is also shown below:
+
+ .. include:: ../../requirements/doc/doc-requirements.txt
+ :literal:
+
+Additional external dependencies
+--------------------------------
+Required:
+
+* a minimal working LaTeX distribution, e.g., `TeX Live `_ or
+ `MikTeX `_
+* `Graphviz `_
+* the following LaTeX packages (if your OS bundles TeX Live, the
+ "complete" version of the installer, e.g. "texlive-full" or "texlive-all",
+ will often automatically include these packages):
+
+ * `cm-super `_
+ * `dvipng `_
+ * `underscore `_
+
+Optional, but recommended:
+
+* `Inkscape `_
+* `optipng `_
+* the font "Humor Sans" (aka the "XKCD" font), or the free alternative
+ `Comic Neue `_
+* the font "Times New Roman"
+
+.. note::
+
+ The documentation will not build without LaTeX and Graphviz. These are not
+ Python packages and must be installed separately. The documentation can be
+ built without Inkscape and optipng, but the build process will raise various
+ warnings. If the build process warns that you are missing fonts, make sure
+ your LaTeX distribution bundles cm-super or install it separately.
diff --git a/doc/devel/development_setup.rst b/doc/devel/development_setup.rst
index a511e4a6aef3..afcd63b3bf15 100644
--- a/doc/devel/development_setup.rst
+++ b/doc/devel/development_setup.rst
@@ -1,49 +1,127 @@
+.. redirect-from:: /devel/gitwash/configure_git
+.. redirect-from:: /devel/gitwash/dot2_dot3
+.. redirect-from:: /devel/gitwash/following_latest
+.. redirect-from:: /devel/gitwash/forking_hell
+.. redirect-from:: /devel/gitwash/git_development
+.. redirect-from:: /devel/gitwash/git_install
+.. redirect-from:: /devel/gitwash/git_intro
+.. redirect-from:: /devel/gitwash/git_resources
+.. redirect-from:: /devel/gitwash/patching
+.. redirect-from:: /devel/gitwash/set_up_fork
+.. redirect-from:: /devel/gitwash/index
+
.. _installing_for_devs:
=====================================
Setting up Matplotlib for development
=====================================
+To set up Matplotlib for development follow these steps:
+
+.. contents::
+ :local:
+
+Fork the Matplotlib repository
+==============================
+
+Matplotlib is hosted at https://github.com/matplotlib/matplotlib.git. If you
+plan on solving issues or submit pull requests to the main Matplotlib
+repository, you should first *fork* this repository by visiting
+https://github.com/matplotlib/matplotlib.git and clicking on the
+``Fork`` button on the top right of the page (see
+`the GitHub documentation `__ for more details.)
+
+Retrieve the latest version of the code
+=======================================
+
+Now that your fork of the repository lives under your GitHub username, you can
+retrieve the latest sources with one of the following commands (where your
+should replace ```` with your GitHub username):
+
+.. tab-set::
+
+ .. tab-item:: https
+
+ .. code-block:: bash
+
+ git clone https://github.com//matplotlib.git
+
+ .. tab-item:: ssh
+
+ .. code-block:: bash
+
+ git clone git@github.com:/matplotlib.git
+
+ This requires you to setup an `SSH key`_ in advance, but saves you from
+ typing your password at every connection.
+
+ .. _SSH key: https://docs.github.com/en/authentication/connecting-to-github-with-ssh
+
+
+This will place the sources in a directory :file:`matplotlib` below your
+current working directory, set up the ``origin`` remote to point to your own
+fork, and set up the ``upstream`` remote to point to the Matplotlib main
+repository (see also `Managing remote repositories `__.)
+Change into this directory before continuing::
+
+ cd matplotlib
+
+.. note::
+
+ For more information on ``git`` and ``GitHub``, check the following resources.
+
+ * `Git documentation `_
+ * `GitHub-Contributing to a Project `_
+ * `GitHub Skills `_
+ * :ref:`using-git`
+ * :ref:`git-resources`
+ * `Installing git `_
+ * https://tacaswell.github.io/think-like-git.html
+ * https://tom.preston-werner.com/2009/05/19/the-git-parable.html
+
.. _dev-environment:
-Creating a dedicated environment
-================================
+Create a dedicated environment
+==============================
You should set up a dedicated environment to decouple your Matplotlib
development from other Python and Matplotlib installations on your system.
-Here we use python's virtual environment `venv`_, but you may also use others
-such as conda.
+
+The simplest way to do this is to use either Python's virtual environment
+`venv`_ or `conda`_.
.. _venv: https://docs.python.org/3/library/venv.html
+.. _conda: https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html
-A new environment can be set up with ::
+.. tab-set::
- python -m venv
+ .. tab-item:: venv environment
-and activated with one of the following::
+ Create a new `venv`_ environment with ::
- source /bin/activate # Linux/macOS
- \Scripts\activate.bat # Windows cmd.exe
- \Scripts\Activate.ps1 # Windows PowerShell
+ python -m venv
-Whenever you plan to work on Matplotlib, remember to activate the development
-environment in your shell.
+ and activate it with one of the following ::
-Retrieving the latest version of the code
-=========================================
+ source /bin/activate # Linux/macOS
+ \Scripts\activate.bat # Windows cmd.exe
+ \Scripts\Activate.ps1 # Windows PowerShell
-Matplotlib is hosted at https://github.com/matplotlib/matplotlib.git.
+ .. tab-item:: conda environment
-You can retrieve the latest sources with the command (see
-:ref:`set-up-fork` for more details)::
+ Create a new `conda`_ environment with ::
- git clone https://github.com/matplotlib/matplotlib.git
+ conda env create -f environment.yml
-This will place the sources in a directory :file:`matplotlib` below your
-current working directory.
+ You can use ``mamba`` instead of ``conda`` in the above command if
+ you have `mamba`_ installed.
+
+ .. _mamba: https://mamba.readthedocs.io/en/latest/
+
+ Activate the environment using ::
-If you have the proper privileges, you can use ``git@`` instead of
-``https://``, which works through the ssh protocol and might be easier to use
-if you are using 2-factor authentication.
+ conda activate mpl-dev
+
+Remember to activate the environment whenever you start working on Matplotlib.
Installing Matplotlib in editable mode
======================================
@@ -60,76 +138,20 @@ true for ``*.py`` files. If you change the C-extension source (which might
also happen if you change branches) you will have to re-run
``python -m pip install -ve .``
-.. _test-dependencies:
-
-Additional dependencies for testing
+Install pre-commit hooks (optional)
===================================
-This section lists the additional software required for
-:ref:`running the tests `.
-
-Required:
-
-- pytest_ (>=3.6)
-- Ghostscript_ (>= 9.0, to render PDF files)
-- Inkscape_ (to render SVG files)
-
-Optional:
+`pre-commit `_ hooks automatically check flake8 and
+other style issues when you run ``git commit``. The hooks are defined in the
+top level ``.pre-commit-config.yaml`` file. To install the hooks ::
-- pytest-cov_ (>=2.3.1) to collect coverage information
-- pytest-flake8_ to test coding standards using flake8_
-- pytest-timeout_ to limit runtime in case of stuck tests
-- pytest-xdist_ to run tests in parallel
+ python -m pip install pre-commit
+ pre-commit install
-.. _pytest: http://doc.pytest.org/en/latest/
-.. _Ghostscript: https://www.ghostscript.com/
-.. _Inkscape: https://inkscape.org
-.. _pytest-cov: https://pytest-cov.readthedocs.io/en/latest/
-.. _pytest-flake8: https://pypi.org/project/pytest-flake8/
-.. _pytest-xdist: https://pypi.org/project/pytest-xdist/
-.. _pytest-timeout: https://pypi.org/project/pytest-timeout/
-.. _flake8: https://pypi.org/project/flake8/
+The hooks can also be run manually. All the hooks can be run, in order as
+listed in ``.pre-commit-config.yaml``, against the full codebase with ::
+ pre-commit run --all-files
-.. _doc-dependencies:
-
-Additional dependencies for building documentation
-==================================================
-
-Python packages
----------------
-The additional Python packages required to build the
-:ref:`documentation ` are listed in
-:file:`doc-requirements.txt` and can be installed using ::
-
- pip install -r requirements/doc/doc-requirements.txt
-
-The content of :file:`doc-requirements.txt` is also shown below:
-
- .. include:: ../../requirements/doc/doc-requirements.txt
- :literal:
-
-Additional external dependencies
---------------------------------
-Required:
-
-* a minimal working LaTeX distribution
-* `Graphviz `_
-* the LaTeX packages *cm-super* and *dvipng*. If your OS bundles ``TexLive``,
- then often the "complete" version of the installer will automatically include
- these packages (e.g. "texlive-full" or "texlive-all").
-
-Optional, but recommended:
-
-* `Inkscape `_
-* `optipng `_
-* the font "Humor Sans" (aka the "XKCD" font), or the free alternative
- `Comic Neue `_.
-* the font "Times New Roman"
-
-.. note::
+To run a particular hook manually, run ``pre-commit run`` with the hook id ::
- The documentation will not build without LaTeX and Graphviz. These are not
- Python packages and must be installed separately. The documentation can be
- built without Inkscape and optipng, but the build process will raise various
- warnings. If the build process warns that you are missing fonts, make sure
- your LaTeX distribution bundles cm-super or install it separately.
\ No newline at end of file
+ pre-commit run --all-files
diff --git a/doc/devel/development_workflow.rst b/doc/devel/development_workflow.rst
new file mode 100644
index 000000000000..cd902f3f30e5
--- /dev/null
+++ b/doc/devel/development_workflow.rst
@@ -0,0 +1,430 @@
+.. highlight:: bash
+
+.. _development-workflow:
+
+####################
+Development workflow
+####################
+
+Workflow summary
+================
+
+To keep your work well organized, with readable history, and in turn make it
+easier for project maintainers (that might be you) to see what you've done, and
+why you did it, we recommend the following:
+
+* Don't use your ``main`` branch for anything. Consider deleting it.
+* Before starting a new set of changes, fetch all changes from
+ ``upstream/main``, and start a new *feature branch* from that.
+* Make a new branch for each feature or bug fix — "one task, one branch".
+* Name your branch for the purpose of the changes - e.g.
+ ``bugfix-for-issue-14`` or ``refactor-database-code``.
+* If you get stuck, reach out on Gitter or
+ `discourse `__.
+* When you're ready or need feedback on your code, open a pull request so that the
+ Matplotlib developers can give feedback and eventually include your suggested
+ code into the ``main`` branch.
+
+.. note::
+
+ It may sound strange, but deleting your own ``main`` branch can help reduce
+ confusion about which branch you are on. See `deleting main on GitHub`_ for
+ details.
+
+.. _deleting main on GitHub: https://matthew-brett.github.io/pydagogue/gh_delete_master.html
+
+.. _update-mirror-main:
+
+Update the ``main`` branch
+==========================
+
+First make sure you have followed :ref:`installing_for_devs`.
+
+From time to time you should fetch the upstream changes from GitHub::
+
+ git fetch upstream
+
+This will pull down any commits you don't have, and set the remote branches to
+point to the right commit.
+
+.. _make-feature-branch:
+
+Make a new feature branch
+=========================
+
+When you are ready to make some changes to the code, you should start a new
+branch. Branches that are for a collection of related edits are often called
+'feature branches'.
+
+Making a new branch for each set of related changes will make it easier for
+someone reviewing your branch to see what you are doing.
+
+Choose an informative name for the branch to remind yourself and the rest of us
+what the changes in the branch are for. For example ``add-ability-to-fly``, or
+``bugfix-for-issue-42``.
+
+::
+
+ # Update the main branch
+ git fetch upstream
+ # Make new feature branch starting at current main
+ git branch my-new-feature upstream/main
+ git checkout my-new-feature
+
+Generally, you will want to keep your feature branches on your public GitHub
+fork of Matplotlib. To do this, you ``git push`` this new branch up to your
+GitHub repo. Generally (if you followed the instructions in these pages, and by
+default), git will have a link to your fork of the GitHub repo, called
+``origin``. You push up to your own fork with::
+
+ git push origin my-new-feature
+
+In git >= 1.7 you can ensure that the link is correctly set by using the
+``--set-upstream`` option::
+
+ git push --set-upstream origin my-new-feature
+
+From now on git will know that ``my-new-feature`` is related to the
+``my-new-feature`` branch in the GitHub repo.
+
+.. _edit-flow:
+
+The editing workflow
+====================
+
+Overview
+--------
+
+::
+
+ # hack hack
+ git add my_new_file
+ git commit -am 'NF - some message'
+ git push
+
+In more detail
+--------------
+
+#. Make some changes
+#. See which files have changed with ``git status``.
+ You'll see a listing like this one:
+
+ .. code-block:: none
+
+ # On branch ny-new-feature
+ # Changed but not updated:
+ # (use "git add ..." to update what will be committed)
+ # (use "git checkout -- ..." to discard changes in working directory)
+ #
+ # modified: README
+ #
+ # Untracked files:
+ # (use "git add ..." to include in what will be committed)
+ #
+ # INSTALL
+ no changes added to commit (use "git add" and/or "git commit -a")
+
+#. Check what the actual changes are with ``git diff``.
+#. Add any new files to version control ``git add new_file_name``.
+#. To commit all modified files into the local copy of your repo,, do
+ ``git commit -am 'A commit message'``. Note the ``-am`` options to
+ ``commit``. The ``m`` flag just signals that you're going to type a
+ message on the command line. The ``a`` flag — you can just take on
+ faith — or see `why the -a flag?`_. The
+ `git commit `_ manual page might also be
+ useful.
+#. To push the changes up to your forked repo on GitHub, do a ``git
+ push``.
+
+.. _why the -a flag?: http://gitready.com/beginner/2009/01/18/the-staging-area.html
+
+
+Open a pull request
+===================
+
+When you are ready to ask for someone to review your code and consider a merge,
+`submit your Pull Request (PR) `_.
+
+Enter a title for the set of changes with some explanation of what you've done.
+Mention anything you'd like particular attention for - such as a
+complicated change or some code you are not happy with.
+
+If you don't think your request is ready to be merged, just say so in your pull
+request message and use the "Draft PR" feature of GitHub. This is a good way of
+getting some preliminary code review.
+
+Some other things you might want to do
+======================================
+
+Explore your repository
+-----------------------
+
+To see a graphical representation of the repository branches and
+commits::
+
+ gitk --all
+
+To see a linear list of commits for this branch::
+
+ git log
+
+
+.. _recovering-from-mess-up:
+
+Recovering from mess-ups
+------------------------
+
+Sometimes, you mess up merges or rebases. Luckily, in git it is
+relatively straightforward to recover from such mistakes.
+
+If you mess up during a rebase::
+
+ git rebase --abort
+
+If you notice you messed up after the rebase::
+
+ # reset branch back to the saved point
+ git reset --hard tmp
+
+If you forgot to make a backup branch::
+
+ # look at the reflog of the branch
+ git reflog show cool-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
+ ...
+
+ # reset the branch to where it was before the botched rebase
+ git reset --hard cool-feature@{2}
+
+.. _rewriting-commit-history:
+
+Rewriting commit history
+------------------------
+
+.. note::
+
+ Do this only for your own feature branches.
+
+Is there an embarrassing typo in a commit you made? Or perhaps you
+made several false starts you don't want posterity to see.
+
+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.
+ ...
+
+and ``6ad92e5`` is the last commit in the ``cool-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.
+
+We do as follows::
+
+ # make a backup of the current state
+ git branch tmp HEAD
+ # interactive rebase
+ git rebase -i 6ad92e5
+
+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
+
+ # Rebase 6ad92e5..eadc391 onto 6ad92e5
+ #
+ # 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
+ #
+ # If you remove a line here THAT COMMIT WILL BE LOST.
+ # However, if you remove everything, the rebase will be aborted.
+ #
+
+To achieve what we want, we will make the following changes to it::
+
+ r 13d7934 First implementation
+ pick 2dec1ac Fix a few bugs + disable
+ f a815645 Modify it so that it works
+ f eadc391 Fix some remaining bugs
+
+This means that (i) we want to edit the commit message for
+``13d7934``, and (ii) collapse the last three commits into one. Now we
+save and quit the editor.
+
+Git will then immediately bring up an editor for editing the commit
+message. After revising it, we get the output::
+
+ [detached HEAD 721fc64] FOO: First implementation
+ 2 files changed, 199 insertions(+), 66 deletions(-)
+ [detached HEAD 0f22701] Fix a few bugs + disable
+ 1 files changed, 79 insertions(+), 61 deletions(-)
+ Successfully rebased and updated refs/heads/my-feature-branch.
+
+and now, the history looks like this::
+
+ 0f22701 Fix a few bugs + disable
+ 721fc64 ENH: Sophisticated feature
+ 6ad92e5 * masked is now an instance of a new object, MaskedConstant
+
+If it went wrong, recovery is again possible as explained :ref:`above
+`.
+
+If you have not yet pushed this branch to github, you can carry on as normal,
+however if you *have* already pushed this commit see :ref:`force-push` for how
+to replace your already published commits with the new ones.
+
+
+.. _rebase-on-main:
+
+Rebasing on ``upstream/main``
+-----------------------------
+
+Let's say you thought of some work you'd like to do. You
+:ref:`update-mirror-main` and :ref:`make-feature-branch` called
+``cool-feature``. At this stage, ``main`` is at some commit, let's call it E.
+Now you make some new commits on your ``cool-feature`` branch, let's call them
+A, B, C. Maybe your changes take a while, or you come back to them after a
+while. In the meantime, ``main`` has progressed from commit E to commit (say) G:
+
+.. code-block:: none
+
+ A---B---C cool-feature
+ /
+ D---E---F---G main
+
+At this stage you consider merging ``main`` into your feature branch, and you
+remember that this page sternly advises you not to do that, because the
+history will get messy. Most of the time, you can just ask for a review without
+worrying about whether ``main`` has got a little ahead; however sometimes, the changes in
+``main`` might affect your changes, and you need to harmonize them. In this
+situation you may prefer to do a rebase.
+
+``rebase`` takes your changes (A, B, C) and replays them as if they had been
+made to the current state of ``main``. In other words, in this case, it takes
+the changes represented by A, B, C and replays them on top of G. After the
+rebase, your history will look like this:
+
+.. code-block:: none
+
+ A'--B'--C' cool-feature
+ /
+ D---E---F---G main
+
+See `rebase without tears`_ for more detail.
+
+.. _rebase without tears: https://matthew-brett.github.io/pydagogue/rebase_without_tears.html
+
+To do a rebase on ``upstream/main``::
+
+ # Fetch changes from upstream/main
+ git fetch upstream
+ # go to the feature branch
+ git checkout cool-feature
+ # make a backup in case you mess up
+ git branch tmp cool-feature
+ # rebase cool-feature onto main
+ git rebase --onto upstream/main upstream/main cool-feature
+
+In this situation, where you are already on branch ``cool-feature``, the last
+command can be written more succinctly as::
+
+ git rebase upstream/main
+
+When all looks good, you can delete your backup branch::
+
+ git branch -D tmp
+
+If it doesn't look good you may need to have a look at
+:ref:`recovering-from-mess-up`.
+
+If you have made changes to files that have also changed in ``main``, this may
+generate merge conflicts that you need to resolve - see the `git rebase`_ man
+page for some instructions at the end of the "Description" section. There is
+some related help on merging in the git user manual - see `resolving a merge`_.
+
+.. _git rebase: https://git-scm.com/docs/git-rebase
+.. _resolving a merge: https://schacon.github.io/git/user-manual.html#resolving-a-merge
+
+
+If you have not yet pushed this branch to github, you can carry on as normal,
+however if you *have* already pushed this commit see :ref:`force-push` for how
+to replace your already published commits with the new ones.
+
+
+.. _force-push:
+
+
+Pushing, with force
+-------------------
+
+
+If you have in some way re-written already pushed history (e.g. via
+:ref:`rewriting-commit-history` or :ref:`rebase-on-main`) leaving you with
+a git history that looks something like
+
+.. code-block:: none
+
+ A'--E cool-feature
+ /
+ D---A---B---C origin/cool-feature
+
+where you have pushed the commits ``A,B,C`` to your fork on GitHub (under the
+remote name *origin*) but now have the commits ``A'`` and ``E`` on your local
+branch *cool-feature*. If you try to push the new commits to GitHub, it will
+fail and show an error that looks like ::
+
+ $ git push
+ Pushing to github.com:origin/matplotlib.git
+ To github.com:origin/matplotlib.git
+ ! [rejected] cool_feature -> cool_feature (non-fast-forward)
+ error: failed to push some refs to 'github.com:origin/matplotlib.git'
+ hint: Updates were rejected because the tip of your current branch is behind
+ hint: its remote counterpart. Integrate the remote changes (e.g.
+ hint: 'git pull ...') before pushing again.
+ hint: See the 'Note about fast-forwards' in 'git push --help' for details.
+
+If this push had succeeded, the commits ``A``, ``B``, and ``C`` would no
+longer be referenced by any branch and they would be discarded:
+
+.. code-block:: none
+
+ D---A'---E cool-feature, origin/cool-feature
+
+By default ``git push`` helpfully tries to protect you from accidentally
+discarding commits by rejecting the push to the remote. When this happens,
+GitHub also adds the helpful suggestion to pull the remote changes and then try
+pushing again. In some cases, such as if you and a colleague are both
+committing and pushing to the same branch, this is a correct course of action.
+
+However, in the case of having intentionally re-written history, we *want* to
+discard the commits on the remote and replace them with the new-and-improved
+versions from our local branch. In this case, what we want to do is ::
+
+ $ git push --force-with-lease
+
+which tells git you are aware of the risks and want to do the push anyway. We
+recommend using ``--force-with-lease`` over the ``--force`` flag. The
+``--force`` will do the push no matter what, whereas ``--force-with-lease``
+will only do the push if the remote branch is where the local ``git`` client
+thought it was.
+
+Be judicious with force-pushing. It is effectively re-writing published
+history, and if anyone has fetched the old commits, it will have a different view
+of history which can cause confusion.
diff --git a/doc/devel/documenting_mpl.rst b/doc/devel/documenting_mpl.rst
index e232900265d2..b814e67cd308 100644
--- a/doc/devel/documenting_mpl.rst
+++ b/doc/devel/documenting_mpl.rst
@@ -4,47 +4,41 @@
Writing documentation
=====================
-.. contents:: Contents
- :depth: 3
- :local:
- :backlinks: top
- :class: multicol-toc
-
-
Getting started
===============
General file structure
----------------------
-All documentation is built from the :file:`doc/`, :file:`tutorials/`, and
-:file:`examples/` directories. The :file:`doc/` directory contains
-configuration files for Sphinx and reStructuredText (ReST_; ``.rst``) files
-that are rendered to documentation pages.
-
-
-The main entry point is :file:`doc/index.rst`, which pulls in the
-:file:`index.rst` file for the users guide (:file:`doc/users`), developers
-guide (:file:`doc/devel`), api reference (:file:`doc/api`), and FAQs
-(:file:`doc/faq`). The documentation suite is built as a single document in
-order to make the most effective use of cross referencing.
+All documentation is built from the :file:`doc/`. The :file:`doc/`
+directory contains configuration files for Sphinx and reStructuredText
+(ReST_; ``.rst``) files that are rendered to documentation pages.
-Sphinx_ also creates ``.rst`` files that are staged in :file:`doc/api` from
+Documentation is created in three ways. First, API documentation
+(:file:`doc/api`) is created by Sphinx_ from
the docstrings of the classes in the Matplotlib library. Except for
-:file:`doc/api/api_changes/`, these ``.rst`` files are created when the
-documentation is built.
-
-Similarly, the contents of :file:`doc/gallery` and :file:`doc/tutorials` are
-generated by the `Sphinx Gallery`_ from the sources in :file:`examples/` and
-:file:`tutorials/`. These sources consist of python scripts that have ReST_
-documentation built into their comments.
+:file:`doc/api/api_changes/`, ``.rst`` files in :file:`doc/api` are created
+when the documentation is built. See :ref:`writing-docstrings` below.
+
+Second, the contents of :file:`doc/plot_types`, :file:`doc/gallery` and
+:file:`doc/tutorials` are generated by the `Sphinx Gallery`_ from python
+files in :file:`plot_types/`, :file:`examples/` and :file:`tutorials/`.
+These sources consist of python scripts that have ReST_ documentation built
+into their comments. See :ref:`writing-examples-and-tutorials` below.
+
+Third, Matplotlib has narrative docs written in ReST_ in subdirectories of
+:file:`doc/users/`. If you would like to add new documentation that is suited
+to an ``.rst`` file rather than a gallery or tutorial example, choose an
+appropriate subdirectory to put it in, and add the file to the table of
+contents of :file:`index.rst` of the subdirectory. See
+:ref:`writing-rest-pages` below.
.. note::
- Don't directly edit the ``.rst`` files in :file:`doc/gallery`,
- :file:`doc/tutorials`, and :file:`doc/api` (excepting
- :file:`doc/api/api_changes/`). Sphinx_ regenerates files in these
- directories when building documentation.
+ Don't directly edit the ``.rst`` files in :file:`doc/plot_types`,
+ :file:`doc/gallery`, :file:`doc/tutorials`, and :file:`doc/api`
+ (excepting :file:`doc/api/api_changes/`). Sphinx_ regenerates
+ files in these directories when building documentation.
Setting up the doc build
------------------------
@@ -73,6 +67,10 @@ Other useful invocations include
.. code-block:: sh
+ # Build the html documentation, but skip generation of the gallery images to
+ # save time.
+ make html-noplot
+
# Delete built files. May help if you get errors about missing paths or
# broken links.
make clean
@@ -88,38 +86,47 @@ it, use
make SPHINXOPTS= html
-On Windows the arguments must be at the end of the statement:
-
-.. code-block:: bat
-
- make html SPHINXOPTS=
-
You can use the ``O`` variable to set additional options:
* ``make O=-j4 html`` runs a parallel build with 4 processes.
* ``make O=-Dplot_formats=png:100 html`` saves figures in low resolution.
-* ``make O=-Dplot_gallery=0 html`` skips the gallery build.
-Multiple options can be combined using e.g. ``make O='-j4 -Dplot_gallery=0'
+Multiple options can be combined, e.g. ``make O='-j4 -Dplot_formats=png:100'
html``.
-On Windows, either use the format shown above or set options as environment variables, e.g.:
+On Windows, set the options as environment variables, e.g.:
.. code-block:: bat
- set O=-W --keep-going -j4
- make html
+ set SPHINXOPTS= & set O=-j4 -Dplot_formats=png:100 & make html
+
+Showing locally built docs
+--------------------------
+
+The built docs are available in the folder :file:`build/html`. A shortcut
+for opening them in your default browser is:
+
+.. code-block:: sh
+
+ make show
.. _writing-rest-pages:
Writing ReST pages
==================
-Most documentation is either in the docstring of individual
+Most documentation is either in the docstrings of individual
classes and methods, in explicit ``.rst`` files, or in examples and tutorials.
-All of these use the ReST_ syntax. Users should look at the ReST_ documentation
-for a full description. But some specific hints and conventions Matplotlib
-uses are useful for creating documentation.
+All of these use the ReST_ syntax and are processed by Sphinx_.
+
+The `Sphinx reStructuredText Primer
+`_ is
+a good introduction into using ReST. More complete information is available in
+the `reStructuredText reference documentation
+`_.
+
+This section contains additional information and conventions how ReST is used
+in the Matplotlib documentation.
Formatting and style conventions
--------------------------------
@@ -127,13 +134,28 @@ Formatting and style conventions
It is useful to strive for consistency in the Matplotlib documentation. Here
are some formatting and style conventions that are used.
-Section name formatting
-~~~~~~~~~~~~~~~~~~~~~~~
+Section formatting
+~~~~~~~~~~~~~~~~~~
For everything but top-level chapters, use ``Upper lower`` for
section titles, e.g., ``Possible hangups`` rather than ``Possible
Hangups``
+We aim to follow the recommendations from the
+`Python documentation `_
+and the `Sphinx reStructuredText documentation `_
+for section markup characters, i.e.:
+
+- ``#`` with overline, for parts. This is reserved for the main title in
+ ``index.rst``. All other pages should start with "chapter" or lower.
+- ``*`` with overline, for chapters
+- ``=``, for sections
+- ``-``, for subsections
+- ``^``, for subsubsections
+- ``"``, for paragraphs
+
+This may not yet be applied consistently in existing docs.
+
Function arguments
~~~~~~~~~~~~~~~~~~
@@ -171,22 +193,22 @@ Documents can be linked with the ``:doc:`` directive:
.. code-block:: rst
- See the :doc:`/faq/installing_faq`
+ See the :doc:`/users/installing/index`
- See the tutorial :doc:`/tutorials/introductory/sample_plots`
+ See the tutorial :doc:`/tutorials/introductory/quick_start`
See the example :doc:`/gallery/lines_bars_and_markers/simple_plot`
will render as:
- See the :doc:`/faq/installing_faq`
+ See the :doc:`/users/installing/index`
- See the tutorial :doc:`/tutorials/introductory/sample_plots`
+ See the tutorial :doc:`/tutorials/introductory/quick_start`
See the example :doc:`/gallery/lines_bars_and_markers/simple_plot`
Sections can also be given reference names. For instance from the
-:doc:`/faq/installing_faq` link:
+:doc:`/users/installing/index` link:
.. code-block:: rst
@@ -243,7 +265,7 @@ generates a link like this: `matplotlib.collections.LineCollection`.
have to use qualifiers like ``:class:``, ``:func:``, ``:meth:`` and the likes.
Often, you don't want to show the full package and module name. As long as the
-target is unanbigous you can simply leave them out:
+target is unambiguous you can simply leave them out:
.. code-block:: rst
@@ -280,8 +302,8 @@ you can check the full list of referenceable objects with the following
commands::
python -m sphinx.ext.intersphinx 'https://docs.python.org/3/objects.inv'
- python -m sphinx.ext.intersphinx 'https://docs.scipy.org/doc/numpy/objects.inv'
- python -m sphinx.ext.intersphinx 'https://docs.scipy.org/doc/scipy/reference/objects.inv'
+ python -m sphinx.ext.intersphinx 'https://numpy.org/doc/stable/objects.inv'
+ python -m sphinx.ext.intersphinx 'https://docs.scipy.org/doc/scipy/objects.inv'
python -m sphinx.ext.intersphinx 'https://pandas.pydata.org/pandas-docs/stable/objects.inv'
.. _rst-figures-and-includes:
@@ -290,24 +312,19 @@ Including figures and files
---------------------------
Image files can directly included in pages with the ``image::`` directive.
-e.g., :file:`thirdpartypackages/index.rst` displays the images for the third-party
-packages as static images::
-
- .. image:: /_static/toolbar.png
+e.g., :file:`tutorials/intermediate/constrainedlayout_guide.py` displays
+a couple of static images::
-as rendered on the page: :ref:`thirdparty-index`.
+ # .. image:: /_static/constrained_layout_1b.png
+ # :align: center
-Files can be included verbatim. For instance the ``matplotlibrc`` file
-is important for customizing Matplotlib, and is included verbatim in the
-tutorial in :doc:`/tutorials/introductory/customizing`::
- .. literalinclude:: ../../_static/matplotlibrc
+Files can be included verbatim. For instance the ``LICENSE`` file is included
+at :ref:`license-agreement` using ::
-This is rendered at the bottom of :doc:`/tutorials/introductory/customizing`.
-Note that this is in a tutorial; see :ref:`writing-examples-and-tutorials`
-below.
+ .. literalinclude:: ../../LICENSE/LICENSE
-The examples directory is also copied to :file:`doc/gallery` by sphinx-gallery,
+The examples directory is copied to :file:`doc/gallery` by sphinx-gallery,
so plots from the examples directory can be included using
.. code-block:: rst
@@ -347,7 +364,7 @@ An example docstring looks like:
.. code-block:: python
- def hlines(self, y, xmin, xmax, colors='k', linestyles='solid',
+ def hlines(self, y, xmin, xmax, colors=None, linestyles='solid',
label='', **kwargs):
"""
Plot horizontal lines at each *y* from *xmin* to *xmax*.
@@ -361,24 +378,26 @@ An example docstring looks like:
Respective beginning and end of each line. If scalars are
provided, all lines will have the same length.
- colors : array-like of colors, default: 'k'
+ colors : list of colors, default: :rc:`lines.color`
- linestyles : {'solid', 'dashed', 'dashdot', 'dotted'}, default: 'solid'
+ linestyles : {'solid', 'dashed', 'dashdot', 'dotted'}, optional
label : str, default: ''
Returns
-------
- lines : `~matplotlib.collections.LineCollection`
+ `~matplotlib.collections.LineCollection`
Other Parameters
----------------
- **kwargs : `~matplotlib.collections.LineCollection` properties
+ data : indexable object, optional
+ DATA_PARAMETER_PLACEHOLDER
+ **kwargs : `~matplotlib.collections.LineCollection` properties.
- See also
+ See Also
--------
vlines : vertical lines
- axhline: horizontal line across the axes
+ axhline : horizontal line across the Axes
"""
See the `~.Axes.hlines` documentation for how this renders.
@@ -545,10 +564,10 @@ effect.
Sphinx automatically links code elements in the definition blocks of ``See
also`` sections. No need to use backticks there::
- See also
+ See Also
--------
vlines : vertical lines
- axhline: horizontal line across the axes
+ axhline : horizontal line across the Axes
Wrapping parameter lists
~~~~~~~~~~~~~~~~~~~~~~~~
@@ -585,7 +604,7 @@ Setters and getters
-------------------
Artist properties are implemented using setter and getter methods (because
-Matplotlib predates the introductions of the `property` decorator in Python).
+Matplotlib predates the Python `property` decorator).
By convention, these setters and getters are named ``set_PROPERTYNAME`` and
``get_PROPERTYNAME``; the list of properties thusly defined on an artist and
their values can be listed by the `~.pyplot.setp` and `~.pyplot.getp` functions.
@@ -652,7 +671,7 @@ Keyword arguments
Since Matplotlib uses a lot of pass-through ``kwargs``, e.g., in every function
that creates a line (`~.pyplot.plot`, `~.pyplot.semilogx`, `~.pyplot.semilogy`,
-etc...), it can be difficult for the new user to know which ``kwargs`` are
+etc.), it can be difficult for the new user to know which ``kwargs`` are
supported. Matplotlib uses a docstring interpolation scheme to support
documentation of every function that takes a ``**kwargs``. The requirements
are:
@@ -663,26 +682,14 @@ are:
2. as automated as possible so that as properties change, the docs
are updated automatically.
-The function `matplotlib.artist.kwdoc` and the decorator
-``matplotlib.docstring.dedent_interpd`` facilitate this. They combine Python
-string interpolation in the docstring with the Matplotlib artist introspection
-facility that underlies ``setp`` and ``getp``. The ``kwdoc`` function gives
-the list of properties as a docstring. In order to use this in another
-docstring, first update the ``matplotlib.docstring.interpd`` object, as seen in
-this example from `matplotlib.lines`:
-
-.. code-block:: python
-
- # in lines.py
- docstring.interpd.update(Line2D_kwdoc=artist.kwdoc(Line2D))
-
-Then in any function accepting `~.Line2D` pass-through ``kwargs``, e.g.,
-`matplotlib.axes.Axes.plot`:
+The ``@_docstring.interpd`` decorator implements this. Any function accepting
+`.Line2D` pass-through ``kwargs``, e.g., `matplotlib.axes.Axes.plot`, can list
+a summary of the `.Line2D` properties, as follows:
.. code-block:: python
# in axes.py
- @docstring.dedent_interpd
+ @_docstring.interpd
def plot(self, *args, **kwargs):
"""
Some stuff omitted
@@ -707,17 +714,19 @@ Then in any function accepting `~.Line2D` pass-through ``kwargs``, e.g.,
Here is a list of available `.Line2D` properties:
- %(Line2D_kwdoc)s
-
+ %(Line2D:kwdoc)s
"""
-Note there is a problem for `~matplotlib.artist.Artist` ``__init__`` methods,
-e.g., `matplotlib.patches.Patch.__init__`, which supports ``Patch`` ``kwargs``,
-since the artist inspector cannot work until the class is fully defined and
-we can't modify the ``Patch.__init__.__doc__`` docstring outside the class
-definition. There are some some manual hacks in this case, violating the
-"single entry point" requirement above -- see the ``docstring.interpd.update``
-calls in `matplotlib.patches`.
+The ``%(Line2D:kwdoc)`` syntax makes ``interpd`` lookup an `.Artist` subclass
+named ``Line2D``, and call `.artist.kwdoc` on that class. `.artist.kwdoc`
+introspects the subclass and summarizes its properties as a substring, which
+gets interpolated into the docstring.
+
+Note that this scheme does not work for decorating an Artist's ``__init__``, as
+the subclass and its properties are not defined yet at that point. Instead,
+``@_docstring.interpd`` can be used to decorate the class itself -- at that
+point, `.kwdoc` can list the properties and interpolate them into
+``__init__.__doc__``.
Inheriting docstrings
@@ -748,7 +757,7 @@ Adding figures
--------------
As above (see :ref:`rst-figures-and-includes`), figures in the examples gallery
-can be referenced with a ``:plot:`` directive pointing to the python script
+can be referenced with a ``.. plot::`` directive pointing to the python script
that created the figure. For instance the `~.Axes.legend` docstring references
the file :file:`examples/text_labels_and_annotations/legend.py`:
@@ -836,7 +845,7 @@ render as comments in :doc:`/gallery/lines_bars_and_markers/simple_plot`.
Tutorials are made with the exact same mechanism, except they are longer, and
typically have more than one comment block (i.e.
-:doc:`/tutorials/introductory/usage`). The first comment block
+:doc:`/tutorials/introductory/quick_start`). The first comment block
can be the same as the example above. Subsequent blocks of ReST text
are delimited by a line of ``###`` characters:
@@ -947,63 +956,20 @@ will yield an html file ``/build/html/old_topic/old_info2.html`` that has a
(relative) refresh to ``../topic/new_info.html``.
Use the full path for this directive, relative to the doc root at
-``http://matplotlib.org/stable/``. So ``/old_topic/old_info2`` would be
+``https://matplotlib.org/stable/``. So ``/old_topic/old_info2`` would be
found by users at ``http://matplotlib.org/stable/old_topic/old_info2``.
For clarity, do not use relative links.
-Adding animations
------------------
-
-Animations are scraped automatically by Sphinx-gallery. If this is not
-desired,
-there is also a Matplotlib Google/Gmail account with username ``mplgithub``
-which was used to setup the github account but can be used for other
-purposes, like hosting Google docs or Youtube videos. You can embed a
-Matplotlib animation in the docs by first saving the animation as a
-movie using :meth:`matplotlib.animation.Animation.save`, and then
-uploading to `Matplotlib's Youtube
-channel `_ and inserting the
-embedding string youtube provides like:
-
-.. code-block:: rst
-
- .. raw:: html
-
-
-
-An example save command to generate a movie looks like this
-
-.. code-block:: python
-
- ani = animation.FuncAnimation(fig, animate, np.arange(1, len(y)),
- interval=25, blit=True, init_func=init)
-
- ani.save('double_pendulum.mp4', fps=15)
-
-Contact Michael Droettboom for the login password to upload youtube videos of
-google docs to the mplgithub account.
-
.. _inheritance-diagrams:
Generating inheritance diagrams
-------------------------------
-Class inheritance diagrams can be generated with the
-``inheritance-diagram`` directive. To use it, provide the
-directive with a number of class or module names (separated by
-whitespace). If a module name is provided, all classes in that module
-will be used. All of the ancestors of these classes will be included
-in the inheritance diagram.
+Class inheritance diagrams can be generated with the Sphinx
+`inheritance-diagram`_ directive.
-A single option is available: *parts* controls how many of parts in
-the path to the class are shown. For example, if *parts* == 1, the
-class ``matplotlib.patches.Patch`` is shown as ``Patch``. If *parts*
-== 2, it is shown as ``patches.Patch``. If *parts* == 0, the full
-path is shown.
+.. _inheritance-diagram: https://www.sphinx-doc.org/en/master/usage/extensions/inheritance.html
Example:
@@ -1015,46 +981,18 @@ Example:
.. inheritance-diagram:: matplotlib.patches matplotlib.lines matplotlib.text
:parts: 2
-.. _emacs-helpers:
-
-Emacs helpers
--------------
-
-There is an emacs mode `rst.el
-`_ which
-automates many important ReST tasks like building and updating
-table-of-contents, and promoting or demoting section headings. Here
-is the basic ``.emacs`` configuration:
-
-.. code-block:: lisp
-
- (require 'rst)
- (setq auto-mode-alist
- (append '(("\\.txt$" . rst-mode)
- ("\\.rst$" . rst-mode)
- ("\\.rest$" . rst-mode)) auto-mode-alist))
-
-Some helpful functions::
-
- C-c TAB - rst-toc-insert
-
- Insert table of contents at point
-
- C-c C-u - rst-toc-update
-
- Update the table of contents at point
-
- C-c C-l rst-shift-region-left
-
- Shift region to the left
- C-c C-r rst-shift-region-right
+Navbar and style
+----------------
- Shift region to the right
+Matplotlib has a few subprojects that share the same navbar and style, so these
+are centralized as a sphinx theme at
+`mpl_sphinx_theme `_. Changes to the
+style or topbar should be made there to propagate across all subprojects.
.. TODO: Add section about uploading docs
-.. _ReST: http://docutils.sourceforge.net/rst.html
+.. _ReST: https://docutils.sourceforge.io/rst.html
.. _Sphinx: http://www.sphinx-doc.org
.. _documentation: https://www.sphinx-doc.org/en/master/contents.html
.. _index: http://www.sphinx-doc.org/markup/para.html#index-generating-markup
diff --git a/doc/devel/gitwash/branch_dropdown.png b/doc/devel/gitwash/branch_dropdown.png
deleted file mode 100644
index 1bb7a577732c..000000000000
Binary files a/doc/devel/gitwash/branch_dropdown.png and /dev/null differ
diff --git a/doc/devel/gitwash/configure_git.rst b/doc/devel/gitwash/configure_git.rst
deleted file mode 100644
index eb7ce2662c93..000000000000
--- a/doc/devel/gitwash/configure_git.rst
+++ /dev/null
@@ -1,172 +0,0 @@
-.. highlight:: bash
-
-.. _configure-git:
-
-===============
- Configure git
-===============
-
-.. _git-config-basic:
-
-Overview
-========
-
-Your personal git configurations are saved in the ``.gitconfig`` file in
-your home directory.
-
-Here is an example ``.gitconfig`` file:
-
-.. code-block:: none
-
- [user]
- name = Your Name
- email = you@yourdomain.example.com
-
- [alias]
- ci = commit -a
- co = checkout
- st = status
- stat = status
- br = branch
- wdiff = diff --color-words
-
- [core]
- editor = vim
-
- [merge]
- summary = true
-
-You can check what is already in your config file using the ``git config --list`` command. You can edit the ``.gitconfig`` file directly or you can use the ``git config --global``
-command.::
-
- git config --global user.name "Your Name"
- git config --global user.email you@yourdomain.example.com
- git config --global alias.ci "commit -a"
- git config --global alias.co checkout
- git config --global alias.st "status -a"
- git config --global alias.stat "status -a"
- git config --global alias.br branch
- git config --global alias.wdiff "diff --color-words"
- git config --global core.editor vim
- git config --global merge.summary true
-
-To set up on another computer, you can copy your ``~/.gitconfig`` file,
-or run the commands above.
-
-In detail
-=========
-
-user.name and user.email
-------------------------
-
-It is good practice to tell git_ who you are, for labeling any changes
-you make to the code. The simplest way to do this is from the command
-line::
-
- git config --global user.name "Your Name"
- git config --global user.email you@yourdomain.example.com
-
-This will write the settings into your git configuration file, which
-should now contain a user section with your name and email:
-
-.. code-block:: none
-
- [user]
- name = Your Name
- email = you@yourdomain.example.com
-
-You'll need to replace ``Your Name`` and ``you@yourdomain.example.com``
-with your actual name and email address.
-
-Aliases
--------
-
-You might well benefit from some aliases to common commands.
-
-For example, you might well want to be able to shorten ``git checkout``
-to ``git co``. Or you may want to alias ``git diff --color-words``
-(which gives a nicely formatted output of the diff) to ``git wdiff``
-
-The following ``git config --global`` commands::
-
- git config --global alias.ci "commit -a"
- git config --global alias.co checkout
- git config --global alias.st "status -a"
- git config --global alias.stat "status -a"
- git config --global alias.br branch
- git config --global alias.wdiff "diff --color-words"
-
-will create an ``alias`` section in your ``.gitconfig`` file with contents
-like this:
-
-.. code-block:: none
-
- [alias]
- ci = commit -a
- co = checkout
- st = status -a
- stat = status -a
- br = branch
- wdiff = diff --color-words
-
-Editor
-------
-
-You may also want to make sure that your editor of choice is used ::
-
- git config --global core.editor vim
-
-Merging
--------
-
-To enforce summaries when doing merges (``~/.gitconfig`` file again):
-
-.. code-block:: none
-
- [merge]
- log = true
-
-Or from the command line::
-
- git config --global merge.log true
-
-.. _fancy-log:
-
-Fancy log output
-----------------
-
-This is a very nice alias to get a fancy log output; it should go in the
-``alias`` section of your ``.gitconfig`` file:
-
-.. code-block:: none
-
- lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)[%an]%Creset' --abbrev-commit --date=relative
-
-You use the alias with::
-
- git lg
-
-and it gives graph / text output something like this (but with color!):
-
-.. code-block:: none
-
- * 6d8e1ee - (HEAD, origin/my-fancy-feature, my-fancy-feature) NF - a fancy file (45 minutes ago) [Matthew Brett]
- * d304a73 - (origin/placeholder, placeholder) Merge pull request #48 from hhuuggoo/master (2 weeks ago) [Jonathan Terhorst]
- |\
- | * 4aff2a8 - fixed bug 35, and added a test in test_bugfixes (2 weeks ago) [Hugo]
- |/
- * a7ff2e5 - Added notes on discussion/proposal made during Data Array Summit. (2 weeks ago) [Corran Webster]
- * 68f6752 - Initial implementation of AxisIndexer - uses 'index_by' which needs to be changed to a call on an Axes object - this is all very sketchy right now. (2 weeks ago) [Corr
- * 376adbd - Merge pull request #46 from terhorst/master (2 weeks ago) [Jonathan Terhorst]
- |\
- | * b605216 - updated joshu example to current api (3 weeks ago) [Jonathan Terhorst]
- | * 2e991e8 - add testing for outer ufunc (3 weeks ago) [Jonathan Terhorst]
- | * 7beda5a - prevent axis from throwing an exception if testing equality with non-axis object (3 weeks ago) [Jonathan Terhorst]
- | * 65af65e - convert unit testing code to assertions (3 weeks ago) [Jonathan Terhorst]
- | * 956fbab - Merge remote-tracking branch 'upstream/master' (3 weeks ago) [Jonathan Terhorst]
- | |\
- | |/
-
-Thanks to Yury V. Zaytsev for posting it.
-
-.. include:: links.inc
diff --git a/doc/devel/gitwash/development_workflow.rst b/doc/devel/gitwash/development_workflow.rst
deleted file mode 100644
index 7d6b6f0e70c3..000000000000
--- a/doc/devel/gitwash/development_workflow.rst
+++ /dev/null
@@ -1,423 +0,0 @@
-.. highlight:: bash
-
-.. _development-workflow:
-
-####################
-Development workflow
-####################
-
-You already have your own forked copy of the `Matplotlib`_ repository, by
-following :ref:`forking`. You have :ref:`set-up-fork`. You have configured
-git by following :ref:`configure-git`. Now you are ready for some real work.
-
-Workflow summary
-================
-
-In what follows we'll refer to the upstream Matplotlib ``master`` branch, as
-"trunk".
-
-* Don't use your ``master`` branch for anything. Consider deleting it.
-* When you are starting a new set of changes, fetch any changes from trunk,
- and start a new *feature branch* from that.
-* Make a new branch for each separable set of changes |emdash| "one task, one
- branch" (`ipython git workflow`_).
-* Name your branch for the purpose of the changes - e.g.
- ``bugfix-for-issue-14`` or ``refactor-database-code``.
-* If you can possibly avoid it, avoid merging trunk or any other branches into
- your feature branch while you are working.
-* If you do find yourself merging from trunk, consider :ref:`rebase-on-trunk`
-* Ask on the `Matplotlib mailing list`_ if you get stuck.
-* Ask for code review!
-
-This way of working helps to keep work well organized, with readable history.
-This in turn makes it easier for project maintainers (that might be you) to see
-what you've done, and why you did it.
-
-See `linux git workflow`_ and `ipython git workflow`_ for some explanation.
-
-Consider deleting your master branch
-====================================
-
-It may sound strange, but deleting your own ``master`` branch can help reduce
-confusion about which branch you are on. See `deleting master on github`_ for
-details.
-
-.. _update-mirror-trunk:
-
-Update the mirror of trunk
-==========================
-
-First make sure you have done :ref:`linking-to-upstream`.
-
-From time to time you should fetch the upstream (trunk) changes from github::
-
- git fetch upstream
-
-This will pull down any commits you don't have, and set the remote branches to
-point to the right commit. For example, 'trunk' is the branch referred to by
-(remote/branchname) ``upstream/master`` - and if there have been commits since
-you last checked, ``upstream/master`` will change after you do the fetch.
-
-.. _make-feature-branch:
-
-Make a new feature branch
-=========================
-
-When you are ready to make some changes to the code, you should start a new
-branch. Branches that are for a collection of related edits are often called
-'feature branches'.
-
-Making an new branch for each set of related changes will make it easier for
-someone reviewing your branch to see what you are doing.
-
-Choose an informative name for the branch to remind yourself and the rest of us
-what the changes in the branch are for. For example ``add-ability-to-fly``, or
-``buxfix-for-issue-42``.
-
-::
-
- # Update the mirror of trunk
- git fetch upstream
- # Make new feature branch starting at current trunk
- git branch my-new-feature upstream/master
- git checkout my-new-feature
-
-Generally, you will want to keep your feature branches on your public github_
-fork of `Matplotlib`_. To do this, you `git push`_ this new branch up to your
-github repo. Generally (if you followed the instructions in these pages, and by
-default), git will have a link to your github repo, called ``origin``. You push
-up to your own repo on github with::
-
- git push origin my-new-feature
-
-In git >= 1.7 you can ensure that the link is correctly set by using the
-``--set-upstream`` option::
-
- git push --set-upstream origin my-new-feature
-
-From now on git will know that ``my-new-feature`` is related to the
-``my-new-feature`` branch in the github repo.
-
-.. _edit-flow:
-
-The editing workflow
-====================
-
-Overview
---------
-
-::
-
- # hack hack
- git add my_new_file
- git commit -am 'NF - some message'
- git push
-
-In more detail
---------------
-
-#. Make some changes
-#. See which files have changed with ``git status`` (see `git status`_).
- You'll see a listing like this one:
-
- .. code-block:: none
-
- # On branch ny-new-feature
- # Changed but not updated:
- # (use "git add ..." to update what will be committed)
- # (use "git checkout -- ..." to discard changes in working directory)
- #
- # modified: README
- #
- # Untracked files:
- # (use "git add ..." to include in what will be committed)
- #
- # INSTALL
- no changes added to commit (use "git add" and/or "git commit -a")
-
-#. Check what the actual changes are with ``git diff`` (`git diff`_).
-#. Add any new files to version control ``git add new_file_name`` (see
- `git add`_).
-#. To commit all modified files into the local copy of your repo,, do
- ``git commit -am 'A commit message'``. Note the ``-am`` options to
- ``commit``. The ``m`` flag just signals that you're going to type a
- message on the command line. The ``a`` flag |emdash| you can just take on
- faith |emdash| or see `why the -a flag?`_ |emdash| and the helpful use-case
- description in the `tangled working copy problem`_. The `git commit`_ manual
- page might also be useful.
-#. To push the changes up to your forked repo on github, do a ``git
- push`` (see `git push`_).
-
-Ask for your changes to be reviewed or merged
-=============================================
-
-When you are ready to ask for someone to review your code and consider a merge:
-
-#. Go to the URL of your forked repo, say
- ``https://github.com/your-user-name/matplotlib``.
-#. Use the 'Switch Branches' dropdown menu near the top left of the page to
- select the branch with your changes:
-
- .. image:: branch_dropdown.png
-
-#. Click on the 'Pull request' button:
-
- .. image:: pull_button.png
-
- Enter a title for the set of changes, and some explanation of what you've
- done. Say if there is anything you'd like particular attention for - like a
- complicated change or some code you are not happy with.
-
- If you don't think your request is ready to be merged, just say so in your
- pull request message. This is still a good way of getting some preliminary
- code review.
-
-Some other things you might want to do
-======================================
-
-Delete a branch on github
--------------------------
-
-::
-
- git checkout master
- # delete branch locally
- git branch -D my-unwanted-branch
- # delete branch on github
- git push origin :my-unwanted-branch
-
-Note the colon ``:`` before ``my-unwanted-branch``. See also:
-https://help.github.com/articles/pushing-to-a-remote/#deleting-a-remote-branch-or-tag
-
-Several people sharing a single repository
-------------------------------------------
-
-If you want to work on some stuff with other people, where you are all
-committing into the same repository, or even the same branch, then just
-share it via github.
-
-First fork Matplotlib into your account, as from :ref:`forking`.
-
-Then, go to your forked repository github page, say
-``https://github.com/your-user-name/matplotlib``
-
-Click on the 'Admin' button, and add anyone else to the repo as a
-collaborator:
-
- .. image:: pull_button.png
-
-Now all those people can do::
-
- git clone https://github.com/your-user-name/matplotlib.git
-
-Remember that links starting with ``https`` or ``git@`` are read-write, and that
-``git@`` uses the ssh protocol; links starting with ``git://`` are read-only.
-
-Your collaborators can then commit directly into that repo with the
-usual::
-
- git commit -am 'ENH - much better code'
- git push origin master # pushes directly into your repo
-
-Explore your repository
------------------------
-
-To see a graphical representation of the repository branches and
-commits::
-
- gitk --all
-
-To see a linear list of commits for this branch::
-
- git log
-
-You can also look at the `network graph visualizer`_ for your github
-repo.
-
-Finally the :ref:`fancy-log` ``lg`` alias will give you a reasonable text-based
-graph of the repository.
-
-.. _rebase-on-trunk:
-
-Rebasing on trunk
------------------
-
-Let's say you thought of some work you'd like to do. You
-:ref:`update-mirror-trunk` and :ref:`make-feature-branch` called
-``cool-feature``. At this stage trunk is at some commit, let's call it E. Now
-you make some new commits on your ``cool-feature`` branch, let's call them A, B,
-C. Maybe your changes take a while, or you come back to them after a while. In
-the meantime, trunk has progressed from commit E to commit (say) G:
-
-.. code-block:: none
-
- A---B---C cool-feature
- /
- D---E---F---G trunk
-
-At this stage you consider merging trunk into your feature branch, and you
-remember that this here page sternly advises you not to do that, because the
-history will get messy. Most of the time you can just ask for a review, and not
-worry that trunk has got a little ahead. But sometimes, the changes in trunk
-might affect your changes, and you need to harmonize them. In this situation
-you may prefer to do a rebase.
-
-rebase takes your changes (A, B, C) and replays them as if they had been made to
-the current state of ``trunk``. In other words, in this case, it takes the
-changes represented by A, B, C and replays them on top of G. After the rebase,
-your history will look like this:
-
-.. code-block:: none
-
- A'--B'--C' cool-feature
- /
- D---E---F---G trunk
-
-See `rebase without tears`_ for more detail.
-
-To do a rebase on trunk::
-
- # Update the mirror of trunk
- git fetch upstream
- # go to the feature branch
- git checkout cool-feature
- # make a backup in case you mess up
- git branch tmp cool-feature
- # rebase cool-feature onto trunk
- git rebase --onto upstream/master upstream/master cool-feature
-
-In this situation, where you are already on branch ``cool-feature``, the last
-command can be written more succinctly as::
-
- git rebase upstream/master
-
-When all looks good you can delete your backup branch::
-
- git branch -D tmp
-
-If it doesn't look good you may need to have a look at
-:ref:`recovering-from-mess-up`.
-
-If you have made changes to files that have also changed in trunk, this may
-generate merge conflicts that you need to resolve - see the `git rebase`_ man
-page for some instructions at the end of the "Description" section. There is
-some related help on merging in the git user manual - see `resolving a merge`_.
-
-.. _recovering-from-mess-up:
-
-Recovering from mess-ups
-------------------------
-
-Sometimes, you mess up merges or rebases. Luckily, in git it is
-relatively straightforward to recover from such mistakes.
-
-If you mess up during a rebase::
-
- git rebase --abort
-
-If you notice you messed up after the rebase::
-
- # reset branch back to the saved point
- git reset --hard tmp
-
-If you forgot to make a backup branch::
-
- # look at the reflog of the branch
- git reflog show cool-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
- ...
-
- # reset the branch to where it was before the botched rebase
- git reset --hard cool-feature@{2}
-
-.. _rewriting-commit-history:
-
-Rewriting commit history
-------------------------
-
-.. note::
-
- Do this only for your own feature branches.
-
-There's an embarrassing typo in a commit you made? Or perhaps the you
-made several false starts you would like the posterity not to see.
-
-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.
- ...
-
-and ``6ad92e5`` is the last commit in the ``cool-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.
-
-We do as follows::
-
- # make a backup of the current state
- git branch tmp HEAD
- # interactive rebase
- git rebase -i 6ad92e5
-
-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
-
- # Rebase 6ad92e5..eadc391 onto 6ad92e5
- #
- # 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
- #
- # If you remove a line here THAT COMMIT WILL BE LOST.
- # However, if you remove everything, the rebase will be aborted.
- #
-
-To achieve what we want, we will make the following changes to it::
-
- r 13d7934 First implementation
- pick 2dec1ac Fix a few bugs + disable
- f a815645 Modify it so that it works
- f eadc391 Fix some remaining bugs
-
-This means that (i) we want to edit the commit message for
-``13d7934``, and (ii) collapse the last three commits into one. Now we
-save and quit the editor.
-
-Git will then immediately bring up an editor for editing the commit
-message. After revising it, we get the output::
-
- [detached HEAD 721fc64] FOO: First implementation
- 2 files changed, 199 insertions(+), 66 deletions(-)
- [detached HEAD 0f22701] Fix a few bugs + disable
- 1 files changed, 79 insertions(+), 61 deletions(-)
- Successfully rebased and updated refs/heads/my-feature-branch.
-
-and the history looks now like this::
-
- 0f22701 Fix a few bugs + disable
- 721fc64 ENH: Sophisticated feature
- 6ad92e5 * masked is now an instance of a new object, MaskedConstant
-
-If it went wrong, recovery is again possible as explained :ref:`above
-`.
-
-.. include:: links.inc
diff --git a/doc/devel/gitwash/dot2_dot3.rst b/doc/devel/gitwash/dot2_dot3.rst
deleted file mode 100644
index 7759e2e60d68..000000000000
--- a/doc/devel/gitwash/dot2_dot3.rst
+++ /dev/null
@@ -1,28 +0,0 @@
-.. _dot2-dot3:
-
-========================================
- Two and three dots in difference specs
-========================================
-
-Thanks to Yarik Halchenko for this explanation.
-
-Imagine a series of commits A, B, C, D... Imagine that there are two
-branches, *topic* and *master*. You branched *topic* off *master* when
-*master* was at commit 'E'. The graph of the commits looks like this::
-
-
- A---B---C topic
- /
- D---E---F---G master
-
-Then::
-
- git diff master..topic
-
-will output the difference from G to C (i.e. with effects of F and G),
-while::
-
- git diff master...topic
-
-would output just differences in the topic branch (i.e. only A, B, and
-C).
diff --git a/doc/devel/gitwash/following_latest.rst b/doc/devel/gitwash/following_latest.rst
deleted file mode 100644
index 03518ea52f44..000000000000
--- a/doc/devel/gitwash/following_latest.rst
+++ /dev/null
@@ -1,38 +0,0 @@
-.. highlight:: bash
-
-.. _following-latest:
-
-=============================
- Following the latest source
-=============================
-
-These are the instructions if you just want to follow the latest
-*Matplotlib* source, but you don't need to do any development for now.
-
-The steps are:
-
-* :ref:`install-git`
-* get local copy of the `Matplotlib github`_ git repository
-* update local copy from time to time
-
-Get the local copy of the code
-==============================
-
-From the command line::
-
- git clone git://github.com/matplotlib/matplotlib.git
-
-You now have a copy of the code tree in the new ``matplotlib`` directory.
-
-Updating the code
-=================
-
-From time to time you may want to pull down the latest code. Do this with::
-
- cd matplotlib
- git pull
-
-The tree in ``matplotlib`` will now have the latest changes from the initial
-repository.
-
-.. include:: links.inc
diff --git a/doc/devel/gitwash/forking_button.png b/doc/devel/gitwash/forking_button.png
deleted file mode 100644
index d0e04134d4d0..000000000000
Binary files a/doc/devel/gitwash/forking_button.png and /dev/null differ
diff --git a/doc/devel/gitwash/forking_hell.rst b/doc/devel/gitwash/forking_hell.rst
deleted file mode 100644
index b79e13400a62..000000000000
--- a/doc/devel/gitwash/forking_hell.rst
+++ /dev/null
@@ -1,34 +0,0 @@
-.. highlight:: bash
-
-.. _forking:
-
-======================================================
-Making your own copy (fork) of Matplotlib
-======================================================
-
-You need to do this only once. The instructions here are very similar
-to the instructions at https://help.github.com/forking/ |emdash| please see
-that page for more detail. We're repeating some of it here just to give the
-specifics for the `Matplotlib`_ project, and to suggest some default names.
-
-Set up and configure a github account
-=====================================
-
-If you don't have a github account, go to the github page, and make one.
-
-You then need to configure your account to allow write access |emdash| see
-the ``Generating SSH keys`` help on `github help`_.
-
-Create your own forked copy of `Matplotlib`_
-======================================================
-
-#. Log into your github account.
-#. Go to the `Matplotlib`_ github home at `Matplotlib github`_.
-#. Click on the *fork* button:
-
- .. image:: forking_button.png
-
- Now, after a short pause, you should find yourself at the home page for
- your own forked copy of `Matplotlib`_.
-
-.. include:: links.inc
diff --git a/doc/devel/gitwash/git_development.rst b/doc/devel/gitwash/git_development.rst
deleted file mode 100644
index c5b910d86342..000000000000
--- a/doc/devel/gitwash/git_development.rst
+++ /dev/null
@@ -1,16 +0,0 @@
-.. _git-development:
-
-=====================
- Git for development
-=====================
-
-Contents:
-
-.. toctree::
- :maxdepth: 2
-
- forking_hell
- set_up_fork
- configure_git
- development_workflow
- maintainer_workflow
diff --git a/doc/devel/gitwash/git_install.rst b/doc/devel/gitwash/git_install.rst
deleted file mode 100644
index 66eca8c29bde..000000000000
--- a/doc/devel/gitwash/git_install.rst
+++ /dev/null
@@ -1,28 +0,0 @@
-.. highlight:: bash
-
-.. _install-git:
-
-=============
- Install git
-=============
-
-Overview
-========
-
-================ =============
-Debian / Ubuntu ``sudo apt-get install git``
-Fedora ``sudo yum install git``
-Windows Download and install msysGit_
-OS X Use the git-osx-installer_
-================ =============
-
-In detail
-=========
-
-See the git page for the most recent information.
-
-Have a look at the github install help pages available from `github help`_
-
-There are good instructions here: https://git-scm.com/book/en/v2/Getting-Started-Installing-Git
-
-.. include:: links.inc
diff --git a/doc/devel/gitwash/git_intro.rst b/doc/devel/gitwash/git_intro.rst
deleted file mode 100644
index 1f89b7e9fb51..000000000000
--- a/doc/devel/gitwash/git_intro.rst
+++ /dev/null
@@ -1,20 +0,0 @@
-.. highlight:: bash
-
-==============
- Introduction
-==============
-
-These pages describe a git_ and github_ workflow for the `Matplotlib`_
-project.
-
-There are several different workflows here, for different ways of
-working with *Matplotlib*.
-
-This is not a comprehensive git reference, it's just a workflow for our
-own project. It's tailored to the github hosting service. You may well
-find better or quicker ways of getting stuff done with git, but these
-should get you started.
-
-For general resources for learning git, see :ref:`git-resources`.
-
-.. include:: links.inc
diff --git a/doc/devel/gitwash/git_links.inc b/doc/devel/gitwash/git_links.inc
deleted file mode 100644
index c26173367c9b..000000000000
--- a/doc/devel/gitwash/git_links.inc
+++ /dev/null
@@ -1,59 +0,0 @@
-.. This (-*- rst -*-) format file contains commonly used link targets
- and name substitutions. It may be included in many files,
- therefore it should only contain link targets and name
- substitutions. Try grepping for "^\.\. _" to find plausible
- candidates for this list.
-
-.. NOTE: reST targets are
- __not_case_sensitive__, so only one target definition is needed for
- nipy, NIPY, Nipy, etc...
-
-.. git stuff
-.. _git: https://git-scm.com/
-.. _github: https://github.com
-.. _github help: https://help.github.com
-.. _msysgit: https://git-scm.com/download/win
-.. _git-osx-installer: https://git-scm.com/download/mac
-.. _subversion: https://subversion.apache.org/
-.. _git cheat sheet: https://help.github.com/git-cheat-sheets/
-.. _pro git book: https://git-scm.com/book/en/v2
-.. _git svn crash course: https://git-scm.com/course/svn.html
-.. _network graph visualizer: https://github.com/blog/39-say-hello-to-the-network-graph-visualizer
-.. _git user manual: https://schacon.github.io/git/user-manual.html
-.. _git tutorial: https://schacon.github.io/git/gittutorial.html
-.. _git community book: https://git-scm.com/book/en/v2
-.. _git ready: http://gitready.com/
-.. _Fernando's git page: http://www.fperez.org/py4science/git.html
-.. _git magic: http://www-cs-students.stanford.edu/~blynn/gitmagic/index.html
-.. _git concepts: https://www.sbf5.com/~cduan/technical/git/
-.. _git clone: https://schacon.github.io/git/git-clone.html
-.. _git checkout: https://schacon.github.io/git/git-checkout.html
-.. _git commit: https://schacon.github.io/git/git-commit.html
-.. _git push: https://schacon.github.io/git/git-push.html
-.. _git pull: https://schacon.github.io/git/git-pull.html
-.. _git add: https://schacon.github.io/git/git-add.html
-.. _git status: https://schacon.github.io/git/git-status.html
-.. _git diff: https://schacon.github.io/git/git-diff.html
-.. _git log: https://schacon.github.io/git/git-log.html
-.. _git branch: https://schacon.github.io/git/git-branch.html
-.. _git remote: https://schacon.github.io/git/git-remote.html
-.. _git rebase: https://schacon.github.io/git/git-rebase.html
-.. _git config: https://schacon.github.io/git/git-config.html
-.. _why the -a flag?: http://gitready.com/beginner/2009/01/18/the-staging-area.html
-.. _git staging area: http://gitready.com/beginner/2009/01/18/the-staging-area.html
-.. _tangled working copy problem: http://2ndscale.com/rtomayko/2008/the-thing-about-git
-.. _git management: https://web.archive.org/web/20090224195437/http://kerneltrap.org/Linux/Git_Management
-.. _linux git workflow: https://www.mail-archive.com/dri-devel@lists.sourceforge.net/msg39091.html
-.. _git parable: http://tom.preston-werner.com/2009/05/19/the-git-parable.html
-.. _git foundation: https://matthew-brett.github.io/pydagogue/foundation.html
-.. _deleting master on github: https://matthew-brett.github.io/pydagogue/gh_delete_master.html
-.. _rebase without tears: https://matthew-brett.github.io/pydagogue/rebase_without_tears.html
-.. _resolving a merge: https://schacon.github.io/git/user-manual.html#resolving-a-merge
-.. _ipython git workflow: https://mail.python.org/pipermail/ipython-dev/2010-October/005632.html
-
-.. other stuff
-.. _python: https://www.python.org
-
-.. |emdash| unicode:: U+02014
-
-.. vim: ft=rst
diff --git a/doc/devel/gitwash/git_resources.rst b/doc/devel/gitwash/git_resources.rst
deleted file mode 100644
index 2787a575cc43..000000000000
--- a/doc/devel/gitwash/git_resources.rst
+++ /dev/null
@@ -1,59 +0,0 @@
-.. highlight:: bash
-
-.. _git-resources:
-
-=============
-git resources
-=============
-
-Tutorials and summaries
-=======================
-
-* `github help`_ has an excellent series of how-to guides.
-* The `pro git book`_ is a good in-depth book on git.
-* A `git cheat sheet`_ is a page giving summaries of common commands.
-* The `git user manual`_
-* The `git tutorial`_
-* The `git community book`_
-* `git ready`_ |emdash| a nice series of tutorials
-* `git magic`_ |emdash| extended introduction with intermediate detail
-* The `git parable`_ is an easy read explaining the concepts behind git.
-* `git foundation`_ expands on the `git parable`_.
-* Fernando Perez' git page |emdash| `Fernando's git page`_ |emdash| many
- links and tips
-* A good but technical page on `git concepts`_
-* `git svn crash course`_: git for those of us used to subversion_
-
-Advanced git workflow
-=====================
-
-There are many ways of working with git; here are some posts on the
-rules of thumb that other projects have come up with:
-
-* Linus Torvalds on `git management`_
-* Linus Torvalds on `linux git workflow`_ . Summary; use the git tools
- to make the history of your edits as clean as possible; merge from
- upstream edits as little as possible in branches where you are doing
- active development.
-
-Manual pages online
-===================
-
-You can get these on your own machine with (e.g) ``git help push`` or
-(same thing) ``git push --help``, but, for convenience, here are the
-online manual pages for some common commands:
-
-* `git add`_
-* `git branch`_
-* `git checkout`_
-* `git clone`_
-* `git commit`_
-* `git config`_
-* `git diff`_
-* `git log`_
-* `git pull`_
-* `git push`_
-* `git remote`_
-* `git status`_
-
-.. include:: links.inc
diff --git a/doc/devel/gitwash/index.rst b/doc/devel/gitwash/index.rst
deleted file mode 100644
index 9ee965d626ff..000000000000
--- a/doc/devel/gitwash/index.rst
+++ /dev/null
@@ -1,19 +0,0 @@
-.. _using-git:
-
-Working with *Matplotlib* source code
-================================================
-
-Contents:
-
-.. toctree::
- :maxdepth: 2
-
- git_intro
- git_install
- following_latest
- patching
- git_development
- git_resources
- dot2_dot3
-
-
diff --git a/doc/devel/gitwash/known_projects.inc b/doc/devel/gitwash/known_projects.inc
deleted file mode 100644
index 710abe08e477..000000000000
--- a/doc/devel/gitwash/known_projects.inc
+++ /dev/null
@@ -1,41 +0,0 @@
-.. Known projects
-
-.. PROJECTNAME placeholders
-.. _PROJECTNAME: http://nipy.org
-.. _`PROJECTNAME github`: https://github.com/nipy
-.. _`PROJECTNAME mailing list`: https://mail.python.org/mailman/listinfo/neuroimaging
-
-.. numpy
-.. _numpy: http://www.numpy.org
-.. _`numpy github`: https://github.com/numpy/numpy
-.. _`numpy mailing list`: https://mail.scipy.org/mailman/listinfo/numpy-discussion
-
-.. scipy
-.. _scipy: https://www.scipy.org
-.. _`scipy github`: https://github.com/scipy/scipy
-.. _`scipy mailing list`: https://mail.scipy.org/mailman/listinfo/scipy-dev
-
-.. nipy
-.. _nipy: http://nipy.org/nipy/
-.. _`nipy github`: https://github.com/nipy/nipy
-.. _`nipy mailing list`: https://mail.python.org/mailman/listinfo/neuroimaging
-
-.. ipython
-.. _ipython: https://ipython.org
-.. _`ipython github`: https://github.com/ipython/ipython
-.. _`ipython mailing list`: https://mail.scipy.org/mailman/listinfo/IPython-dev
-
-.. dipy
-.. _dipy: http://nipy.org/dipy/
-.. _`dipy github`: https://github.com/Garyfallidis/dipy
-.. _`dipy mailing list`: https://mail.python.org/mailman/listinfo/neuroimaging
-
-.. nibabel
-.. _nibabel: http://nipy.org/nibabel/
-.. _`nibabel github`: https://github.com/nipy/nibabel
-.. _`nibabel mailing list`: https://mail.python.org/mailman/listinfo/neuroimaging
-
-.. marsbar
-.. _marsbar: http://marsbar.sourceforge.net
-.. _`marsbar github`: https://github.com/matthew-brett/marsbar
-.. _`MarsBaR mailing list`: https://lists.sourceforge.net/lists/listinfo/marsbar-users
diff --git a/doc/devel/gitwash/links.inc b/doc/devel/gitwash/links.inc
deleted file mode 100644
index 20f4dcfffd4a..000000000000
--- a/doc/devel/gitwash/links.inc
+++ /dev/null
@@ -1,4 +0,0 @@
-.. compiling links file
-.. include:: known_projects.inc
-.. include:: this_project.inc
-.. include:: git_links.inc
diff --git a/doc/devel/gitwash/patching.rst b/doc/devel/gitwash/patching.rst
deleted file mode 100644
index e7f852758477..000000000000
--- a/doc/devel/gitwash/patching.rst
+++ /dev/null
@@ -1,138 +0,0 @@
-.. highlight:: bash
-
-================
- Making a patch
-================
-
-You've discovered a bug or something else you want to change
-in `Matplotlib`_ .. |emdash| excellent!
-
-You've worked out a way to fix it |emdash| even better!
-
-You want to tell us about it |emdash| best of all!
-
-The easiest way is to make a *patch* or set of patches. Here
-we explain how. Making a patch is the simplest and quickest,
-but if you're going to be doing anything more than simple
-quick things, please consider following the
-:ref:`git-development` model instead.
-
-.. _making-patches:
-
-Making patches
-==============
-
-Overview
---------
-
-::
-
- # tell git who you are
- git config --global user.email you@yourdomain.example.com
- git config --global user.name "Your Name Comes Here"
- # get the repository if you don't have it
- git clone git://github.com/matplotlib/matplotlib.git
- # make a branch for your patching
- cd matplotlib
- git branch the-fix-im-thinking-of
- git checkout the-fix-im-thinking-of
- # hack, hack, hack
- # Tell git about any new files you've made
- git add somewhere/tests/test_my_bug.py
- # commit work in progress as you go
- git commit -am 'BF - added tests for Funny bug'
- # hack hack, hack
- git commit -am 'BF - added fix for Funny bug'
- # make the patch files
- git format-patch -M -C master
-
-Then, send the generated patch files to the `Matplotlib
-mailing list`_ |emdash| where we will thank you warmly.
-
-In detail
----------
-
-#. Tell git who you are so it can label the commits you've
- made::
-
- git config --global user.email you@yourdomain.example.com
- git config --global user.name "Your Name Comes Here"
-
-#. If you don't already have one, clone a copy of the
- `Matplotlib`_ repository::
-
- git clone git://github.com/matplotlib/matplotlib.git
- cd matplotlib
-
-#. Make a 'feature branch'. This will be where you work on
- your bug fix. It's nice and safe and leaves you with
- access to an unmodified copy of the code in the main
- branch::
-
- git branch the-fix-im-thinking-of
- git checkout the-fix-im-thinking-of
-
-#. Do some edits, and commit them as you go::
-
- # hack, hack, hack
- # Tell git about any new files you've made
- git add somewhere/tests/test_my_bug.py
- # commit work in progress as you go
- git commit -am 'BF - added tests for Funny bug'
- # hack hack, hack
- git commit -am 'BF - added fix for Funny bug'
-
- Note the ``-am`` options to ``commit``. The ``m`` flag just
- signals that you're going to type a message on the command
- line. The ``a`` flag |emdash| you can just take on faith |emdash|
- or see `why the -a flag?`_.
-
-#. When you have finished, check you have committed all your
- changes::
-
- git status
-
-#. Finally, make your commits into patches. You want all the
- commits since you branched from the ``master`` branch::
-
- git format-patch -M -C master
-
- You will now have several files named for the commits:
-
- .. code-block:: none
-
- 0001-BF-added-tests-for-Funny-bug.patch
- 0002-BF-added-fix-for-Funny-bug.patch
-
- Send these files to the `Matplotlib mailing list`_.
-
-When you are done, to switch back to the main copy of the
-code, just return to the ``master`` branch::
-
- git checkout master
-
-Moving from patching to development
-===================================
-
-If you find you have done some patches, and you have one or
-more feature branches, you will probably want to switch to
-development mode. You can do this with the repository you
-have.
-
-Fork the `Matplotlib`_ repository on github |emdash| :ref:`forking`.
-Then::
-
- # checkout and refresh master branch from main repo
- git checkout master
- git pull origin master
- # rename pointer to main repository to 'upstream'
- git remote rename origin upstream
- # point your repo to default read / write to your fork on github
- git remote add origin git@github.com:your-user-name/matplotlib.git
- # push up any branches you've made and want to keep
- git push origin the-fix-im-thinking-of
-
-Then you can, if you want, follow the
-:ref:`development-workflow`.
-
-.. include:: links.inc
diff --git a/doc/devel/gitwash/pull_button.png b/doc/devel/gitwash/pull_button.png
deleted file mode 100644
index e5031681b97b..000000000000
Binary files a/doc/devel/gitwash/pull_button.png and /dev/null differ
diff --git a/doc/devel/gitwash/set_up_fork.rst b/doc/devel/gitwash/set_up_fork.rst
deleted file mode 100644
index 6b7e0271c45b..000000000000
--- a/doc/devel/gitwash/set_up_fork.rst
+++ /dev/null
@@ -1,73 +0,0 @@
-.. highlight:: bash
-
-.. _set-up-fork:
-
-==================
- Set up your fork
-==================
-
-First you follow the instructions for :ref:`forking`.
-
-Overview
-========
-
-::
-
- git clone https://github.com/your-user-name/matplotlib.git
- cd matplotlib
- git remote add upstream git://github.com/matplotlib/matplotlib.git
-
-In detail
-=========
-
-Clone your fork
----------------
-
-#. Clone your fork to the local computer with ``git clone
- https://github.com/your-user-name/matplotlib.git``
-#. Investigate. Change directory to your new repo: ``cd matplotlib``. Then
- ``git branch -a`` to show you all branches. You'll get something
- like:
-
- .. code-block:: none
-
- * master
- remotes/origin/master
-
- This tells you that you are currently on the ``master`` branch, and
- that you also have a ``remote`` connection to ``origin/master``.
- What remote repository is ``remote/origin``? Try ``git remote -v`` to
- see the URLs for the remote. They will point to your github fork.
-
- Now you want to connect to the upstream `Matplotlib github`_ repository, so
- you can merge in changes from trunk.
-
-.. _linking-to-upstream:
-
-Linking your repository to the upstream repo
---------------------------------------------
-
-::
-
- cd matplotlib
- git remote add upstream git://github.com/matplotlib/matplotlib.git
-
-``upstream`` here is just the arbitrary name we're using to refer to the
-main `Matplotlib`_ repository at `Matplotlib github`_.
-
-Note that we've used ``git://`` for the URL rather than ``https://`` or ``git@``. The
-``git://`` URL is read only. This means that we can't accidentally
-(or deliberately) write to the upstream repo, and we are only going to
-use it to merge into our own code.
-
-Just for your own satisfaction, show yourself that you now have a new
-'remote', with ``git remote -v show``, giving you something like:
-
-.. code-block:: none
-
- upstream git://github.com/matplotlib/matplotlib.git (fetch)
- upstream git://github.com/matplotlib/matplotlib.git (push)
- origin https://github.com/your-user-name/matplotlib.git (fetch)
- origin https://github.com/your-user-name/matplotlib.git (push)
-
-.. include:: links.inc
diff --git a/doc/devel/gitwash/this_project.inc b/doc/devel/gitwash/this_project.inc
deleted file mode 100644
index e8863d5f78f0..000000000000
--- a/doc/devel/gitwash/this_project.inc
+++ /dev/null
@@ -1,5 +0,0 @@
-.. Matplotlib
-.. _`Matplotlib`: http://matplotlib.org
-.. _`Matplotlib github`: https://github.com/matplotlib/matplotlib
-
-.. _`Matplotlib mailing list`: https://mail.python.org/mailman/listinfo/matplotlib-devel
diff --git a/doc/devel/index.rst b/doc/devel/index.rst
index c2c140173227..e0fc978a6659 100644
--- a/doc/devel/index.rst
+++ b/doc/devel/index.rst
@@ -1,8 +1,8 @@
.. _developers-guide-index:
-################################
-The Matplotlib Developers' Guide
-################################
+############
+Contributing
+############
Thank you for your interest in helping to improve Matplotlib! There are various
ways to contribute to Matplotlib. All of them are super valuable but don't necessarily
@@ -19,14 +19,37 @@ process or how to fix something feel free to ask on `gitter
`_ for short questions and on
`discourse `_ for longer questions.
-.. raw:: html
+.. rst-class:: sd-d-inline-block
-
+ .. button-ref:: submitting-a-bug-report
+ :class: sd-fs-6
+ :color: primary
+
+ Report a bug
+
+.. rst-class:: sd-d-inline-block
+
+ .. button-ref:: request-a-new-feature
+ :class: sd-fs-6
+ :color: primary
+
+ Request a feature
+
+.. rst-class:: sd-d-inline-block
+
+ .. button-ref:: contributing-code
+ :class: sd-fs-6
+ :color: primary
+
+ Contribute code
+
+.. rst-class:: sd-d-inline-block
+
+ .. button-ref:: documenting-matplotlib
+ :class: sd-fs-6
+ :color: primary
+
+ Write documentation
.. toctree::
:maxdepth: 2
@@ -34,14 +57,15 @@ process or how to fix something feel free to ask on `gitter
contributing.rst
triage.rst
development_setup.rst
+ development_workflow.rst
testing.rst
documenting_mpl.rst
- add_new_projection.rst
- gitwash/index.rst
+ style_guide.rst
coding_guide.rst
release_guide.rst
dependencies.rst
min_dep_policy.rst
+ maintainer_workflow.rst
MEP/index
.. toctree::
diff --git a/doc/devel/gitwash/maintainer_workflow.rst b/doc/devel/maintainer_workflow.rst
similarity index 83%
rename from doc/devel/gitwash/maintainer_workflow.rst
rename to doc/devel/maintainer_workflow.rst
index 302f75241399..7723e6cb8c0c 100644
--- a/doc/devel/gitwash/maintainer_workflow.rst
+++ b/doc/devel/maintainer_workflow.rst
@@ -6,7 +6,7 @@
Maintainer workflow
###################
-This page is for maintainers |emdash| those of us who merge our own or other
+This page is for maintainers — those of us who merge our own or other
peoples' changes into the upstream repository.
Being as how you're a maintainer, you are completely on top of the basic stuff
@@ -26,12 +26,12 @@ Integrating changes
*******************
Let's say you have some changes that need to go into trunk
-(``upstream-rw/master``).
+(``upstream-rw/main``).
The changes are in some branch that you are currently on. For example, you are
looking at someone's changes like this::
- git remote add someone git://github.com/someone/matplotlib.git
+ git remote add someone https://github.com/someone/matplotlib.git
git fetch someone
git branch cool-feature --track someone/cool-feature
git checkout cool-feature
@@ -47,10 +47,10 @@ If there are only a few commits, consider rebasing to upstream::
# Fetch upstream changes
git fetch upstream-rw
# rebase
- git rebase upstream-rw/master
+ git rebase upstream-rw/main
Remember that, if you do a rebase, and push that, you'll have to close any
-github pull requests manually, because github will not be able to detect the
+GitHub pull requests manually, because GitHub will not be able to detect the
changes have already been merged.
A long series of commits
@@ -59,9 +59,9 @@ A long series of commits
If there are a longer series of related commits, consider a merge instead::
git fetch upstream-rw
- git merge --no-ff upstream-rw/master
+ git merge --no-ff upstream-rw/main
-The merge will be detected by github, and should close any related pull requests
+The merge will be detected by GitHub, and should close any related pull requests
automatically.
Note the ``--no-ff`` above. This forces git to make a merge commit, rather than
@@ -76,11 +76,11 @@ Now, in either case, you should check that the history is sensible and you have
the right commits::
git log --oneline --graph
- git log -p upstream-rw/master..
+ git log -p upstream-rw/main..
The first line above just shows the history in a compact way, with a text
representation of the history graph. The second line shows the log of commits
-excluding those that can be reached from trunk (``upstream-rw/master``), and
+excluding those that can be reached from trunk (``upstream-rw/main``), and
including those that can be reached from current HEAD (implied with the ``..``
at the end). So, it shows the commits unique to this branch compared to trunk.
The ``-p`` option shows the diff for these commits in patch form.
@@ -90,9 +90,7 @@ Push to trunk
::
- git push upstream-rw my-new-feature:master
+ git push upstream-rw my-new-feature:main
-This pushes the ``my-new-feature`` branch in this repository to the ``master``
+This pushes the ``my-new-feature`` branch in this repository to the ``main``
branch in the ``upstream-rw`` repository.
-
-.. include:: links.inc
diff --git a/doc/devel/min_dep_policy.rst b/doc/devel/min_dep_policy.rst
index 45cee59e34a3..0836315b8dd3 100644
--- a/doc/devel/min_dep_policy.rst
+++ b/doc/devel/min_dep_policy.rst
@@ -1,7 +1,7 @@
.. _min_deps_policy:
======================================
-Minimum Version of Dependencies Policy
+Minimum version of dependencies policy
======================================
For the purpose of this document, 'minor version' is in the sense of
@@ -32,7 +32,7 @@ on every major and minor release, but never on a patch release.
See also the :ref:`list-of-dependency-min-versions`.
-Python Dependencies
+Python dependencies
===================
For Python dependencies we should support at least:
@@ -41,14 +41,14 @@ with compiled extensions
minor versions initially released in the 24 months prior to our planned
release date or the oldest that support our minimum Python + NumPy
-without complied extensions
+without compiled extensions
minor versions initially released in the 12 months prior to our planned
release date or the oldest that supports our minimum Python.
We will only bump these dependencies as we need new features or the old
versions no longer support our minimum NumPy or Python.
-Test and Documentation Dependencies
+Test and documentation dependencies
===================================
As these packages are only needed for testing or building the docs and
@@ -61,7 +61,7 @@ We will support at least minor versions of the development
dependencies released in the 12 months prior to our planned release.
We will only bump these as needed or versions no longer support our
-minimum Python and numpy.
+minimum Python and NumPy.
System and C-dependencies
=========================
@@ -71,6 +71,10 @@ Ghostscript, FFmpeg) support as old as practical. These can be difficult to
install for end-users and we want to be usable on as many systems as
possible. We will bump these on a case-by-case basis.
+In the case of GUI frameworks for which we rely on Python bindings being
+available, we will also drop support for bindings so old that they don't
+support any Python version that we support.
+
.. _list-of-dependency-min-versions:
List of dependency versions
@@ -83,7 +87,10 @@ specification of the dependencies.
========== ======== ======
Matplotlib Python NumPy
========== ======== ======
-3.4 3.7 1.16.0
+`3.7`_ 3.8 1.20.0
+`3.6`_ 3.8 1.19.0
+`3.5`_ 3.7 1.17.0
+`3.4`_ 3.7 1.16.0
`3.3`_ 3.6 1.15.0
`3.2`_ 3.6 1.11.0
`3.1`_ 3.6 1.11.0
@@ -99,6 +106,10 @@ Matplotlib Python NumPy
1.0 2.4 1.1
========== ======== ======
+.. _`3.7`: https://matplotlib.org/3.7.0/devel/dependencies.html
+.. _`3.6`: https://matplotlib.org/3.6.0/devel/dependencies.html
+.. _`3.5`: https://matplotlib.org/3.5.0/devel/dependencies.html
+.. _`3.4`: https://matplotlib.org/3.4.0/devel/dependencies.html
.. _`3.3`: https://matplotlib.org/3.3.0/users/installing.html#dependencies
.. _`3.2`: https://matplotlib.org/3.2.0/users/installing.html#dependencies
.. _`3.1`: https://matplotlib.org/3.1.0/users/installing.html#dependencies
diff --git a/doc/devel/release_guide.rst b/doc/devel/release_guide.rst
index 451d482bc819..3f49631d00d8 100644
--- a/doc/devel/release_guide.rst
+++ b/doc/devel/release_guide.rst
@@ -3,7 +3,7 @@
.. _release-guide:
=============
-Release Guide
+Release guide
=============
@@ -45,8 +45,8 @@ is currently broken::
.. _release_ghstats:
-GitHub Stats
-============
+GitHub statistics
+=================
We automatically extract GitHub issue, PRs, and authors from GitHub via the
@@ -85,7 +85,7 @@ most common issue is ``*`` which is interpreted as unclosed markup).
.. _release_chkdocs:
-Update and Validate the Docs
+Update and validate the docs
============================
Merge ``*-doc`` branch
@@ -101,27 +101,62 @@ When making major or minor releases, update the supported versions in the
Security Policy in :file:`SECURITY.md`. Commonly, this may be one or two
previous minor releases, but is dependent on release managers.
-Update "What's New" and "API changes"
--------------------------------------
+Update release notes
+--------------------
+
+What's new
+~~~~~~~~~~
+
+*Only needed for major and minor releases. Bugfix releases should not have new
+features.*
+
+Merge the contents of all the files in :file:`doc/users/next_whats_new/`
+into a single file :file:`doc/users/prev_whats_new/whats_new_X.Y.0.rst`
+and delete the individual files.
+
+API changes
+~~~~~~~~~~~
+
+*Primarily needed for major and minor releases. We may sometimes have API
+changes in bugfix releases.*
+
+Merge the contents of all the files in :file:`doc/api/next_api_changes/`
+into a single file :file:`doc/api/prev_api_changes/api_changes_X.Y.Z.rst`
+and delete the individual files.
+
+Release notes TOC
+~~~~~~~~~~~~~~~~~
-Before tagging major and minor releases, the "what's new" and "API changes"
-listings should be updated. This is not needed for micro releases.
+Update :file:`doc/users/release_notes.rst`:
-For the "what's new",
+- For major and minor releases add a new section
- 1. copy the current content to a file in :file:`doc/users/prev_whats_new`
- 2. merge all of the files in :file:`doc/users/next_whats_new/` into
- :file:`doc/users/whats_new.rst` and delete the individual files
- 3. comment out the next what's new glob at the top
+ .. code:: rst
-Similarly for the "API changes",
+ X.Y
+ ===
+ .. toctree::
+ :maxdepth: 1
- 1. copy the current api changes to a file is :file:`doc/api/prev_api_changes`
- 2. merge all of the files in the most recent :file:`doc/api/next_api_changes`
- into :file:`doc/api/api_changes.rst`
- 3. comment out the most recent API changes at the top.
+ prev_whats_new/whats_new_X.Y.0.rst
+ ../api/prev_api_changes/api_changes_X.Y.0.rst
+ prev_whats_new/github_stats_X.Y.0.rst
+- For bugfix releases add the GitHub stats and (if present) the API changes to
+ the existing X.Y section
-In both cases step 3 will have to be un-done right after the release.
+ .. code:: rst
+
+ ../api/prev_api_changes/api_changes_X.Y.Z.rst
+ prev_whats_new/github_stats_X.Y.Z.rst
+
+Update version switcher
+~~~~~~~~~~~~~~~~~~~~~~~
+
+Update ``doc/_static/switcher.json``. If a minor release, ``X.Y.Z``, create
+a new entry ``version: X.Y.(Z-1)``, and change the name of stable
+``name: stable/X.Y.Z``. If a major release, ``X.Y.0``, change the name
+of ``name: devel/X.(Y+1)`` and ``name: stable/X.Y.0`` as well as adding
+a new version for the previous stable.
Verify that docs build
----------------------
@@ -145,6 +180,19 @@ Python3 yet. You will need to create a Python2 environment with
Address any issues which may arise. The internal links are checked on Circle
CI, this should only flag failed external links.
+
+Update supported versions in SECURITY.md
+----------------------------------------
+
+For minor version release update the table in :file:`SECURITY.md` to specify
+that the 2 most recent minor releases in the current major version series are
+supported.
+
+For a major version release update the table in :file:`SECURITY.md` to specify
+that the last minor version in the previous major version series is still
+supported. Dropping support for the last version of a major version series
+will be handled on an ad-hoc basis.
+
.. _release_tag:
Create release commit and tag
@@ -172,18 +220,16 @@ with the tag [#]_::
Finally, push the tag to GitHub::
- git push DANGER master v2.0.0
+ git push DANGER main v2.0.0
Congratulations, the scariest part is done!
-.. [#] The tarball that is provided by GitHub is produced using `git
- archive `__. We use
- `versioneer `__
- which uses a format string in
+.. [#] The tarball that is provided by GitHub is produced using `git archive`_.
+ We use setuptools_scm_ which uses a format string in
:file:`lib/matplotlib/_version.py` to have ``git`` insert a
list of references to exported commit (see
:file:`.gitattributes` for the configuration). This string is
- then used by ``versioneer`` to produce the correct version,
+ then used by ``setuptools_scm`` to produce the correct version,
based on the git tag, when users install from the tarball.
However, if there is a branch pointed at the tagged commit,
then the branch name will also be included in the tarball.
@@ -195,6 +241,8 @@ Congratulations, the scariest part is done!
git archive v2.0.0 -o matplotlib-2.0.0.tar.gz --prefix=matplotlib-2.0.0/
+.. _git archive: https://git-scm.com/docs/git-archive
+.. _setuptools_scm: https://github.com/pypa/setuptools_scm
If this is a final release, also create a 'doc' branch (this is not
done for pre-releases)::
@@ -216,7 +264,7 @@ On this branch un-comment the globs from :ref:`release_chkdocs`. And then ::
.. _release_DOI:
-Release Management / DOI
+Release management / DOI
========================
Via the `GitHub UI
@@ -308,7 +356,7 @@ Congratulations, you have now done the second scariest part!
.. _release_docs:
-Build and Deploy Documentation
+Build and deploy documentation
==============================
To build the documentation you must have the tagged version installed, but
@@ -318,21 +366,21 @@ build the docs from the ``ver-doc`` branch. An easy way to arrange this is::
pip install -r requirements/doc/doc-requirements.txt
git checkout v2.0.0-doc
git clean -xfd
- make -Cdoc O="-Ainclude_analytics=True -j$(nproc)" html latexpdf LATEXMKOPTS="-silent -f"
+ make -Cdoc O="-t release -j$(nproc)" html latexpdf LATEXMKOPTS="-silent -f"
which will build both the html and pdf version of the documentation.
The built documentation exists in the `matplotlib.github.com
`__ repository.
-Pushing changes to master automatically updates the website.
+Pushing changes to main automatically updates the website.
The documentation is organized by version. At the root of the tree is always
the documentation for the latest stable release. Under that, there are
directories containing the documentation for older versions. The documentation
-for current master is built on Circle CI and pushed to the `devdocs
+for current main is built on Circle CI and pushed to the `devdocs
`__ repository. These are available at
-`matplotlib.org/devdocs `__.
+`matplotlib.org/devdocs `__.
Assuming you have this repository checked out in the same directory as
matplotlib ::
@@ -355,7 +403,7 @@ the newly released version. Now commit and push everything to GitHub ::
git add *
git commit -a -m 'Updating docs for v2.0.0'
- git push DANGER master
+ git push DANGER main
Congratulations you have now done the third scariest part!
diff --git a/doc/devel/style_guide.rst b/doc/devel/style_guide.rst
new file mode 100644
index 000000000000..9dab7a6d99d2
--- /dev/null
+++ b/doc/devel/style_guide.rst
@@ -0,0 +1,411 @@
+
+=========================
+Documentation style guide
+=========================
+
+This guide contains best practices for the language and formatting of Matplotlib
+documentation.
+
+.. seealso::
+
+ For more information about contributing, see the :ref:`documenting-matplotlib`
+ section.
+
+Expository language
+===================
+
+For explanatory writing, the following guidelines are for clear and concise
+language use.
+
+Terminology
+-----------
+
+There are several key terms in Matplotlib that are standards for
+reliability and consistency in documentation. They are not interchangeable.
+
+.. table::
+ :widths: 15, 15, 35, 35
+
+ +------------------+--------------------------+--------------+--------------+
+ | Term | Description | Correct | Incorrect |
+ +==================+==========================+==============+==============+
+ | |Figure| | Matplotlib working space | - *For | - "The figure|
+ | | for programming. | Matplotlib | is the |
+ | | | objects*: | working |
+ | | | Figure, | space for |
+ | | | "The Figure| visuals." |
+ | | | is the | - "Methods in|
+ | | | working | the figure |
+ | | | space for | provide the|
+ | | | the visual.| visuals." |
+ | | | - *Referring | - "The |
+ | | | to class*: | |Figure| |
+ | | | |Figure|, | Four |
+ | | | "Methods | leglock is |
+ | | | within the | a wrestling|
+ | | | |Figure| | move." |
+ | | | provide the| |
+ | | | visuals." | |
+ | | | - *General | |
+ | | | language*: | |
+ | | | figure, | |
+ | | | "Michelle | |
+ | | | Kwan is a | |
+ | | | famous | |
+ | | | figure | |
+ | | | skater." | |
+ +------------------+--------------------------+--------------+--------------+
+ | |Axes| | Subplots within Figure. | - *For | - "The axes |
+ | | Contains plot elements | Matplotlib | methods |
+ | | and is responsible for | objects*: | transform |
+ | | plotting and configuring | Axes, "An | the data." |
+ | | additional details. | Axes is a | - "Each |
+ | | | subplot | |Axes| is |
+ | | | within the | specific to|
+ | | | Figure." | a Figure." |
+ | | | - *Referring | - "The |
+ | | | to class*: | musicians |
+ | | | |Axes|, | on stage |
+ | | | "Each | call their |
+ | | | |Axes| is | guitars |
+ | | | specific to| Axes." |
+ | | | one | - "The point |
+ | | | Figure." | where the |
+ | | | - *General | Axes meet |
+ | | | language*: | is the |
+ | | | axes, "Both| origin of |
+ | | | loggers and| the |
+ | | | lumberjacks| coordinate |
+ | | | use axes to| system." |
+ | | | chop wood."| |
+ | | | OR "There | |
+ | | | are no | |
+ | | | standard | |
+ | | | names for | |
+ | | | the | |
+ | | | coordinates| |
+ | | | in the | |
+ | | | three | |
+ | | | axes." | |
+ | | | (Plural of | |
+ | | | axis) | |
+ +------------------+--------------------------+--------------+--------------+
+ | |Artist| | Broad variety of | - *For | - "Configure |
+ | | Matplotlib objects that | Matplotlib | the legend |
+ | | display visuals. | objects*: | artist with|
+ | | | Artist, | its |
+ | | | "Artists | respective |
+ | | | display | method." |
+ | | | visuals and| - "There is |
+ | | | are the | an |
+ | | | visible | |Artist| |
+ | | | elements | for that |
+ | | | when | visual in |
+ | | | rendering a| the graph."|
+ | | | Figure." | - "Some |
+ | | | - *Referring | Artists |
+ | | | to class*: | became |
+ | | | |Artist| , | famous only|
+ | | | "Each | by |
+ | | | |Artist| | accident." |
+ | | | has | |
+ | | | respective | |
+ | | | methods and| |
+ | | | functions."| |
+ | | | - *General | |
+ | | | language*: | |
+ | | | artist, | |
+ | | | "The | |
+ | | | artist in | |
+ | | | the museum | |
+ | | | is from | |
+ | | | France." | |
+ +------------------+--------------------------+--------------+--------------+
+ | |Axis| | Human-readable single | - *For | - "Plot the |
+ | | dimensional object | Matplotlib | graph onto |
+ | | of reference marks | objects*: | the axis." |
+ | | containing ticks, tick | Axis, "The | - "Each Axis |
+ | | labels, spines, and | Axis for | is usually |
+ | | edges. | the bar | named after|
+ | | | chart is a | the |
+ | | | separate | coordinate |
+ | | | Artist." | which is |
+ | | | (plural, | measured |
+ | | | Axis | along it." |
+ | | | objects) | - "In some |
+ | | | - *Referring | computer |
+ | | | to class*: | graphics |
+ | | | |Axis|, | contexts, |
+ | | | "The | the |
+ | | | |Axis| | ordinate |
+ | | | contains | |Axis| may |
+ | | | respective | be oriented|
+ | | | XAxis and | downwards."|
+ | | | YAxis | |
+ | | | objects." | |
+ | | | - *General | |
+ | | | language*: | |
+ | | | axis, | |
+ | | | "Rotation | |
+ | | | around a | |
+ | | | fixed axis | |
+ | | | is a | |
+ | | | special | |
+ | | | case of | |
+ | | | rotational | |
+ | | | motion." | |
+ +------------------+--------------------------+--------------+--------------+
+ | Explicit, | Explicit approach of | - Explicit | - object |
+ | Object Oriented | programming in | - explicit | oriented |
+ | Programming (OOP)| Matplotlib. | - OOP | - OO-style |
+ +------------------+--------------------------+--------------+--------------+
+ | Implicit, | Implicit approach of | - Implicit | - MATLAB like|
+ | ``pyplot`` | programming in Matplotlib| - implicit | - Pyplot |
+ | | with ``pyplot`` module. | - ``pyplot`` | - pyplot |
+ | | | | interface |
+ +------------------+--------------------------+--------------+--------------+
+
+.. |Figure| replace:: :class:`~matplotlib.figure.Figure`
+.. |Axes| replace:: :class:`~matplotlib.axes.Axes`
+.. |Artist| replace:: :class:`~matplotlib.artist.Artist`
+.. |Axis| replace:: :class:`~matplotlib.axis.Axis`
+
+
+Grammar
+-------
+
+Subject
+^^^^^^^
+Use second-person imperative sentences for directed instructions specifying an
+action. Second-person pronouns are for individual-specific contexts and
+possessive reference.
+
+.. table::
+ :width: 100%
+ :widths: 50, 50
+
+ +------------------------------------+------------------------------------+
+ | Correct | Incorrect |
+ +====================================+====================================+
+ | Install Matplotlib from the source | You can install Matplotlib from the|
+ | directory using the Python ``pip`` | source directory. You can find |
+ | installer program. Depending on | additional support if you are |
+ | your operating system, you may need| having trouble with your |
+ | additional support. | installation. |
+ +------------------------------------+------------------------------------+
+
+Tense
+^^^^^
+Use present simple tense for explanations. Avoid future tense and other modal
+or auxiliary verbs when possible.
+
+.. table::
+ :width: 100%
+ :widths: 50, 50
+
+ +------------------------------------+------------------------------------+
+ | Correct | Incorrect |
+ +====================================+====================================+
+ | The fundamental ideas behind | Matplotlib will take data and |
+ | Matplotlib for visualization | transform it through functions and |
+ | involve taking data and | methods. They can generate many |
+ | transforming it through functions | kinds of visuals. These will be the|
+ | and methods. | fundamentals for using Matplotlib. |
+ +------------------------------------+------------------------------------+
+
+Voice
+^^^^^
+Write in active sentences. Passive voice is best for situations or conditions
+related to warning prompts.
+
+.. table::
+ :width: 100%
+ :widths: 50, 50
+
+ +------------------------------------+------------------------------------+
+ | Correct | Incorrect |
+ +====================================+====================================+
+ | The function ``plot`` generates the| The graph is generated by the |
+ | graph. | ``plot`` function. |
+ +------------------------------------+------------------------------------+
+ | An error message is returned by the| You will see an error message from |
+ | function if there are no arguments.| the function if there are no |
+ | | arguments. |
+ +------------------------------------+------------------------------------+
+
+Sentence structure
+^^^^^^^^^^^^^^^^^^
+Write with short sentences using Subject-Verb-Object order regularly. Limit
+coordinating conjunctions in sentences. Avoid pronoun references and
+subordinating conjunctive phrases.
+
+.. table::
+ :width: 100%
+ :widths: 50, 50
+
+ +------------------------------------+------------------------------------+
+ | Correct | Incorrect |
+ +====================================+====================================+
+ | The ``pyplot`` module in Matplotlib| The ``pyplot`` module in Matplotlib|
+ | is a collection of functions. These| is a collection of functions which |
+ | functions create, manage, and | create, manage, and manipulate the |
+ | manipulate the current Figure and | current Figure and plotting area. |
+ | plotting area. | |
+ +------------------------------------+------------------------------------+
+ | The ``plot`` function plots data | The ``plot`` function plots data |
+ | to the respective Axes. The Axes | within its respective Axes for its |
+ | corresponds to the respective | respective Figure. |
+ | Figure. | |
+ +------------------------------------+------------------------------------+
+ | The implicit approach is a | Users that wish to have convenient |
+ | convenient shortcut for | shortcuts for generating plots use |
+ | generating simple plots. | the implicit approach. |
+ +------------------------------------+------------------------------------+
+
+
+Formatting
+==========
+
+The following guidelines specify how to incorporate code and use appropriate
+formatting for Matplotlib documentation.
+
+Code
+----
+
+Matplotlib is a Python library and follows the same standards for
+documentation.
+
+Comments
+^^^^^^^^
+Examples of Python code have comments before or on the same line.
+
+.. table::
+ :width: 100%
+ :widths: 50, 50
+
+ +---------------------------------------+---------------------------------+
+ | Correct | Incorrect |
+ +=======================================+=================================+
+ | :: | :: |
+ | | |
+ | # Data | years = [2006, 2007, 2008] |
+ | years = [2006, 2007, 2008] | # Data |
+ +---------------------------------------+ |
+ | :: | |
+ | | |
+ | years = [2006, 2007, 2008] # Data | |
+ +---------------------------------------+---------------------------------+
+
+Outputs
+^^^^^^^
+When generating visuals with Matplotlib using ``.py`` files in examples,
+display the visual with `matplotlib.pyplot.show` to display the visual.
+Keep the documentation clear of Python output lines.
+
+.. table::
+ :width: 100%
+ :widths: 50, 50
+
+ +------------------------------------+------------------------------------+
+ | Correct | Incorrect |
+ +====================================+====================================+
+ | :: | :: |
+ | | |
+ | plt.plot([1, 2, 3], [1, 2, 3]) | plt.plot([1, 2, 3], [1, 2, 3]) |
+ | plt.show() | |
+ +------------------------------------+------------------------------------+
+ | :: | :: |
+ | | |
+ | fig, ax = plt.subplots() | fig, ax = plt.subplots() |
+ | ax.plot([1, 2, 3], [1, 2, 3]) | ax.plot([1, 2, 3], [1, 2, 3]) |
+ | fig.show() | |
+ +------------------------------------+------------------------------------+
+
+reStructuredText
+----------------
+
+Matplotlib uses reStructuredText Markup for documentation. Sphinx helps to
+transform these documents into appropriate formats for accessibility and
+visibility.
+
+- `reStructuredText Specifications `_
+- `Quick Reference Document `_
+
+
+Lists
+^^^^^
+Bulleted lists are for items that do not require sequencing. Numbered lists are
+exclusively for performing actions in a determined order.
+
+.. table::
+ :width: 100%
+ :widths: 50, 50
+
+ +------------------------------------+------------------------------------+
+ | Correct | Incorrect |
+ +====================================+====================================+
+ | The example uses three graphs. | The example uses three graphs. |
+ +------------------------------------+------------------------------------+
+ | - Bar | 1. Bar |
+ | - Line | 2. Line |
+ | - Pie | 3. Pie |
+ +------------------------------------+------------------------------------+
+ | These four steps help to get | The following steps are important |
+ | started using Matplotlib. | to get started using Matplotlib. |
+ +------------------------------------+------------------------------------+
+ | 1. Import the Matplotlib library. | - Import the Matplotlib library. |
+ | 2. Import the necessary modules. | - Import the necessary modules. |
+ | 3. Set and assign data to work on.| - Set and assign data to work on. |
+ | 4. Transform data with methods and| - Transform data with methods and |
+ | functions. | functions. |
+ +------------------------------------+------------------------------------+
+
+Tables
+^^^^^^
+Use ASCII tables with reStructuredText standards in organizing content.
+Markdown tables and the csv-table directive are not accepted.
+
+.. table::
+ :width: 100%
+ :widths: 50, 50
+
+ +--------------------------------+----------------------------------------+
+ | Correct | Incorrect |
+ +================================+========================================+
+ | +----------+----------+ | :: |
+ | | Correct | Incorrect| | |
+ | +==========+==========+ | | Correct | Incorrect | |
+ | | OK | Not OK | | | ------- | --------- | |
+ | +----------+----------+ | | OK | Not OK | |
+ | | |
+ +--------------------------------+----------------------------------------+
+ | :: | :: |
+ | | |
+ | +----------+----------+ | .. csv-table:: |
+ | | Correct | Incorrect| | :header: "correct", "incorrect" |
+ | +==========+==========+ | :widths: 10, 10 |
+ | | OK | Not OK | | |
+ | +----------+----------+ | "OK ", "Not OK" |
+ | | |
+ +--------------------------------+ |
+ | :: | |
+ | | |
+ | =========== =========== | |
+ | Correct Incorrect | |
+ | =========== =========== | |
+ | OK Not OK | |
+ | =========== =========== | |
+ | | |
+ +--------------------------------+----------------------------------------+
+
+
+Additional resources
+====================
+This style guide is not a comprehensive standard. For a more thorough
+reference of how to contribute to documentation, see the links below. These
+resources contain common best practices for writing documentation.
+
+* `Python Developer's Guide `_
+* `Google Developer Style Guide `_
+* `IBM Style Guide `_
+* `Red Hat Style Guide `_
diff --git a/doc/devel/testing.rst b/doc/devel/testing.rst
index b46586104121..06296f5dc701 100644
--- a/doc/devel/testing.rst
+++ b/doc/devel/testing.rst
@@ -57,14 +57,6 @@ not need to be installed, but Matplotlib should be)::
pytest lib/matplotlib/tests/test_simplification.py::test_clipping
-An alternative implementation that does not look at command line arguments
-and works from within Python is to run the tests from the Matplotlib library
-function :func:`matplotlib.test`::
-
- import matplotlib
- matplotlib.test()
-
-
.. _command-line parameters: http://doc.pytest.org/en/latest/usage.html
@@ -95,10 +87,12 @@ Random data in tests
Random data is a very convenient way to generate data for examples,
however the randomness is problematic for testing (as the tests
must be deterministic!). To work around this set the seed in each test.
-For numpy use::
+For numpy's default random number generator use::
import numpy as np
- np.random.seed(19680801)
+ rng = np.random.default_rng(19680801)
+
+and then use ``rng`` when generating the random numbers.
The seed is John Hunter's birthday.
@@ -115,7 +109,7 @@ tests it::
import matplotlib.pyplot as plt
@image_comparison(baseline_images=['line_dashes'], remove_text=True,
- extensions=['png'])
+ extensions=['png'], style='mpl20')
def test_line_dashes():
fig, ax = plt.subplots()
ax.plot(range(10), linestyle=(0, (3, 3)), lw=5)
@@ -136,6 +130,12 @@ images on the figures using two different methods (the tested method and the
baseline method). The decorator will arrange for setting up the figures and
then collect the drawn results and compare them.
+It is preferred that new tests use ``style='mpl20'`` as this leads to smaller
+figures and reflects the newer look of default Matplotlib plots. Also, if the
+texts (labels, tick labels, etc) are not really part of what is tested, use
+``remove_text=True`` as this will lead to smaller figures and reduce possible
+issues with font mismatch on different platforms.
+
See the documentation of `~matplotlib.testing.decorators.image_comparison` and
`~matplotlib.testing.decorators.check_figures_equal` for additional information
about their use.
@@ -165,7 +165,9 @@ workflows
GitHub Actions should be automatically enabled for your personal Matplotlib
fork once the YAML workflow files are in it. It generally isn't necessary to
look at these workflows, since any pull request submitted against the main
-Matplotlib repository will be tested.
+Matplotlib repository will be tested. The Tests workflow is skipped in forked
+repositories but you can trigger a run manually from the `GitHub web interface
+`_.
You can see the GitHub Actions results at
https://github.com/your_GitHub_user_name/matplotlib/actions -- here's `an
@@ -177,7 +179,7 @@ Using tox
`Tox `_ is a tool for running tests
against multiple Python environments, including multiple versions of Python
-(e.g., 3.6, 3.7) and even different Python implementations altogether
+(e.g., 3.7, 3.8) and even different Python implementations altogether
(e.g., CPython, PyPy, Jython, etc.), as long as all these versions are
available on your system's $PATH (consider using your system package manager,
e.g. apt-get, yum, or Homebrew, to install them).
@@ -194,7 +196,7 @@ You can also run tox on a subset of environments:
.. code-block:: bash
- $ tox -e py37,py38
+ $ tox -e py38,py39
Tox processes everything serially so it can take a long time to test
several environments. To speed it up, you might try using a new,
@@ -252,7 +254,7 @@ The correct target folder can be found using::
python -c "import matplotlib.tests; print(matplotlib.tests.__file__.rsplit('/', 1)[0])"
An analogous copying of :file:`lib/mpl_toolkits/tests/baseline_images`
-is necessary for testing the :ref:`toolkits`.
+is necessary for testing ``mpl_toolkits``.
Run the tests
^^^^^^^^^^^^^
@@ -264,4 +266,3 @@ The test discovery scope can be narrowed to single test modules or even single
functions::
python -m pytest --pyargs matplotlib.tests.test_simplification.py::test_clipping
-
diff --git a/doc/devel/triage.rst b/doc/devel/triage.rst
old mode 100644
new mode 100755
index b57947b049b7..2106ac99c606
--- a/doc/devel/triage.rst
+++ b/doc/devel/triage.rst
@@ -16,7 +16,7 @@ internals of Matplotlib, is extremely valuable to the project, and we
welcome anyone to participate in issue triage! However, people who
are not part of the Matplotlib organization do not have `permissions
to change milestones, add labels, or close issue
-`_.
+`_.
If you do not have enough GitHub permissions do something (e.g. add a
label, close an issue), please leave a comment tagging
``@matplotlib/triageteam`` with your recommendations!
@@ -62,7 +62,7 @@ The following actions are typically useful:
explores how to lead online discussions in the context of open source.
-Triage Team
+Triage team
-----------
@@ -87,7 +87,7 @@ Triaging operations for members of the core and triage teams
In addition to the above, members of the core team and the triage team
can do the following important tasks:
-- Update labels for issues and PRs: see the list of `available github
+- Update labels for issues and PRs: see the list of `available GitHub
labels `_.
- Triage issues:
@@ -208,7 +208,7 @@ The following workflow [1]_ is a good way to approach issue triaging:
.. [1] Adapted from the pandas project `maintainers guide
- `_ and
+ `_ and
`the scikit-learn project
`_ .
@@ -223,5 +223,5 @@ participate to the review process following our :ref:`review guidelines
Acknowledgments
---------------
-This page is lightly adapted from `the sckit-learn project
+This page is lightly adapted from `the scikit-learn project
`_ .
diff --git a/doc/faq/installing_faq.rst b/doc/faq/installing_faq.rst
deleted file mode 100644
index e97a8737ad02..000000000000
--- a/doc/faq/installing_faq.rst
+++ /dev/null
@@ -1,137 +0,0 @@
-.. _installing-faq:
-
-*************
- Installation
-*************
-
-.. contents::
- :backlinks: none
-
-Report a compilation problem
-============================
-
-See :ref:`reporting-problems`.
-
-Matplotlib compiled fine, but nothing shows up when I use it
-============================================================
-
-The first thing to try is a :ref:`clean install ` and see if
-that helps. If not, the best way to test your install is by running a script,
-rather than working interactively from a python shell or an integrated
-development environment such as :program:`IDLE` which add additional
-complexities. Open up a UNIX shell or a DOS command prompt and run, for
-example::
-
- python -c "from pylab import *; set_loglevel('debug'); plot(); show()"
-
-This will give you additional information about which backends Matplotlib is
-loading, version information, and more. At this point you might want to make
-sure you understand Matplotlib's :doc:`configuration `
-process, governed by the :file:`matplotlibrc` configuration file which contains
-instructions within and the concept of the Matplotlib backend.
-
-If you are still having trouble, see :ref:`reporting-problems`.
-
-.. _clean-install:
-
-How to completely remove Matplotlib
-===================================
-
-Occasionally, problems with Matplotlib can be solved with a clean
-installation of the package. In order to fully remove an installed Matplotlib:
-
-1. Delete the caches from your :ref:`Matplotlib configuration directory
- `.
-
-2. Delete any Matplotlib directories or eggs from your :ref:`installation
- directory `.
-
-OSX Notes
-=========
-
-.. _which-python-for-osx:
-
-Which python for OSX?
----------------------
-
-Apple ships OSX with its own Python, in ``/usr/bin/python``, and its own copy
-of Matplotlib. Unfortunately, the way Apple currently installs its own copies
-of NumPy, Scipy and Matplotlib means that these packages are difficult to
-upgrade (see `system python packages`_). For that reason we strongly suggest
-that you install a fresh version of Python and use that as the basis for
-installing libraries such as NumPy and Matplotlib. One convenient way to
-install Matplotlib with other useful Python software is to use the Anaconda_
-Python scientific software collection, which includes Python itself and a
-wide range of libraries; if you need a library that is not available from the
-collection, you can install it yourself using standard methods such as *pip*.
-See the Ananconda web page for installation support.
-
-.. _system python packages:
- https://github.com/MacPython/wiki/wiki/Which-Python#system-python-and-extra-python-packages
-.. _Anaconda: https://www.anaconda.com/
-
-Other options for a fresh Python install are the standard installer from
-`python.org `_, or installing
-Python using a general OSX package management system such as `homebrew
-`_ or `macports `_. Power users on
-OSX will likely want one of homebrew or macports on their system to install
-open source software packages, but it is perfectly possible to use these
-systems with another source for your Python binary, such as Anaconda
-or Python.org Python.
-
-.. _install_osx_binaries:
-
-Installing OSX binary wheels
-----------------------------
-
-If you are using Python from https://www.python.org, Homebrew, or Macports,
-then you can use the standard pip installer to install Matplotlib binaries in
-the form of wheels.
-
-pip is installed by default with python.org and Homebrew Python, but needs to
-be manually installed on Macports with ::
-
- sudo port install py38-pip
-
-Once pip is installed, you can install Matplotlib and all its dependencies with
-from the Terminal.app command line::
-
- python3 -mpip install matplotlib
-
-(``sudo python3.6 ...`` on Macports).
-
-You might also want to install IPython or the Jupyter notebook (``python3 -mpip
-install ipython notebook``).
-
-Checking your installation
---------------------------
-
-The new version of Matplotlib should now be on your Python "path". Check this
-at the Terminal.app command line::
-
- python3 -c 'import matplotlib; print(matplotlib.__version__, matplotlib.__file__)'
-
-You should see something like ::
-
- 3.0.0 /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/matplotlib/__init__.py
-
-where ``3.0.0`` is the Matplotlib version you just installed, and the path
-following depends on whether you are using Python.org Python, Homebrew or
-Macports. If you see another version, or you get an error like ::
-
- Traceback (most recent call last):
- File "", line 1, in
- ImportError: No module named matplotlib
-
-then check that the Python binary is the one you expected by running ::
-
- which python3
-
-If you get a result like ``/usr/bin/python...``, then you are getting the
-Python installed with OSX, which is probably not what you want. Try closing
-and restarting Terminal.app before running the check again. If that doesn't fix
-the problem, depending on which Python you wanted to use, consider reinstalling
-Python.org Python, or check your homebrew or macports setup. Remember that
-the disk image installer only works for Python.org Python, and will not get
-picked up by other Pythons. If all these fail, please :ref:`let us know
-`.
diff --git a/doc/index.rst b/doc/index.rst
index 50526173e3bd..1c608c0d62cb 100644
--- a/doc/index.rst
+++ b/doc/index.rst
@@ -1,223 +1,111 @@
:orphan:
-.. title:: Matplotlib: Python plotting
+.. title:: Matplotlib documentation
.. module:: matplotlib
-Matplotlib: Visualization with Python
--------------------------------------
+
+##################################
+Matplotlib |release| documentation
+##################################
Matplotlib is a comprehensive library for creating static, animated,
and interactive visualizations in Python.
-.. raw:: html
-
-
-
-
-Matplotlib makes easy things easy and hard things possible.
-
-.. container:: bullet-box-container
-
- .. container:: bullet-box
-
- Create
-
- - Develop `publication quality plots`_ with just a few lines of code
- - Use `interactive figures`_ that can zoom, pan, update...
-
- .. _publication quality plots: https://matplotlib.org/gallery/index.html
- .. _interactive figures: https://matplotlib.org/gallery/index.html#event-handling
-
- .. container:: bullet-box
-
- Customize
-
- - `Take full control`_ of line styles, font properties, axes properties...
- - `Export and embed`_ to a number of file formats and interactive environments
-
- .. _Take full control: https://matplotlib.org/tutorials/index.html#tutorials
- .. _Export and embed: https://matplotlib.org/api/index_backend_api.html
-
- .. container:: bullet-box
-
- Extend
-
- - Explore tailored functionality provided by
- :doc:`third party packages `
- - Learn more about Matplotlib through the many
- :doc:`external learning resources `
-
-Documentation
-~~~~~~~~~~~~~
-
-To get started, read the :doc:`User's Guide `.
-
-Trying to learn how to do a particular kind of plot? Check out the
-:doc:`examples gallery ` or the :doc:`list of plotting commands
-`.
-
-Join our community!
-~~~~~~~~~~~~~~~~~~~
-
-Matplotlib is a welcoming, inclusive project, and everyone within the community
-is expected to abide by our `code of conduct
-`_.
-
-
-.. raw:: html
-
- Get help
-
-
-

-
Join our community at discourse.matplotlib.org
- to get help, discuss contributing & development, and share your work.
-
-
-

-
If you have questions, be sure to check the FAQ,
- the API docs. The full text
- search is a good way to discover the docs including the many examples.
-
-
-
-
-
- News
-
-
-

-
To keep up to date with what's going on in Matplotlib, see the
- what's new page or browse the
- source code. Anything that could
- require changes to your existing code is logged in the
- API changes file.
-
-
-

-
-
-
-
- Development
-
-
-

-
Matplotlib is hosted on GitHub.
-
-
It is a good idea to ping us on Discourse as well.
-
-
-

-
Mailing lists
-
-
-
-
-
-Toolkits
-========
-
-Matplotlib ships with several add-on :doc:`toolkits `,
-including 3D plotting with `.mplot3d`, axes helpers in `.axes_grid1` and axis
-helpers in `.axisartist`.
-
-Third party packages
-====================
-
-A large number of :doc:`third party packages `
-extend and build on Matplotlib functionality, including several higher-level
-plotting interfaces (seaborn_, HoloViews_, ggplot_, ...), and a projection
-and mapping toolkit (Cartopy_).
-
-.. _seaborn: https://seaborn.pydata.org
-.. _HoloViews: https://holoviews.org
-.. _ggplot: https://yhat.github.io/ggpy/
-.. _Cartopy: https://scitools.org.uk/cartopy/docs/latest
-
-Citing Matplotlib
-=================
-
-Matplotlib is the brainchild of John Hunter (1968-2012), who, along with its
-many contributors, have put an immeasurable amount of time and effort into
-producing a piece of software utilized by thousands of scientists worldwide.
-
-If Matplotlib contributes to a project that leads to a scientific publication,
-please acknowledge this work by citing the project. A :doc:`ready-made citation
-entry ` is available.
-
-Open source
-===========
-
-.. raw:: html
-
-
-
-
-
-
-Matplotlib is a Sponsored Project of NumFOCUS, a 501(c)(3) nonprofit
-charity in the United States. NumFOCUS provides Matplotlib with
-fiscal, legal, and administrative support to help ensure the health
-and sustainability of the project. Visit `numfocus.org `_ for more
-information.
-
-Donations to Matplotlib are managed by NumFOCUS. For donors in the
-United States, your gift is tax-deductible to the extent provided by
-law. As with any donation, you should consult with your tax adviser
-about your particular tax situation.
-
-Please consider `donating to the Matplotlib project `_ through
-the NumFOCUS organization or to the `John Hunter Technology Fellowship
-`_.
-
-.. _donating: https://numfocus.org/donate-to-matplotlib
-.. _jdh-fellowship: https://numfocus.org/programs/john-hunter-technology-fellowship/
-.. _nf: https://numfocus.org
-
-The :doc:`Matplotlib license ` is based on the `Python Software
-Foundation (PSF) license `_.
-
-.. _psf-license: https://www.python.org/psf/license
-
-There is an active developer community and a long list of people who have made
-significant :doc:`contributions `.
+************
+Installation
+************
+
+.. 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 `.
+
+
+******************
+Learning resources
+******************
+
+.. grid:: 1 1 2 2
+
+ .. grid-item-card::
+ :padding: 2
+
+ Tutorials
+ ^^^
+
+ - :doc:`Quick-start guide `
+ - :doc:`Plot types `
+ - :ref:`Introductory tutorials `
+ - :doc:`External learning resources `
+
+ .. grid-item-card::
+ :padding: 2
+
+ How-tos
+ ^^^
+
+ - :doc:`Example gallery `
+ - :doc:`Matplotlib FAQ `
+
+ .. grid-item-card::
+ :padding: 2
+
+ Understand how Matplotlib works
+ ^^^
+
+ - The :ref:`users-guide-explain` in the :doc:`Users guide
+ `
+ - Many of the :ref:`Intermediate ` and
+ :ref:`Advanced ` tutorials have explanatory
+ material
+
+ .. grid-item-card::
+ :padding: 2
+
+ Reference
+ ^^^
+
+ - :doc:`API Reference `
+ - :doc:`Axes API ` for most plotting methods
+ - :doc:`Figure API ` for figure-level methods
+ - Top-level interfaces to create:
+
+ - Figures (`.pyplot.figure`)
+ - Subplots (`.pyplot.subplots`, `.pyplot.subplot_mosaic`)
+
+
+********************
+Third-party packages
+********************
+
+There are many `Third-party packages
+`_ built on top of and extending
+Matplotlib.
+
+
+************
+Contributing
+************
+
+Matplotlib is a community project maintained for and by its users. There are many ways
+you can help!
+
+- Help other users `on discourse `__
+- report a bug or request a feature `on GitHub `__
+- or improve the :ref:`documentation and code `
diff --git a/doc/make.bat b/doc/make.bat
index 042c9ef3543b..aa6612f08eae 100644
--- a/doc/make.bat
+++ b/doc/make.bat
@@ -10,8 +10,9 @@ if "%SPHINXBUILD%" == "" (
set SOURCEDIR=.
set BUILDDIR=build
set SPHINXPROJ=matplotlib
-set SPHINXOPTS=-W
-set O=
+if defined SPHINXOPTS goto skipopts
+set SPHINXOPTS=-W --keep-going
+:skipopts
%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
@@ -27,12 +28,32 @@ if errorlevel 9009 (
)
if "%1" == "" goto help
+if "%1" == "html-noplot" goto html-noplot
+if "%1" == "show" goto show
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
+if "%1" == "clean" (
+ REM workaround because sphinx does not completely clean up (#11139)
+ rmdir /s /q "%SOURCEDIR%\build"
+ rmdir /s /q "%SOURCEDIR%\api\_as_gen"
+ rmdir /s /q "%SOURCEDIR%\gallery"
+ rmdir /s /q "%SOURCEDIR%\plot_types"
+ rmdir /s /q "%SOURCEDIR%\tutorials"
+ rmdir /s /q "%SOURCEDIR%\savefig"
+ rmdir /s /q "%SOURCEDIR%\sphinxext\__pycache__"
+)
goto end
:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
+goto end
+
+:html-noplot
+%SPHINXBUILD% -M html %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% -D plot_gallery=0
+goto end
+
+:show
+python -m webbrowser -t "%~dp0\build\html\index.html"
:end
popd
diff --git a/doc/missing-references.json b/doc/missing-references.json
index 054a201acca3..d9a64ae39c2a 100644
--- a/doc/missing-references.json
+++ b/doc/missing-references.json
@@ -1,389 +1,155 @@
{
"py:attr": {
- "axis": [
- "lib/matplotlib/category.py:docstring of matplotlib.category.StrCategoryLocator.tick_values:5",
- "lib/matplotlib/dates.py:docstring of matplotlib.dates.AutoDateLocator.tick_values:5",
- "lib/matplotlib/dates.py:docstring of matplotlib.dates.MicrosecondLocator.tick_values:5",
- "lib/matplotlib/dates.py:docstring of matplotlib.dates.RRuleLocator.tick_values:5",
- "lib/matplotlib/dates.py:docstring of matplotlib.dates.YearLocator.tick_values:5",
- "lib/matplotlib/ticker.py:docstring of matplotlib.ticker.AutoMinorLocator.tick_values:5",
- "lib/matplotlib/ticker.py:docstring of matplotlib.ticker.IndexLocator.tick_values:5",
- "lib/matplotlib/ticker.py:docstring of matplotlib.ticker.LinearLocator.tick_values:5",
- "lib/matplotlib/ticker.py:docstring of matplotlib.ticker.Locator.tick_values:5",
- "lib/matplotlib/ticker.py:docstring of matplotlib.ticker.LogLocator.tick_values:5",
- "lib/matplotlib/ticker.py:docstring of matplotlib.ticker.LogitLocator.tick_values:5",
- "lib/matplotlib/ticker.py:docstring of matplotlib.ticker.MaxNLocator.tick_values:5",
- "lib/matplotlib/ticker.py:docstring of matplotlib.ticker.MultipleLocator.tick_values:5",
- "lib/matplotlib/ticker.py:docstring of matplotlib.ticker.OldAutoLocator.tick_values:5",
- "lib/matplotlib/ticker.py:docstring of matplotlib.ticker.SymmetricalLogLocator.tick_values:5"
- ],
- "button": [
- "doc/users/prev_whats_new/whats_new_3.1.0.rst:335"
- ],
"cbar_axes": [
- "lib/mpl_toolkits/axes_grid1/axes_grid.py:docstring of mpl_toolkits.axes_grid1.axes_grid.ImageGrid.__init__:49",
- "lib/mpl_toolkits/axes_grid1/axes_grid.py:docstring of mpl_toolkits.axes_grid1.axes_grid.ImageGrid:49",
- "lib/mpl_toolkits/axisartist/axes_grid.py:docstring of mpl_toolkits.axisartist.axes_grid.ImageGrid:49"
+ "lib/mpl_toolkits/axes_grid1/axes_grid.py:docstring of mpl_toolkits.axes_grid1.axes_grid.ImageGrid:41",
+ "lib/mpl_toolkits/axisartist/axes_grid.py:docstring of mpl_toolkits.axisartist.axes_grid.ImageGrid:41"
],
"eventson": [
- "lib/matplotlib/widgets.py:docstring of matplotlib.widgets.CheckButtons.set_active:4",
- "lib/matplotlib/widgets.py:docstring of matplotlib.widgets.RadioButtons.set_active:4"
+ "lib/matplotlib/widgets.py:docstring of matplotlib.widgets:1"
],
"fmt_zdata": [
- "lib/mpl_toolkits/mplot3d/axes3d.py:docstring of mpl_toolkits.mplot3d.axes3d.Axes3D.format_zdata:2"
+ "lib/mpl_toolkits/mplot3d/axes3d.py:docstring of mpl_toolkits.mplot3d.axes3d.Axes3D.format_zdata:1"
],
"height": [
- "lib/matplotlib/transforms.py:docstring of matplotlib.transforms.Bbox.bounds:2"
+ "lib/matplotlib/transforms.py:docstring of matplotlib.transforms:1"
],
"input_dims": [
- "lib/matplotlib/transforms.py:docstring of matplotlib.transforms.AffineBase.transform:14",
- "lib/matplotlib/transforms.py:docstring of matplotlib.transforms.AffineBase.transform:8",
- "lib/matplotlib/transforms.py:docstring of matplotlib.transforms.AffineBase.transform_affine:15",
- "lib/matplotlib/transforms.py:docstring of matplotlib.transforms.AffineBase.transform_affine:21",
- "lib/matplotlib/transforms.py:docstring of matplotlib.transforms.AffineBase.transform_non_affine:14",
- "lib/matplotlib/transforms.py:docstring of matplotlib.transforms.AffineBase.transform_non_affine:20",
- "lib/matplotlib/transforms.py:docstring of matplotlib.transforms.CompositeGenericTransform.transform_affine:15",
- "lib/matplotlib/transforms.py:docstring of matplotlib.transforms.CompositeGenericTransform.transform_affine:21",
- "lib/matplotlib/transforms.py:docstring of matplotlib.transforms.CompositeGenericTransform.transform_non_affine:14",
- "lib/matplotlib/transforms.py:docstring of matplotlib.transforms.CompositeGenericTransform.transform_non_affine:20",
- "lib/matplotlib/transforms.py:docstring of matplotlib.transforms.IdentityTransform.transform:14",
- "lib/matplotlib/transforms.py:docstring of matplotlib.transforms.IdentityTransform.transform:8",
- "lib/matplotlib/transforms.py:docstring of matplotlib.transforms.IdentityTransform.transform_affine:15",
- "lib/matplotlib/transforms.py:docstring of matplotlib.transforms.IdentityTransform.transform_affine:21",
- "lib/matplotlib/transforms.py:docstring of matplotlib.transforms.IdentityTransform.transform_non_affine:14",
- "lib/matplotlib/transforms.py:docstring of matplotlib.transforms.IdentityTransform.transform_non_affine:20"
+ "lib/matplotlib/projections/geo.py:docstring of matplotlib.projections.geo.AitoffAxes:1",
+ "lib/matplotlib/transforms.py:docstring of matplotlib.transforms:10",
+ "lib/matplotlib/transforms.py:docstring of matplotlib.transforms:11",
+ "lib/matplotlib/transforms.py:docstring of matplotlib.transforms:4"
],
"lines": [
- "lib/matplotlib/colorbar.py:docstring of matplotlib.colorbar.ColorbarBase.add_lines:4"
- ],
- "matplotlib.axes.Axes.dataLim": [
- "doc/api/prev_api_changes/api_changes_0.99.x.rst:23"
- ],
- "matplotlib.axes.Axes.frame": [
- "doc/api/prev_api_changes/api_changes_0.98.x.rst:89"
- ],
- "matplotlib.axes.Axes.lines": [
- "doc/tutorials/intermediate/artists.rst:425",
- "doc/tutorials/intermediate/artists.rst:91"
+ "lib/matplotlib/colorbar.py:docstring of matplotlib.colorbar:1"
],
"matplotlib.axes.Axes.patch": [
- "doc/api/prev_api_changes/api_changes_0.98.x.rst:89",
- "doc/tutorials/intermediate/artists.rst:174",
- "doc/tutorials/intermediate/artists.rst:409"
+ "doc/tutorials/intermediate/artists.rst:184",
+ "doc/tutorials/intermediate/artists.rst:423"
],
"matplotlib.axes.Axes.patches": [
- "doc/tutorials/intermediate/artists.rst:448"
+ "doc/tutorials/intermediate/artists.rst:461"
],
"matplotlib.axes.Axes.transAxes": [
- "lib/mpl_toolkits/axes_grid1/anchored_artists.py:docstring of mpl_toolkits.axes_grid1.anchored_artists.AnchoredDirectionArrows.__init__:8",
- "lib/mpl_toolkits/axes_grid1/anchored_artists.py:docstring of mpl_toolkits.axes_grid1.anchored_artists.AnchoredDirectionArrows:8"
+ "lib/mpl_toolkits/axes_grid1/anchored_artists.py:docstring of mpl_toolkits.axes_grid1.anchored_artists.AnchoredDirectionArrows:4"
],
"matplotlib.axes.Axes.transData": [
- "lib/mpl_toolkits/axes_grid1/anchored_artists.py:docstring of mpl_toolkits.axes_grid1.anchored_artists.AnchoredAuxTransformBox.__init__:11",
- "lib/mpl_toolkits/axes_grid1/anchored_artists.py:docstring of mpl_toolkits.axes_grid1.anchored_artists.AnchoredAuxTransformBox:11",
- "lib/mpl_toolkits/axes_grid1/anchored_artists.py:docstring of mpl_toolkits.axes_grid1.anchored_artists.AnchoredEllipse.__init__:8",
- "lib/mpl_toolkits/axes_grid1/anchored_artists.py:docstring of mpl_toolkits.axes_grid1.anchored_artists.AnchoredEllipse:8",
- "lib/mpl_toolkits/axes_grid1/anchored_artists.py:docstring of mpl_toolkits.axes_grid1.anchored_artists.AnchoredSizeBar.__init__:8",
- "lib/mpl_toolkits/axes_grid1/anchored_artists.py:docstring of mpl_toolkits.axes_grid1.anchored_artists.AnchoredSizeBar:8"
- ],
- "matplotlib.axes.Axes.viewLim": [
- "doc/api/prev_api_changes/api_changes_0.99.x.rst:23"
+ "lib/mpl_toolkits/axes_grid1/anchored_artists.py:docstring of mpl_toolkits.axes_grid1.anchored_artists.AnchoredAuxTransformBox:7",
+ "lib/mpl_toolkits/axes_grid1/anchored_artists.py:docstring of mpl_toolkits.axes_grid1.anchored_artists.AnchoredEllipse:4",
+ "lib/mpl_toolkits/axes_grid1/anchored_artists.py:docstring of mpl_toolkits.axes_grid1.anchored_artists.AnchoredSizeBar:4"
],
"matplotlib.axes.Axes.xaxis": [
- "doc/tutorials/intermediate/artists.rst:593"
+ "doc/tutorials/intermediate/artists.rst:607"
],
"matplotlib.axes.Axes.yaxis": [
- "doc/tutorials/intermediate/artists.rst:593"
+ "doc/tutorials/intermediate/artists.rst:607"
],
"matplotlib.axis.Axis.label": [
- "doc/tutorials/intermediate/artists.rst:640"
- ],
- "matplotlib.cm.ScalarMappable.callbacksSM": [
- "doc/api/prev_api_changes/api_changes_0.98.0.rst:10"
- ],
- "matplotlib.colorbar.ColorbarBase.ax": [
- "doc/api/prev_api_changes/api_changes_1.3.x.rst:100"
+ "doc/tutorials/intermediate/artists.rst:654"
],
"matplotlib.colors.Colormap.name": [
- "lib/matplotlib/cm.py:docstring of matplotlib.cm.register_cmap:14"
+ "lib/matplotlib/cm.py:docstring of matplotlib.cm:10"
],
"matplotlib.figure.Figure.patch": [
- "doc/api/prev_api_changes/api_changes_0.98.x.rst:89",
- "doc/tutorials/intermediate/artists.rst:174",
- "doc/tutorials/intermediate/artists.rst:307"
+ "doc/tutorials/intermediate/artists.rst:184",
+ "doc/tutorials/intermediate/artists.rst:317"
],
"matplotlib.figure.Figure.transFigure": [
- "doc/tutorials/intermediate/artists.rst:356"
+ "doc/tutorials/intermediate/artists.rst:366"
],
"max": [
- "lib/matplotlib/transforms.py:docstring of matplotlib.transforms.Bbox.p1:4"
+ "lib/matplotlib/transforms.py:docstring of matplotlib.transforms:1"
],
"min": [
- "lib/matplotlib/transforms.py:docstring of matplotlib.transforms.Bbox.p0:4"
+ "lib/matplotlib/transforms.py:docstring of matplotlib.transforms:1"
],
"mpl_toolkits.mplot3d.axis3d._axinfo": [
- "doc/api/toolkits/mplot3d.rst:40"
+ "doc/api/toolkits/mplot3d.rst:66"
],
"name": [
- "lib/matplotlib/scale.py:docstring of matplotlib.scale.ScaleBase:8"
+ "lib/matplotlib/scale.py:docstring of matplotlib.scale:7"
],
"output_dims": [
- "lib/matplotlib/transforms.py:docstring of matplotlib.transforms.AffineBase.transform:14",
- "lib/matplotlib/transforms.py:docstring of matplotlib.transforms.AffineBase.transform_affine:21",
- "lib/matplotlib/transforms.py:docstring of matplotlib.transforms.AffineBase.transform_non_affine:20",
- "lib/matplotlib/transforms.py:docstring of matplotlib.transforms.CompositeGenericTransform.transform_affine:21",
- "lib/matplotlib/transforms.py:docstring of matplotlib.transforms.CompositeGenericTransform.transform_non_affine:20",
- "lib/matplotlib/transforms.py:docstring of matplotlib.transforms.IdentityTransform.transform:14",
- "lib/matplotlib/transforms.py:docstring of matplotlib.transforms.IdentityTransform.transform_affine:21",
- "lib/matplotlib/transforms.py:docstring of matplotlib.transforms.IdentityTransform.transform_non_affine:20"
+ "lib/matplotlib/projections/geo.py:docstring of matplotlib.projections.geo.AitoffAxes:6",
+ "lib/matplotlib/transforms.py:docstring of matplotlib.transforms:10",
+ "lib/matplotlib/transforms.py:docstring of matplotlib.transforms:16",
+ "lib/matplotlib/transforms.py:docstring of matplotlib.transforms:17"
],
"triangulation": [
- "lib/matplotlib/tri/trirefine.py:docstring of matplotlib.tri.trirefine.UniformTriRefiner.refine_triangulation:2"
+ "lib/matplotlib/tri/_trirefine.py:docstring of matplotlib.tri._trirefine.UniformTriRefiner:1"
],
"use_sticky_edges": [
- "lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.margins:53"
+ "lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.margins:48"
],
"width": [
- "lib/matplotlib/transforms.py:docstring of matplotlib.transforms.Bbox.bounds:2"
+ "lib/matplotlib/transforms.py:docstring of matplotlib.transforms:1"
],
"xmax": [
- "lib/matplotlib/transforms.py:docstring of matplotlib.transforms.Bbox.x1:4"
+ "lib/matplotlib/transforms.py:docstring of matplotlib.transforms:1"
],
"xmin": [
- "lib/matplotlib/transforms.py:docstring of matplotlib.transforms.Bbox.x0:4"
+ "lib/matplotlib/transforms.py:docstring of matplotlib.transforms:1"
],
"ymax": [
- "lib/matplotlib/transforms.py:docstring of matplotlib.transforms.Bbox.y1:4"
+ "lib/matplotlib/transforms.py:docstring of matplotlib.transforms:1"
],
"ymin": [
- "lib/matplotlib/transforms.py:docstring of matplotlib.transforms.Bbox.y0:4"
+ "lib/matplotlib/transforms.py:docstring of matplotlib.transforms:1"
]
},
"py:class": {
- "Cursors": [
- "lib/matplotlib/backend_bases.py:docstring of matplotlib.backend_bases.NavigationToolbar2.set_cursor:2"
- ],
- "FigureCanvasQTAgg": [
- "doc/api/prev_api_changes/api_changes_2.2.0.rst:215"
- ],
- "Patch3DCollection": [
- "doc/api/toolkits/mplot3d.rst:83::1"
- ],
- "Path3DCollection": [
- "doc/api/toolkits/mplot3d.rst:83::1"
- ],
- "backend_qt5.FigureCanvasQT": [
- "doc/api/prev_api_changes/api_changes_2.2.0.rst:199"
- ],
- "backend_qt5.FigureCanvasQTAgg": [
- "doc/api/prev_api_changes/api_changes_2.2.0.rst:210"
- ],
- "dateutil.rrule.rrulebase": [
- "/rrule.py:docstring of dateutil.rrule.rrule:1"
- ],
- "matplotlib._mathtext.Box": [
- "doc/api/mathtext_api.rst:12"
- ],
- "matplotlib._mathtext.Char": [
- "doc/api/mathtext_api.rst:12"
- ],
- "matplotlib._mathtext.ComputerModernFontConstants": [
- "doc/api/mathtext_api.rst:12"
- ],
- "matplotlib._mathtext.DejaVuSansFontConstants": [
- "doc/api/mathtext_api.rst:12"
- ],
- "matplotlib._mathtext.DejaVuSerifFontConstants": [
- "doc/api/mathtext_api.rst:12"
- ],
- "matplotlib._mathtext.FontConstantsBase": [
- "doc/api/mathtext_api.rst:12"
- ],
- "matplotlib._mathtext.Fonts": [
- "doc/api/mathtext_api.rst:12"
- ],
- "matplotlib._mathtext.Glue": [
- "doc/api/mathtext_api.rst:12"
- ],
- "matplotlib._mathtext.Kern": [
- "doc/api/mathtext_api.rst:12"
- ],
- "matplotlib._mathtext.Node": [
- "doc/api/mathtext_api.rst:12"
- ],
- "matplotlib._mathtext.Parser": [
- "doc/api/mathtext_api.rst:12"
- ],
- "matplotlib._mathtext.STIXFontConstants": [
- "doc/api/mathtext_api.rst:12"
- ],
- "matplotlib._mathtext.STIXSansFontConstants": [
- "doc/api/mathtext_api.rst:12"
- ],
- "matplotlib._mathtext.Ship": [
- "doc/api/mathtext_api.rst:12"
- ],
- "matplotlib._mathtext.StandardPsFonts": [
- "doc/api/mathtext_api.rst:12"
- ],
- "matplotlib._mathtext.TruetypeFonts": [
- "doc/api/mathtext_api.rst:12"
- ],
- "matplotlib.axes.Subplot": [
- "doc/tutorials/intermediate/artists.rst:35",
- "doc/tutorials/intermediate/artists.rst:58"
- ],
- "matplotlib.axes._axes.Axes": [
- "doc/api/artist_api.rst:189",
- "doc/api/axes_api.rst:609",
- "lib/matplotlib/projections/polar.py:docstring of matplotlib.projections.polar.PolarAxes:1",
- "lib/mpl_toolkits/axes_grid1/mpl_axes.py:docstring of mpl_toolkits.axes_grid1.mpl_axes.Axes:1",
- "lib/mpl_toolkits/axisartist/axislines.py:docstring of mpl_toolkits.axisartist.axislines.Axes:1",
- "lib/mpl_toolkits/mplot3d/axes3d.py:docstring of mpl_toolkits.mplot3d.axes3d.Axes3D:1"
- ],
"matplotlib.axes._base._AxesBase": [
- "doc/api/artist_api.rst:189",
- "doc/api/axes_api.rst:609",
+ "doc/api/artist_api.rst:202",
+ "doc/api/axes_api.rst:603",
"lib/matplotlib/axes/_axes.py:docstring of matplotlib.axes._axes.Axes:1"
],
"matplotlib.backend_bases.FigureCanvas": [
- "doc/tutorials/intermediate/artists.rst:20",
- "doc/tutorials/intermediate/artists.rst:22",
- "doc/tutorials/intermediate/artists.rst:27"
+ "doc/tutorials/intermediate/artists.rst:32",
+ "doc/tutorials/intermediate/artists.rst:34",
+ "doc/tutorials/intermediate/artists.rst:39"
],
"matplotlib.backend_bases.Renderer": [
- "doc/tutorials/intermediate/artists.rst:22",
- "doc/tutorials/intermediate/artists.rst:27"
+ "doc/tutorials/intermediate/artists.rst:34",
+ "doc/tutorials/intermediate/artists.rst:39"
],
"matplotlib.backend_bases._Backend": [
- "lib/matplotlib/backend_bases.py:docstring of matplotlib.backend_bases.ShowBase:1"
- ],
- "matplotlib.backend_tools._ToolEnableAllNavigation": [
- "lib/matplotlib/backend_tools.py:docstring of matplotlib.backend_tools.ToolEnableAllNavigation:1"
- ],
- "matplotlib.backend_tools._ToolEnableNavigation": [
- "lib/matplotlib/backend_tools.py:docstring of matplotlib.backend_tools.ToolEnableNavigation:1"
+ "lib/matplotlib/backend_bases.py:docstring of matplotlib.backend_bases:1"
],
"matplotlib.backends._backend_pdf_ps.RendererPDFPSBase": [
- "lib/matplotlib/backends/backend_pdf.py:docstring of matplotlib.backends.backend_pdf.RendererPdf:1",
- "lib/matplotlib/backends/backend_ps.py:docstring of matplotlib.backends.backend_ps.RendererPS:1"
+ "lib/matplotlib/backends/backend_pdf.py:docstring of matplotlib.backends.backend_pdf:1",
+ "lib/matplotlib/backends/backend_ps.py:docstring of matplotlib.backends.backend_ps:1"
],
"matplotlib.backends._backend_tk.FigureCanvasTk": [
- "lib/matplotlib/backends/backend_tkagg.py:docstring of matplotlib.backends.backend_tkagg.FigureCanvasTkAgg:1",
- "lib/matplotlib/backends/backend_tkcairo.py:docstring of matplotlib.backends.backend_tkcairo.FigureCanvasTkCairo:1"
+ "lib/matplotlib/backends/backend_tkagg.py:docstring of matplotlib.backends.backend_tkagg:1",
+ "lib/matplotlib/backends/backend_tkcairo.py:docstring of matplotlib.backends.backend_tkcairo:1"
],
"matplotlib.backends.backend_webagg_core.FigureCanvasWebAggCore": [
- "lib/matplotlib/backends/backend_nbagg.py:docstring of matplotlib.backends.backend_nbagg.FigureCanvasNbAgg:1"
+ "lib/matplotlib/backends/backend_nbagg.py:docstring of matplotlib.backends.backend_nbagg:1",
+ "lib/matplotlib/backends/backend_webagg.py:docstring of matplotlib.backends.backend_webagg:1"
],
"matplotlib.backends.backend_webagg_core.FigureManagerWebAgg": [
- "lib/matplotlib/backends/backend_nbagg.py:docstring of matplotlib.backends.backend_nbagg.FigureManagerNbAgg:1"
+ "lib/matplotlib/backends/backend_nbagg.py:docstring of matplotlib.backends.backend_nbagg:1",
+ "lib/matplotlib/backends/backend_webagg.py:docstring of matplotlib.backends.backend_webagg:1"
],
"matplotlib.backends.backend_webagg_core.NavigationToolbar2WebAgg": [
- "lib/matplotlib/backends/backend_nbagg.py:docstring of matplotlib.backends.backend_nbagg.NavigationIPy:1"
- ],
- "matplotlib.cm.Wistia": [
- "doc/users/prev_whats_new/whats_new_1.4.rst:21"
+ "lib/matplotlib/backends/backend_nbagg.py:docstring of matplotlib.backends.backend_nbagg:1"
],
"matplotlib.collections._CollectionWithSizes": [
- "doc/api/artist_api.rst:189",
+ "doc/api/artist_api.rst:202",
"doc/api/collections_api.rst:13",
- "lib/matplotlib/collections.py:docstring of matplotlib.collections.CircleCollection:1",
- "lib/matplotlib/collections.py:docstring of matplotlib.collections.PathCollection:1",
- "lib/matplotlib/collections.py:docstring of matplotlib.collections.PolyCollection:1",
- "lib/matplotlib/collections.py:docstring of matplotlib.collections.RegularPolyCollection:1"
- ],
- "matplotlib.dates.rrulewrapper": [
- "doc/api/dates_api.rst:11"
+ "lib/matplotlib/collections.py:docstring of matplotlib.collections:1"
],
"matplotlib.image._ImageBase": [
- "doc/api/artist_api.rst:189",
- "lib/matplotlib/image.py:docstring of matplotlib.image.AxesImage:1",
- "lib/matplotlib/image.py:docstring of matplotlib.image.BboxImage:1",
- "lib/matplotlib/image.py:docstring of matplotlib.image.FigureImage:1"
- ],
- "matplotlib.mathtext.Box": [
- "doc/api/mathtext_api.rst:12"
- ],
- "matplotlib.mathtext.Char": [
- "doc/api/mathtext_api.rst:12"
- ],
- "matplotlib.mathtext.ComputerModernFontConstants": [
- "doc/api/mathtext_api.rst:12"
- ],
- "matplotlib.mathtext.DejaVuSansFontConstants": [
- "doc/api/mathtext_api.rst:12"
- ],
- "matplotlib.mathtext.DejaVuSerifFontConstants": [
- "doc/api/mathtext_api.rst:12"
- ],
- "matplotlib.mathtext.FontConstantsBase": [
- "doc/api/mathtext_api.rst:12"
- ],
- "matplotlib.mathtext.Fonts": [
- "doc/api/mathtext_api.rst:12"
- ],
- "matplotlib.mathtext.Glue": [
- "doc/api/mathtext_api.rst:12"
- ],
- "matplotlib.mathtext.Kern": [
- "doc/api/mathtext_api.rst:12"
- ],
- "matplotlib.mathtext.Node": [
- "doc/api/mathtext_api.rst:12"
- ],
- "matplotlib.mathtext.Parser": [
- "doc/api/mathtext_api.rst:12"
- ],
- "matplotlib.mathtext.STIXFontConstants": [
- "doc/api/mathtext_api.rst:12"
- ],
- "matplotlib.mathtext.STIXSansFontConstants": [
- "doc/api/mathtext_api.rst:12"
- ],
- "matplotlib.mathtext.Ship": [
- "doc/api/mathtext_api.rst:12"
- ],
- "matplotlib.mathtext.StandardPsFonts": [
- "doc/api/mathtext_api.rst:12"
- ],
- "matplotlib.mathtext.TruetypeFonts": [
- "doc/api/mathtext_api.rst:12"
+ "doc/api/artist_api.rst:202",
+ "lib/matplotlib/image.py:docstring of matplotlib.image:1"
],
"matplotlib.patches.ArrowStyle._Base": [
- "lib/matplotlib/patches.py:docstring of matplotlib.patches.ArrowStyle.Fancy:1",
- "lib/matplotlib/patches.py:docstring of matplotlib.patches.ArrowStyle.Simple:1",
- "lib/matplotlib/patches.py:docstring of matplotlib.patches.ArrowStyle.Wedge:1"
- ],
- "matplotlib.patches.ArrowStyle._Bracket": [
- "lib/matplotlib/patches.py:docstring of matplotlib.patches.ArrowStyle.BarAB:1",
- "lib/matplotlib/patches.py:docstring of matplotlib.patches.ArrowStyle.BracketA:1",
- "lib/matplotlib/patches.py:docstring of matplotlib.patches.ArrowStyle.BracketAB:1",
- "lib/matplotlib/patches.py:docstring of matplotlib.patches.ArrowStyle.BracketB:1"
+ "lib/matplotlib/patches.py:docstring of matplotlib.patches.ArrowStyle:1"
],
"matplotlib.patches.ArrowStyle._Curve": [
- "lib/matplotlib/patches.py:docstring of matplotlib.patches.ArrowStyle.Curve:1",
- "lib/matplotlib/patches.py:docstring of matplotlib.patches.ArrowStyle.CurveA:1",
- "lib/matplotlib/patches.py:docstring of matplotlib.patches.ArrowStyle.CurveAB:1",
- "lib/matplotlib/patches.py:docstring of matplotlib.patches.ArrowStyle.CurveB:1",
- "lib/matplotlib/patches.py:docstring of matplotlib.patches.ArrowStyle.CurveFilledA:1",
- "lib/matplotlib/patches.py:docstring of matplotlib.patches.ArrowStyle.CurveFilledAB:1",
- "lib/matplotlib/patches.py:docstring of matplotlib.patches.ArrowStyle.CurveFilledB:1"
- ],
- "matplotlib.patches.BoxStyle._Base": [
- "lib/matplotlib/patches.py:docstring of matplotlib.patches.BoxStyle.Circle:1",
- "lib/matplotlib/patches.py:docstring of matplotlib.patches.BoxStyle.DArrow:1",
- "lib/matplotlib/patches.py:docstring of matplotlib.patches.BoxStyle.LArrow:1",
- "lib/matplotlib/patches.py:docstring of matplotlib.patches.BoxStyle.Round4:1",
- "lib/matplotlib/patches.py:docstring of matplotlib.patches.BoxStyle.Round:1",
- "lib/matplotlib/patches.py:docstring of matplotlib.patches.BoxStyle.Sawtooth:1",
- "lib/matplotlib/patches.py:docstring of matplotlib.patches.BoxStyle.Square:1"
+ "lib/matplotlib/patches.py:docstring of matplotlib.patches.ArrowStyle:1"
],
"matplotlib.patches.ConnectionStyle._Base": [
- "lib/matplotlib/patches.py:docstring of matplotlib.patches.ConnectionStyle.Angle3:1",
- "lib/matplotlib/patches.py:docstring of matplotlib.patches.ConnectionStyle.Angle:1",
- "lib/matplotlib/patches.py:docstring of matplotlib.patches.ConnectionStyle.Arc3:1",
- "lib/matplotlib/patches.py:docstring of matplotlib.patches.ConnectionStyle.Arc:1",
- "lib/matplotlib/patches.py:docstring of matplotlib.patches.ConnectionStyle.Bar:1"
+ "lib/matplotlib/patches.py:docstring of matplotlib.patches.ConnectionStyle:1"
],
"matplotlib.patches._Style": [
"lib/matplotlib/patches.py:docstring of matplotlib.patches.ArrowStyle:1",
@@ -391,45 +157,19 @@
"lib/matplotlib/patches.py:docstring of matplotlib.patches.ConnectionStyle:1",
"lib/mpl_toolkits/axisartist/axisline_style.py:docstring of mpl_toolkits.axisartist.axisline_style.AxislineStyle:1"
],
- "matplotlib.projections.geo.AitoffAxes": [
- "doc/api/artist_api.rst:189"
- ],
- "matplotlib.projections.geo.GeoAxes": [
- "doc/api/artist_api.rst:189"
- ],
- "matplotlib.projections.geo.HammerAxes": [
- "doc/api/artist_api.rst:189"
- ],
- "matplotlib.projections.geo.LambertAxes": [
- "doc/api/artist_api.rst:189"
- ],
- "matplotlib.projections.geo.MollweideAxes": [
- "doc/api/artist_api.rst:189"
+ "matplotlib.projections.geo._GeoTransform": [
+ "lib/matplotlib/projections/geo.py:docstring of matplotlib.projections.geo:1"
],
"matplotlib.text._AnnotationBase": [
- "doc/api/artist_api.rst:189",
- "lib/matplotlib/offsetbox.py:docstring of matplotlib.offsetbox.AnnotationBbox:1",
+ "doc/api/artist_api.rst:202",
+ "lib/matplotlib/offsetbox.py:docstring of matplotlib.offsetbox:1",
"lib/matplotlib/text.py:docstring of matplotlib.text.Annotation:1"
],
"matplotlib.transforms._BlendedMixin": [
- "lib/matplotlib/transforms.py:docstring of matplotlib.transforms.BlendedAffine2D:1",
- "lib/matplotlib/transforms.py:docstring of matplotlib.transforms.BlendedGenericTransform:1"
- ],
- "matplotlib.tri.trifinder.TriFinder": [
- "lib/matplotlib/tri/trifinder.py:docstring of matplotlib.tri.trifinder.TrapezoidMapTriFinder:1"
- ],
- "matplotlib.tri.triinterpolate.TriInterpolator": [
- "lib/matplotlib/tri/triinterpolate.py:docstring of matplotlib.tri.triinterpolate.CubicTriInterpolator:1",
- "lib/matplotlib/tri/triinterpolate.py:docstring of matplotlib.tri.triinterpolate.LinearTriInterpolator:1"
- ],
- "matplotlib.tri.trirefine.TriRefiner": [
- "lib/matplotlib/tri/trirefine.py:docstring of matplotlib.tri.trirefine.UniformTriRefiner:1"
+ "lib/matplotlib/transforms.py:docstring of matplotlib.transforms:1"
],
"matplotlib.widgets._SelectorWidget": [
- "lib/matplotlib/widgets.py:docstring of matplotlib.widgets.LassoSelector:1",
- "lib/matplotlib/widgets.py:docstring of matplotlib.widgets.PolygonSelector:1",
- "lib/matplotlib/widgets.py:docstring of matplotlib.widgets.RectangleSelector:1",
- "lib/matplotlib/widgets.py:docstring of matplotlib.widgets.SpanSelector:1"
+ "lib/matplotlib/widgets.py:docstring of matplotlib.widgets:1"
],
"mpl_toolkits.axes_grid1.axes_size._Base": [
"lib/mpl_toolkits/axes_grid1/axes_size.py:docstring of mpl_toolkits.axes_grid1.axes_size.Add:1",
@@ -444,560 +184,260 @@
"lib/mpl_toolkits/axes_grid1/axes_size.py:docstring of mpl_toolkits.axes_grid1.axes_size.SizeFromFunc:1"
],
"mpl_toolkits.axes_grid1.parasite_axes.AxesHostAxes": [
- ":1",
- "doc/api/_as_gen/mpl_toolkits.axes_grid1.parasite_axes.rst:31::1"
+ "doc/api/_as_gen/mpl_toolkits.axes_grid1.parasite_axes.rst:30::1",
+ "lib/mpl_toolkits/axes_grid1/parasite_axes.py:docstring of mpl_toolkits.axes_grid1.parasite_axes.AxesHostAxes:1"
],
"mpl_toolkits.axes_grid1.parasite_axes.AxesParasite": [
- ":1",
- "doc/api/_as_gen/mpl_toolkits.axes_grid1.parasite_axes.rst:31::1"
- ],
- "mpl_toolkits.axes_grid1.parasite_axes.AxesParasiteParasiteAuxTrans": [
- ":1",
- "doc/api/_as_gen/mpl_toolkits.axes_grid1.parasite_axes.rst:31::1"
+ "doc/api/_as_gen/mpl_toolkits.axes_grid1.parasite_axes.rst:30::1",
+ "lib/mpl_toolkits/axes_grid1/parasite_axes.py:docstring of mpl_toolkits.axes_grid1.parasite_axes.AxesParasite:1"
],
"mpl_toolkits.axisartist.Axes": [
- "doc/api/toolkits/axisartist.rst:5",
"doc/api/toolkits/axisartist.rst:6"
],
"mpl_toolkits.axisartist.axisline_style.AxislineStyle._Base": [
- "lib/mpl_toolkits/axisartist/axisline_style.py:docstring of mpl_toolkits.axisartist.axisline_style.AxislineStyle.SimpleArrow:1"
+ "lib/mpl_toolkits/axisartist/axisline_style.py:docstring of mpl_toolkits.axisartist.axisline_style.AxislineStyle:1"
],
"mpl_toolkits.axisartist.axisline_style._FancyAxislineStyle.FilledArrow": [
- ":1"
+ "lib/mpl_toolkits/axisartist/axisline_style.py:docstring of mpl_toolkits.axisartist.axisline_style.AxislineStyle:1"
],
"mpl_toolkits.axisartist.axisline_style._FancyAxislineStyle.SimpleArrow": [
- ":1"
+ "lib/mpl_toolkits/axisartist/axisline_style.py:docstring of mpl_toolkits.axisartist.axisline_style.AxislineStyle:1"
],
"mpl_toolkits.axisartist.axislines.AxisArtistHelper._Base": [
- "lib/mpl_toolkits/axisartist/axislines.py:docstring of mpl_toolkits.axisartist.axislines.AxisArtistHelper.Fixed:1",
- "lib/mpl_toolkits/axisartist/axislines.py:docstring of mpl_toolkits.axisartist.axislines.AxisArtistHelper.Floating:1"
+ "lib/mpl_toolkits/axisartist/axislines.py:docstring of mpl_toolkits.axisartist.axislines.AxisArtistHelper:1"
],
- "mpl_toolkits.axisartist.floating_axes.Floating AxesHostAxes": [
- ":1",
- "doc/api/_as_gen/mpl_toolkits.axisartist.floating_axes.rst:31::1"
+ "mpl_toolkits.axisartist.floating_axes.FloatingAxesHostAxes": [
+ "doc/api/_as_gen/mpl_toolkits.axisartist.floating_axes.rst:32::1",
+ "lib/mpl_toolkits/axisartist/floating_axes.py:docstring of mpl_toolkits.axisartist.floating_axes.FloatingAxesHostAxes:1"
],
"numpy.uint8": [
- ":1"
+ "lib/matplotlib/path.py:docstring of matplotlib.path:1"
],
"unittest.case.TestCase": [
- "lib/matplotlib/testing/decorators.py:docstring of matplotlib.testing.decorators.CleanupTestCase:1"
+ "lib/matplotlib/testing/decorators.py:docstring of matplotlib.testing.decorators:1"
]
},
"py:data": {
"matplotlib.axes.Axes.transAxes": [
- "lib/matplotlib/axes/_axes.py:docstring of matplotlib.axes._axes.Axes.legend:219",
- "lib/matplotlib/figure.py:docstring of matplotlib.figure.FigureBase.legend:220",
- "lib/matplotlib/legend.py:docstring of matplotlib.legend.Legend:179",
- "lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.figlegend:220",
- "lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.legend:219"
- ]
- },
- "py:func": {
- "matplotlib.Axis.set_ticks_position": [
- "doc/users/prev_whats_new/whats_new_1.4.rst:141"
- ],
- "matplotlib.InvertedPolarTransform.transform_non_affine": [
- "doc/users/prev_whats_new/whats_new_1.4.rst:236"
- ],
- "matplotlib.axis.Tick.label1On": [
- "doc/users/prev_whats_new/whats_new_2.1.0.rst:409"
+ "lib/matplotlib/axes/_axes.py:docstring of matplotlib.axes._axes.Axes.legend:234",
+ "lib/matplotlib/figure.py:docstring of matplotlib.figure.FigureBase.add_axes:2",
+ "lib/matplotlib/legend.py:docstring of matplotlib.legend.Legend:91",
+ "lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.figlegend:233",
+ "lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.legend:234"
]
},
"py:meth": {
"AbstractPathEffect._update_gc": [
- "lib/matplotlib/patheffects.py:docstring of matplotlib.patheffects.SimpleLineShadow:44",
- "lib/matplotlib/patheffects.py:docstring of matplotlib.patheffects.SimplePatchShadow:43",
- "lib/matplotlib/patheffects.py:docstring of matplotlib.patheffects.TickedStroke:60",
- "lib/matplotlib/patheffects.py:docstring of matplotlib.patheffects.withSimplePatchShadow:52",
- "lib/matplotlib/patheffects.py:docstring of matplotlib.patheffects.withTickedStroke:55"
- ],
- "FigureCanvasQTAgg.blit": [
- "doc/api/prev_api_changes/api_changes_2.2.0.rst:199"
- ],
- "FigureCanvasQTAgg.paintEvent": [
- "doc/api/prev_api_changes/api_changes_2.2.0.rst:199"
- ],
- "FigureCanvasQTAgg.print_figure": [
- "doc/api/prev_api_changes/api_changes_2.2.0.rst:199"
+ "lib/matplotlib/patheffects.py:docstring of matplotlib.patheffects.AbstractPathEffect:26",
+ "lib/matplotlib/patheffects.py:docstring of matplotlib.patheffects.AbstractPathEffect:28",
+ "lib/matplotlib/patheffects.py:docstring of matplotlib.patheffects.AbstractPathEffect:35",
+ "lib/matplotlib/patheffects.py:docstring of matplotlib.patheffects.AbstractPathEffect:39",
+ "lib/matplotlib/patheffects.py:docstring of matplotlib.patheffects.AbstractPathEffect:44"
],
"IPython.terminal.interactiveshell.TerminalInteractiveShell.inputhook": [
- "doc/users/interactive_guide.rst:421"
+ "doc/users/explain/interactive_guide.rst:420"
],
"_find_tails": [
- "lib/matplotlib/quiver.py:docstring of matplotlib.quiver.Barbs:9"
- ],
- "_iter_collection": [
- "lib/matplotlib/backend_bases.py:docstring of matplotlib.backend_bases.RendererBase.draw_path_collection:12",
- "lib/matplotlib/backends/backend_agg.py:docstring of matplotlib.backends.backend_agg.RendererAgg.draw_path_collection:12",
- "lib/matplotlib/backends/backend_pdf.py:docstring of matplotlib.backends.backend_pdf.RendererPdf.draw_path_collection:12",
- "lib/matplotlib/backends/backend_ps.py:docstring of matplotlib.backends.backend_ps.RendererPS.draw_path_collection:12",
- "lib/matplotlib/backends/backend_svg.py:docstring of matplotlib.backends.backend_svg.RendererSVG.draw_path_collection:12",
- "lib/matplotlib/patheffects.py:docstring of matplotlib.patheffects.PathEffectRenderer.draw_path_collection:12"
- ],
- "_iter_collection_raw_paths": [
- "lib/matplotlib/backend_bases.py:docstring of matplotlib.backend_bases.RendererBase.draw_path_collection:12",
- "lib/matplotlib/backends/backend_agg.py:docstring of matplotlib.backends.backend_agg.RendererAgg.draw_path_collection:12",
- "lib/matplotlib/backends/backend_pdf.py:docstring of matplotlib.backends.backend_pdf.RendererPdf.draw_path_collection:12",
- "lib/matplotlib/backends/backend_ps.py:docstring of matplotlib.backends.backend_ps.RendererPS.draw_path_collection:12",
- "lib/matplotlib/backends/backend_svg.py:docstring of matplotlib.backends.backend_svg.RendererSVG.draw_path_collection:12",
- "lib/matplotlib/patheffects.py:docstring of matplotlib.patheffects.PathEffectRenderer.draw_path_collection:12"
+ "lib/matplotlib/quiver.py:docstring of matplotlib.quiver.Barbs:5"
],
"_make_barbs": [
- "lib/matplotlib/quiver.py:docstring of matplotlib.quiver.Barbs:9"
- ],
- "autoscale_view": [
- "lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.margins:32"
- ],
- "colorbar.Colobar.minorticks_off": [
- "doc/users/prev_whats_new/whats_new_3.0.rst:63"
- ],
- "colorbar.Colobar.minorticks_on": [
- "doc/users/prev_whats_new/whats_new_3.0.rst:63"
- ],
- "draw_image": [
- "lib/matplotlib/backends/backend_agg.py:docstring of matplotlib.backends.backend_agg.RendererAgg.option_scale_image:2"
+ "lib/matplotlib/quiver.py:docstring of matplotlib.quiver.Barbs:5"
],
"get_matrix": [
- "lib/matplotlib/transforms.py:docstring of matplotlib.transforms.Affine2DBase:13"
- ],
- "matplotlib.dates.DateFormatter.__call__": [
- "doc/users/prev_whats_new/whats_new_1.5.rst:497"
- ],
- "matplotlib.dates.MicrosecondLocator.__call__": [
- "doc/api/prev_api_changes/api_changes_1.5.0.rst:122"
- ],
- "option_scale_image": [
- "lib/matplotlib/backends/backend_cairo.py:docstring of matplotlib.backends.backend_cairo.RendererCairo.draw_image:22",
- "lib/matplotlib/backends/backend_pdf.py:docstring of matplotlib.backends.backend_pdf.RendererPdf.draw_image:22",
- "lib/matplotlib/backends/backend_ps.py:docstring of matplotlib.backends.backend_ps.RendererPS.draw_image:22",
- "lib/matplotlib/backends/backend_template.py:docstring of matplotlib.backends.backend_template.RendererTemplate.draw_image:22"
- ]
- },
- "py:mod": {
- "IPython.terminal.pt_inputhooks": [
- "doc/users/interactive_guide.rst:421"
- ],
- "dateutil": [
- "lib/matplotlib/dates.py:docstring of matplotlib.dates:1"
- ],
- "matplotlib": [
- "doc/api/prev_api_changes/api_changes_0.91.2.rst:15"
- ],
- "matplotlib.ft2font": [
- "doc/api/prev_api_changes/api_changes_0.91.0.rst:34"
+ "lib/matplotlib/transforms.py:docstring of matplotlib.transforms:12"
+ ],
+ "matplotlib.collections._CollectionWithSizes.set_sizes": [
+ "lib/matplotlib/axes/_axes.py:docstring of matplotlib.axes._axes.Axes.barbs:171",
+ "lib/matplotlib/axes/_axes.py:docstring of matplotlib.axes._axes.Axes.broken_barh:81",
+ "lib/matplotlib/axes/_axes.py:docstring of matplotlib.axes._axes.Axes.fill_between:113",
+ "lib/matplotlib/axes/_axes.py:docstring of matplotlib.axes._axes.Axes.fill_betweenx:113",
+ "lib/matplotlib/axes/_axes.py:docstring of matplotlib.axes._axes.Axes.hexbin:201",
+ "lib/matplotlib/axes/_axes.py:docstring of matplotlib.axes._axes.Axes.pcolor:173",
+ "lib/matplotlib/axes/_axes.py:docstring of matplotlib.axes._axes.Axes.quiver:207",
+ "lib/matplotlib/collections.py:docstring of matplotlib.collections.AsteriskPolygonCollection:22",
+ "lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.barbs:171",
+ "lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.broken_barh:81",
+ "lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.fill_between:113",
+ "lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.fill_betweenx:113",
+ "lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.hexbin:201",
+ "lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.pcolor:173",
+ "lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.quiver:207",
+ "lib/matplotlib/quiver.py:docstring of matplotlib.quiver.Barbs:205",
+ "lib/matplotlib/quiver.py:docstring of matplotlib.quiver.Barbs:38",
+ "lib/matplotlib/quiver.py:docstring of matplotlib.quiver.Quiver:244",
+ "lib/matplotlib/quiver.py:docstring of matplotlib.quiver.Quiver:38",
+ "lib/mpl_toolkits/mplot3d/art3d.py:docstring of mpl_toolkits.mplot3d.art3d.Path3DCollection:39",
+ "lib/mpl_toolkits/mplot3d/art3d.py:docstring of mpl_toolkits.mplot3d.art3d.Poly3DCollection:37"
]
},
"py:obj": {
"Artist.stale_callback": [
- "doc/users/interactive_guide.rst:323"
+ "doc/users/explain/interactive_guide.rst:323"
],
"Artist.sticky_edges": [
- "doc/api/axes_api.rst:364::1",
- "lib/matplotlib/axes/_axes.py:docstring of matplotlib.axes.Axes.use_sticky_edges:2"
- ],
- "ArtistInspector.aliasd": [
- "doc/api/prev_api_changes/api_changes_3.0.0.rst:332",
- "doc/users/prev_whats_new/whats_new_3.1.0.rst:171"
- ],
- "ArtistInspector.get_aliases": [
- "doc/api/prev_api_changes/api_changes_3.0.0.rst:327"
+ "doc/api/axes_api.rst:352::1",
+ "lib/matplotlib/axes/_axes.py:docstring of matplotlib.axes.Axes.use_sticky_edges:1"
],
"Axes.dataLim": [
- "doc/api/axes_api.rst:304::1",
- "lib/matplotlib/axes/_base.py:docstring of matplotlib.axes._base._AxesBase.update_datalim:2",
- "lib/mpl_toolkits/mplot3d/axes3d.py:docstring of mpl_toolkits.mplot3d.axes3d.Axes3D.update_datalim:2"
- ],
- "Axes.datalim": [
- "doc/api/axes_api.rst:304::1",
- "lib/matplotlib/axes/_base.py:docstring of matplotlib.axes._base._AxesBase.update_datalim_bounds:2"
- ],
- "Axes.fmt_xdata": [
- "doc/api/prev_api_changes/api_changes_3.1.0.rst:397",
- "doc/api/prev_api_changes/api_changes_3.1.0.rst:400"
- ],
- "Axes.fmt_ydata": [
- "doc/api/prev_api_changes/api_changes_3.1.0.rst:397",
- "doc/api/prev_api_changes/api_changes_3.1.0.rst:400"
- ],
- "Axes.transData": [
- "doc/api/prev_api_changes/api_changes_3.2.0/behavior.rst:91",
- "doc/api/prev_api_changes/api_changes_3.2.0/behavior.rst:93",
- "doc/api/prev_api_changes/api_changes_3.2.0/behavior.rst:95",
- "doc/api/prev_api_changes/api_changes_3.2.0/behavior.rst:98"
+ "doc/api/axes_api.rst:291::1",
+ "lib/matplotlib/axes/_base.py:docstring of matplotlib.axes._base._AxesBase.update_datalim:1"
],
"AxesBase": [
- "doc/api/axes_api.rst:456::1",
- "lib/matplotlib/axes/_base.py:docstring of matplotlib.axes._base._AxesBase.add_child_axes:2"
- ],
- "Axis._update_ticks": [
- "doc/api/prev_api_changes/api_changes_3.1.0.rst:1072"
- ],
- "Axis.set_tick_params": [
- "doc/users/prev_whats_new/whats_new_2.1.0.rst:394"
- ],
- "Axis.units": [
- "doc/api/prev_api_changes/api_changes_2.2.0.rst:77"
- ],
- "FT2Font": [
- "doc/gallery/misc/ftface_props.rst:16",
- "lib/matplotlib/font_manager.py:docstring of matplotlib.font_manager.ttfFontProperty:8"
+ "doc/api/axes_api.rst:444::1",
+ "lib/matplotlib/axes/_base.py:docstring of matplotlib.axes._base._AxesBase.add_child_axes:1"
],
"Figure.stale_callback": [
- "doc/users/interactive_guide.rst:333"
- ],
- "FigureCanvas": [
- "lib/matplotlib/backend_tools.py:docstring of matplotlib.backend_tools.ToolBase:25"
- ],
- "Formatter.__call__": [
- "doc/api/prev_api_changes/api_changes_3.1.0.rst:1122",
- "doc/api/prev_api_changes/api_changes_3.1.0.rst:1128"
- ],
- "GaussianKDE": [
- "lib/matplotlib/axes/_axes.py:docstring of matplotlib.axes._axes.Axes.violinplot:46",
- "lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.violinplot:46"
- ],
- "Glue": [
- "lib/matplotlib/mathtext.py:docstring of matplotlib.mathtext.GlueSpec:2"
+ "doc/users/explain/interactive_guide.rst:333"
],
"Glyph": [
- "doc/gallery/misc/ftface_props.rst:16"
+ "doc/gallery/misc/ftface_props.rst:28"
],
"Image": [
- "lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.gci:4"
+ "lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.gci:1"
],
"ImageComparisonFailure": [
- "lib/matplotlib/testing/decorators.py:docstring of matplotlib.testing.decorators.image_comparison:2"
- ],
- "ImageComparisonTest": [
- "doc/api/prev_api_changes/api_changes_3.1.0.rst:706"
+ "lib/matplotlib/testing/decorators.py:docstring of matplotlib.testing.decorators:1"
],
"Line2D.pick": [
- "doc/users/event_handling.rst:438"
- ],
- "MicrosecondLocator.__call__": [
- "doc/api/prev_api_changes/api_changes_1.5.0.rst:119"
- ],
- "MovieWriter.saving": [
- "doc/api/animation_api.rst:221"
- ],
- "MovieWriterBase": [
- "lib/matplotlib/animation.py:docstring of matplotlib.animation.AVConvBase:4",
- "lib/matplotlib/animation.py:docstring of matplotlib.animation.FFMpegBase:4",
- "lib/matplotlib/animation.py:docstring of matplotlib.animation.ImageMagickBase:4"
- ],
- "MovieWriterRegistry": [
- "doc/api/prev_api_changes/api_changes_3.2.0/behavior.rst:49",
- "doc/api/prev_api_changes/api_changes_3.2.0/behavior.rst:51",
- "doc/api/prev_api_changes/api_changes_3.2.0/deprecations.rst:121"
+ "doc/users/explain/event_handling.rst:468"
],
"QuadContourSet.changed()": [
- "lib/matplotlib/axes/_axes.py:docstring of matplotlib.axes._axes.Axes.contour:131",
- "lib/matplotlib/axes/_axes.py:docstring of matplotlib.axes._axes.Axes.contourf:131",
- "lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.contour:131",
- "lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.contourf:131"
- ],
- "Quiver.pivot": [
- "doc/api/prev_api_changes/api_changes_1.5.0.rst:44"
+ "lib/matplotlib/axes/_axes.py:docstring of matplotlib.axes._axes.Axes.contour:147",
+ "lib/matplotlib/axes/_axes.py:docstring of matplotlib.axes._axes.Axes.contourf:147",
+ "lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.contour:147",
+ "lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.contourf:147"
],
"Rectangle.contains": [
- "doc/users/event_handling.rst:150"
+ "doc/users/explain/event_handling.rst:180"
],
"Size.from_any": [
- "lib/mpl_toolkits/axes_grid1/axes_grid.py:docstring of mpl_toolkits.axes_grid1.axes_grid.ImageGrid.__init__:61",
- "lib/mpl_toolkits/axes_grid1/axes_grid.py:docstring of mpl_toolkits.axes_grid1.axes_grid.ImageGrid:61",
- "lib/mpl_toolkits/axisartist/axes_grid.py:docstring of mpl_toolkits.axisartist.axes_grid.ImageGrid:61"
+ "lib/mpl_toolkits/axes_grid1/axes_grid.py:docstring of mpl_toolkits.axes_grid1.axes_grid.ImageGrid:53",
+ "lib/mpl_toolkits/axisartist/axes_grid.py:docstring of mpl_toolkits.axisartist.axes_grid.ImageGrid:53"
],
"Timer": [
- "lib/matplotlib/backend_bases.py:docstring of matplotlib.backend_bases.FigureCanvasBase.new_timer:2",
- "lib/matplotlib/backend_bases.py:docstring of matplotlib.backend_bases.TimerBase:14"
+ "lib/matplotlib/backend_bases.py:docstring of matplotlib.backend_bases:1",
+ "lib/matplotlib/backend_bases.py:docstring of matplotlib.backend_bases:13"
],
"ToolContainer": [
- "doc/users/prev_whats_new/whats_new_1.5.rst:615",
- "lib/matplotlib/backend_bases.py:docstring of matplotlib.backend_bases.ToolContainerBase.remove_toolitem:2",
- "lib/matplotlib/backend_bases.py:docstring of matplotlib.backend_bases.ToolContainerBase:20"
- ],
- "ToolContainers": [
- "doc/users/prev_whats_new/whats_new_1.5.rst:615"
+ "lib/matplotlib/backend_bases.py:docstring of matplotlib.backend_bases:1",
+ "lib/matplotlib/backend_bases.py:docstring of matplotlib.backend_bases:19"
],
- "Toolbars": [
- "doc/users/prev_whats_new/whats_new_1.5.rst:615"
+ "_iter_collection": [
+ "lib/matplotlib/backend_bases.py:docstring of matplotlib.backend_bases:11",
+ "lib/matplotlib/backends/backend_pdf.py:docstring of matplotlib.backends.backend_pdf.FigureCanvasPdf:1",
+ "lib/matplotlib/backends/backend_ps.py:docstring of matplotlib.backends.backend_ps.FigureCanvasPS:1",
+ "lib/matplotlib/backends/backend_svg.py:docstring of matplotlib.backends.backend_svg.FigureCanvasSVG:1",
+ "lib/matplotlib/patheffects.py:docstring of matplotlib.patheffects.AbstractPathEffect:1"
],
- "Tools": [
- "doc/users/prev_whats_new/whats_new_1.5.rst:608"
+ "_iter_collection_raw_paths": [
+ "lib/matplotlib/backend_bases.py:docstring of matplotlib.backend_bases:11",
+ "lib/matplotlib/backends/backend_pdf.py:docstring of matplotlib.backends.backend_pdf.FigureCanvasPdf:1",
+ "lib/matplotlib/backends/backend_ps.py:docstring of matplotlib.backends.backend_ps.FigureCanvasPS:1",
+ "lib/matplotlib/backends/backend_svg.py:docstring of matplotlib.backends.backend_svg.FigureCanvasSVG:1",
+ "lib/matplotlib/patheffects.py:docstring of matplotlib.patheffects.AbstractPathEffect:1"
],
"_read": [
- "lib/matplotlib/dviread.py:docstring of matplotlib.dviread.Vf:20"
+ "lib/matplotlib/dviread.py:docstring of matplotlib.dviread:19"
],
"active": [
- "lib/matplotlib/widgets.py:docstring of matplotlib.widgets.AxesWidget:34"
- ],
- "add_subplot": [
- "lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.figure:50"
- ],
- "add_tool": [
- "lib/matplotlib/backend_tools.py:docstring of matplotlib.backend_tools.add_tools_to_container:11",
- "lib/matplotlib/backend_tools.py:docstring of matplotlib.backend_tools.add_tools_to_manager:11"
- ],
- "autoscale_view": [
- "lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.autoscale:19",
- "lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.plot:128"
+ "lib/matplotlib/widgets.py:docstring of matplotlib.widgets.AxesWidget:15"
],
"ax.transAxes": [
- "lib/matplotlib/axes/_axes.py:docstring of matplotlib.axes._axes.Axes.indicate_inset:19",
- "lib/matplotlib/axes/_axes.py:docstring of matplotlib.axes._axes.Axes.inset_axes:11"
- ],
- "axes.Axes.patch": [
- "doc/api/prev_api_changes/api_changes_1.3.x.rst:36"
+ "lib/matplotlib/axes/_axes.py:docstring of matplotlib.axes._axes.Axes.indicate_inset:14",
+ "lib/matplotlib/axes/_axes.py:docstring of matplotlib.axes._axes.Axes.inset_axes:6"
],
"axes.bbox": [
- "lib/matplotlib/axes/_axes.py:docstring of matplotlib.axes._axes.Axes.legend:128",
- "lib/matplotlib/figure.py:docstring of matplotlib.figure.FigureBase.legend:129",
- "lib/matplotlib/legend.py:docstring of matplotlib.legend.Legend:88",
- "lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.figlegend:129",
- "lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.legend:128"
- ],
- "axes3d.Axes3D.xaxis": [
- "doc/api/prev_api_changes/api_changes_3.1.0.rst:939"
- ],
- "axes3d.Axes3D.yaxis": [
- "doc/api/prev_api_changes/api_changes_3.1.0.rst:939"
- ],
- "axes3d.Axes3D.zaxis": [
- "doc/api/prev_api_changes/api_changes_3.1.0.rst:939"
- ],
- "axis.Axis.get_ticks_position": [
- "doc/api/prev_api_changes/api_changes_3.1.0.rst:826"
- ],
- "backend_bases.RendererBase": [
- "lib/matplotlib/backends/backend_template.py:docstring of matplotlib.backends.backend_template.RendererTemplate:4"
- ],
- "backend_bases.ToolContainerBase": [
- "lib/matplotlib/backend_tools.py:docstring of matplotlib.backend_tools.add_tools_to_container:8"
- ],
- "blocking_input.BlockingInput.__call__": [
- "doc/api/prev_api_changes/api_changes_3.2.0/behavior.rst:295"
+ "lib/matplotlib/axes/_axes.py:docstring of matplotlib.axes._axes.Axes.legend:137",
+ "lib/matplotlib/figure.py:docstring of matplotlib.figure.Figure:116",
+ "lib/matplotlib/legend.py:docstring of matplotlib.legend.DraggableLegend.finalize_offset:20",
+ "lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.figlegend:136",
+ "lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.legend:137"
],
"can_composite": [
- "lib/matplotlib/image.py:docstring of matplotlib.image.composite_images:9"
+ "lib/matplotlib/image.py:docstring of matplotlib.image:5"
],
"cleanup": [
- "lib/matplotlib/animation.py:docstring of matplotlib.animation.FileMovieWriter.setup:18",
- "lib/matplotlib/animation.py:docstring of matplotlib.animation.HTMLWriter.setup:18"
- ],
- "colorbar.ColorbarBase.outline": [
- "doc/api/prev_api_changes/api_changes_1.4.x.rst:83"
+ "lib/matplotlib/animation.py:docstring of matplotlib.animation.FileMovieWriter:13",
+ "lib/matplotlib/animation.py:docstring of matplotlib.animation.HTMLWriter:13"
],
"converter": [
- "lib/matplotlib/testing/compare.py:docstring of matplotlib.testing.compare.compare_images:4"
+ "lib/matplotlib/testing/compare.py:docstring of matplotlib.testing.compare:1"
],
- "fc-list": [
- "lib/matplotlib/font_manager.py:docstring of matplotlib.font_manager.get_fontconfig_fonts:2"
- ],
- "figure.Figure.canvas.set_window_title()": [
- "doc/users/prev_whats_new/whats_new_3.0.rst:84"
+ "draw_image": [
+ "lib/matplotlib/backends/backend_agg.py:docstring of matplotlib.backends.backend_agg:1"
],
"figure.bbox": [
- "lib/matplotlib/axes/_axes.py:docstring of matplotlib.axes._axes.Axes.legend:128",
- "lib/matplotlib/figure.py:docstring of matplotlib.figure.FigureBase.legend:129",
- "lib/matplotlib/legend.py:docstring of matplotlib.legend.Legend:88",
- "lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.figlegend:129",
- "lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.legend:128"
- ],
- "floating_axes.FloatingSubplot": [
- "doc/gallery/axisartist/demo_floating_axes.rst:22"
+ "lib/matplotlib/axes/_axes.py:docstring of matplotlib.axes._axes.Axes.legend:137",
+ "lib/matplotlib/figure.py:docstring of matplotlib.figure.Figure:116",
+ "lib/matplotlib/legend.py:docstring of matplotlib.legend.DraggableLegend.finalize_offset:20",
+ "lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.figlegend:136",
+ "lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.legend:137"
],
"fmt_xdata": [
- "lib/matplotlib/axes/_base.py:docstring of matplotlib.axes._base._AxesBase.format_xdata:4"
+ "lib/matplotlib/axes/_base.py:docstring of matplotlib.axes._base._AxesBase.format_xdata:1"
],
"fmt_ydata": [
- "lib/matplotlib/axes/_base.py:docstring of matplotlib.axes._base._AxesBase.format_ydata:4"
- ],
- "font.*": [
- "doc/users/prev_whats_new/whats_new_1.3.rst:302"
- ],
- "gaussian_kde": [
- "lib/matplotlib/mlab.py:docstring of matplotlib.mlab.GaussianKDE:32"
+ "lib/matplotlib/axes/_base.py:docstring of matplotlib.axes._base._AxesBase.format_ydata:1"
],
"get_size": [
- "doc/users/prev_whats_new/whats_new_1.4.rst:223",
"lib/mpl_toolkits/axes_grid1/axes_size.py:docstring of mpl_toolkits.axes_grid1.axes_size:1"
],
"get_xbound": [
- "lib/mpl_toolkits/mplot3d/axes3d.py:docstring of mpl_toolkits.mplot3d.axes3d.Axes3D.get_xlim3d:22"
+ "lib/mpl_toolkits/mplot3d/axes3d.py:docstring of mpl_toolkits.mplot3d.axes3d.Axes3D.get_xlim:17"
],
"get_ybound": [
- "lib/mpl_toolkits/mplot3d/axes3d.py:docstring of mpl_toolkits.mplot3d.axes3d.Axes3D.get_ylim3d:22"
- ],
- "h_pad": [
- "lib/matplotlib/figure.py:docstring of matplotlib.figure.Figure.set_constrained_layout:5"
- ],
- "image": [
- "lib/matplotlib/sphinxext/plot_directive.py:docstring of matplotlib.sphinxext.plot_directive:78"
- ],
- "interactive": [
- "lib/matplotlib/backends/backend_nbagg.py:docstring of matplotlib.backends.backend_nbagg._BackendNbAgg.show:4"
+ "lib/mpl_toolkits/mplot3d/axes3d.py:docstring of mpl_toolkits.mplot3d.axes3d.Axes3D.get_ylim:17"
],
"invert_xaxis": [
- "lib/mpl_toolkits/mplot3d/axes3d.py:docstring of mpl_toolkits.mplot3d.axes3d.Axes3D.get_xlim3d:24"
+ "lib/mpl_toolkits/mplot3d/axes3d.py:docstring of mpl_toolkits.mplot3d.axes3d.Axes3D.get_xlim:19"
],
"invert_yaxis": [
- "lib/mpl_toolkits/mplot3d/axes3d.py:docstring of mpl_toolkits.mplot3d.axes3d.Axes3D.get_ylim3d:24"
+ "lib/mpl_toolkits/mplot3d/axes3d.py:docstring of mpl_toolkits.mplot3d.axes3d.Axes3D.get_ylim:19"
],
"ipykernel.pylab.backend_inline": [
- "doc/users/interactive.rst:257"
+ "doc/users/explain/interactive.rst:255"
],
"kde.covariance_factor": [
- "lib/matplotlib/mlab.py:docstring of matplotlib.mlab.GaussianKDE:41"
+ "lib/matplotlib/mlab.py:docstring of matplotlib.mlab:40"
],
"kde.factor": [
- "lib/matplotlib/axes/_axes.py:docstring of matplotlib.axes._axes.Axes.violinplot:46",
- "lib/matplotlib/mlab.py:docstring of matplotlib.mlab.GaussianKDE:12",
- "lib/matplotlib/mlab.py:docstring of matplotlib.mlab.GaussianKDE:45",
- "lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.violinplot:46"
- ],
- "labelcolor": [
- "doc/users/prev_whats_new/whats_new_2.0.0.rst:120",
- "doc/users/prev_whats_new/whats_new_2.0.0.rst:123"
- ],
- "legend.Legend.set_draggable()": [
- "doc/api/prev_api_changes/api_changes_3.1.0.rst:499"
- ],
- "levels": [
- "doc/api/prev_api_changes/api_changes_3.0.0.rst:197"
- ],
- "load_char": [
- "doc/gallery/misc/ftface_props.rst:16"
- ],
- "mainloop": [
- "lib/matplotlib/backends/backend_nbagg.py:docstring of matplotlib.backends.backend_nbagg._BackendNbAgg.show:4"
+ "lib/matplotlib/axes/_axes.py:docstring of matplotlib.axes._axes.Axes.violinplot:41",
+ "lib/matplotlib/mlab.py:docstring of matplotlib.mlab:11",
+ "lib/matplotlib/mlab.py:docstring of matplotlib.mlab:44",
+ "lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.violinplot:41"
],
"make_image": [
- "lib/matplotlib/image.py:docstring of matplotlib.image.composite_images:9"
- ],
- "markevery": [
- "doc/users/prev_whats_new/whats_new_1.4.rst:212",
- "doc/users/prev_whats_new/whats_new_1.4.rst:214",
- "doc/users/prev_whats_new/whats_new_3.0.rst:110"
- ],
- "matplotlib.animation.AVConvBase.output_args": [
- "lib/matplotlib/animation.py:docstring of matplotlib.animation.MovieWriter.isAvailable:1::1"
- ],
- "matplotlib.animation.AVConvFileWriter.args_key": [
- "doc/api/_as_gen/matplotlib.animation.AVConvFileWriter.rst:39::1"
- ],
- "matplotlib.animation.AVConvFileWriter.bin_path": [
- "doc/api/_as_gen/matplotlib.animation.AVConvFileWriter.rst:28::1"
- ],
- "matplotlib.animation.AVConvFileWriter.cleanup": [
- "doc/api/_as_gen/matplotlib.animation.AVConvFileWriter.rst:28::1"
- ],
- "matplotlib.animation.AVConvFileWriter.clear_temp": [
- "doc/api/_as_gen/matplotlib.animation.AVConvFileWriter.rst:39::1"
- ],
- "matplotlib.animation.AVConvFileWriter.exec_key": [
- "doc/api/_as_gen/matplotlib.animation.AVConvFileWriter.rst:39::1"
- ],
- "matplotlib.animation.AVConvFileWriter.finish": [
- "doc/api/_as_gen/matplotlib.animation.AVConvFileWriter.rst:28::1"
- ],
- "matplotlib.animation.AVConvFileWriter.frame_format": [
- "doc/api/_as_gen/matplotlib.animation.AVConvFileWriter.rst:39::1"
- ],
- "matplotlib.animation.AVConvFileWriter.frame_size": [
- "doc/api/_as_gen/matplotlib.animation.AVConvFileWriter.rst:39::1"
- ],
- "matplotlib.animation.AVConvFileWriter.grab_frame": [
- "doc/api/_as_gen/matplotlib.animation.AVConvFileWriter.rst:28::1"
- ],
- "matplotlib.animation.AVConvFileWriter.isAvailable": [
- "doc/api/_as_gen/matplotlib.animation.AVConvFileWriter.rst:28::1"
- ],
- "matplotlib.animation.AVConvFileWriter.output_args": [
- "doc/api/_as_gen/matplotlib.animation.AVConvFileWriter.rst:39: