Skip to content

Commit 49c6fbe

Browse files
authored
Merge branch 'main' into repr-html-fonts
2 parents 5cf6533 + 5bb1449 commit 49c6fbe

File tree

159 files changed

+5640
-4748
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

159 files changed

+5640
-4748
lines changed

.flake8

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,14 +94,13 @@ per-file-ignores =
9494
tutorials/colors/colormap-manipulation.py: E402
9595
tutorials/intermediate/artists.py: E402
9696
tutorials/intermediate/constrainedlayout_guide.py: E402
97-
tutorials/intermediate/gridspec.py: E402
9897
tutorials/intermediate/legend_guide.py: E402
9998
tutorials/intermediate/tight_layout_guide.py: E402
10099
tutorials/introductory/customizing.py: E501
101100
tutorials/introductory/images.py: E402, E501
102101
tutorials/introductory/pyplot.py: E402, E501
103102
tutorials/introductory/sample_plots.py: E501
104-
tutorials/introductory/usage.py: E501
103+
tutorials/introductory/usage.py: E703
105104
tutorials/text/annotations.py: E402, E501
106105
tutorials/text/text_intro.py: E402
107106
tutorials/text/text_props.py: E501
@@ -121,6 +120,7 @@ per-file-ignores =
121120
examples/subplots_axes_and_figures/demo_constrained_layout.py: E402
122121
examples/text_labels_and_annotations/custom_legends.py: E402
123122
examples/ticks/date_concise_formatter.py: E402
123+
examples/ticks/date_formatters_locators.py: F401
124124
examples/user_interfaces/embedding_in_gtk3_panzoom_sgskip.py: E402
125125
examples/user_interfaces/embedding_in_gtk3_sgskip.py: E402
126126
examples/user_interfaces/embedding_in_gtk4_panzoom_sgskip.py: E402

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
* text=auto
2+
*.m diff=objc
23
*.ppm binary
34
*.svg binary
45
*.svg linguist-language=true
Lines changed: 24 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
11
name: Bug Report
2-
description: Report a bug or issue with Matplotlib
2+
description: Report a bug or issue with Matplotlib.
33
title: "[Bug]: "
44
body:
5-
- type: markdown
6-
attributes:
7-
value: |
8-
To help us understand and resolve your issue, please fill out the form to the best of your ability.
95
- type: textarea
106
id: summary
117
attributes:
128
label: Bug summary
13-
description: Please provide 1-2 short sentences that succinctly describes the bug
9+
description: Describe the bug in 1-2 short sentences
1410
placeholder:
1511
value:
1612
validations:
@@ -28,63 +24,62 @@ body:
2824
id: actual
2925
attributes:
3026
label: Actual outcome
31-
description: Please provide the output produced by the above code, which may be a screenshot, console output, etc.
32-
placeholder: if applicable, paste the console output and images here
27+
description: |
28+
Paste the output produced by the code provided above, e.g.
29+
console output, images/videos produced by the code, any relevant screenshots/screencasts, etc.
3330
validations:
3431
required: true
3532
- type: textarea
3633
id: expected
3734
attributes:
3835
label: Expected outcome
39-
description: Please provide a description (or visual example) of the expected outcome from the code snippet. If this used to work in an earlier version of Matplotlib, please note the version it used to work on
36+
description: Describe (or provide a visual example of) the expected outcome from the code snippet.
4037
validations:
4138
required: true
39+
- type: textarea
40+
id: details
41+
attributes:
42+
label: Additional information
43+
description: |
44+
- What are the conditions under which this bug happens? input parameters, edge cases, etc?
45+
- Has this worked in earlier versions?
46+
- Do you know why this bug is happening?
47+
- Do you maybe even know a fix?
4248
- type: input
4349
id: operating-system
4450
attributes:
4551
label: Operating system
46-
description: What operating system are you using?
47-
placeholder: Windows, OS/X, Arch, Debian, Ubuntu, etc.
52+
description: Windows, OS/X, Arch, Debian, Ubuntu, etc.
4853
- type: input
4954
id: matplotlib-version
5055
attributes:
5156
label: Matplotlib Version
52-
placeholder: import matplotlib; print(matplotlib.__version__)
57+
description: "From Python prompt: `import matplotlib; print(matplotlib.__version__)`"
5358
validations:
5459
required: true
5560
- type: input
5661
id: matplotlib-backend
5762
attributes:
5863
label: Matplotlib Backend
59-
placeholder: print(matplotlib.get_backend())
64+
description: "From Python prompt: `import matplotlib; print(matplotlib.get_backend())`"
6065
- type: input
6166
id: python-version
6267
attributes:
6368
label: Python version
64-
placeholder: python --version
69+
description: "In console: `python --version`"
6570
- type: input
6671
id: jupyter-version
6772
attributes:
6873
label: Jupyter version
69-
placeholder: jupyter notebook --version, jupyter lab --version
70-
- type: textarea
71-
id: other-libraries
72-
attributes:
73-
label: Other libraries
74-
description: please provide the versions of any other libraries that are relevant to this bug report.
74+
description: "In console: `jupyter notebook --version` or `jupyter lab --version`"
7575
- type: dropdown
7676
id: install
7777
attributes:
7878
label: Installation
79-
description: how did you install matplotlib?
79+
description: How did you install matplotlib?
8080
options:
8181
- pip
8282
- conda
83-
- Linux package manager (Debian/Fedora/etc.)
84-
- source
85-
- type: input
86-
id: conda-channel
87-
attributes:
88-
label: Conda channel
89-
description: If you installed from conda, please specify which channel you used if not the default?
90-
placeholder: conda-forge
83+
- Linux package manager
84+
- from source (.tar.gz)
85+
- git checkout

.github/ISSUE_TEMPLATE/documentation.yml

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,14 @@ description: Create a report to help us improve the documentation
33
title: "[Doc]: "
44
labels: [Documentation]
55
body:
6-
- type: markdown
7-
attributes:
8-
value: |
9-
To help us understand and resolve your issue, please fill out the form to the best of your ability.
106
- type: input
117
id: link
128
attributes:
139
label: Documentation Link
14-
description: Please provide a link to any documentation or examples that you are referencing.
15-
placeholder: https://matplotlib.org/devdocs/
10+
description: |
11+
Link to any documentation or examples that you are referencing.
12+
Suggested improvements should be based on the development version of the docs: https://matplotlib.org/devdocs/
13+
placeholder: https://matplotlib.org/devdocs/...
1614
- type: textarea
1715
id: problem
1816
attributes:
@@ -28,7 +26,6 @@ body:
2826
id: improvement
2927
attributes:
3028
label: Suggested improvement
31-
description: How can we improve the documentation?
3229
placeholder: |
3330
* This line should be be changed to say [...]
3431
* Include a paragraph explaining [...]
@@ -37,15 +34,6 @@ body:
3734
id: matplotlib-version
3835
attributes:
3936
label: Matplotlib Version
40-
placeholder: import matplotlib; print(matplotlib.__version__)
41-
validations:
42-
required: true
43-
- type: input
44-
id: matplotlib-doc-version
45-
attributes:
46-
label: Matplotlib documentation version
47-
placeholder: check under the logo
37+
description: "From Python prompt: `import matplotlib; print(matplotlib.__version__)`"
4838
validations:
4939
required: true
50-
51-

.github/ISSUE_TEMPLATE/feature_request.yml

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ body:
66
- type: markdown
77
attributes:
88
value: |
9-
Thanks for thinking of a way to improve Matplotlib. Please search the issues for relevant feature requests before creating a new feature request.
9+
Please search the [issues](https://github.com/matplotlib/matplotlib/issues) for relevant feature requests before creating a new feature request.
1010
- type: textarea
1111
id: problem
1212
attributes:
1313
label: Problem
14-
description: Please provide a clear and concise description of the problem this feature will solve.
14+
description: Briefly describe the problem this feature will solve. (2-4 sentences)
1515
placeholder: |
1616
* I'm always frustrated when [...] because [...]
1717
* I would like it if [...] happened when I [...] because [...]
@@ -22,15 +22,4 @@ body:
2222
id: solution
2323
attributes:
2424
label: Proposed solution
25-
description: Please provide a clear and concise description of a way to accomplish what you want.
26-
placeholder: Add an option so that when [...] [...] will happen
27-
- type: textarea
28-
id: prior-art
29-
attributes:
30-
label: Additional context and prior art
31-
description: Add any other context or screenshots about the feature request here. You can also include links to examples of other programs that have something similar to your request.
32-
placeholder: Another project [...] solved this by [...]
33-
34-
35-
36-
25+
description: Describe a way to accomplish the goals of this feature request.

.github/workflows/clean_pr.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,14 @@ jobs:
1919
printf 'The following files were both added and deleted in this PR:\n%s\n' "$ad"
2020
exit 1
2121
fi
22-
22+
- name: Check for added-and-modified images
23+
run: |
24+
git fetch --quiet origin "$GITHUB_BASE_REF"
25+
base="$(git merge-base "origin/$GITHUB_BASE_REF" 'HEAD^2')"
26+
am="$(git log "$base..HEAD^2" --pretty=tformat: --name-status --diff-filter=AM |
27+
cut --fields 2 | sort | uniq --repeated |
28+
grep -E '\.(png|pdf|ps|eps|svg)' || true)"
29+
if [[ -n "$am" ]]; then
30+
printf 'The following images were both added and modified in this PR:\n%s\n' "$am"
31+
exit 1
32+
fi

.github/workflows/tests.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ env:
1414

1515
jobs:
1616
test:
17+
if: "github.repository == 'matplotlib/matplotlib' && !contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[skip github]')"
1718
name: "Python ${{ matrix.python-version }} on ${{ matrix.os }} ${{ matrix.name-suffix }}"
1819
runs-on: ${{ matrix.os }}
1920

@@ -225,9 +226,16 @@ jobs:
225226
fi
226227
fi
227228
229+
cat <<EOT >> mplsetup.cfg
230+
[rc_options]
231+
backend=Agg
232+
EOT
233+
234+
cat mplsetup.cfg
235+
228236
# All dependencies must have been pre-installed, so that the minver
229237
# constraints are held.
230-
python -m pip install --no-deps -e .
238+
python -m pip install --no-deps -ve .
231239
232240
if [[ "${{ runner.os }}" != 'macOS' ]]; then
233241
unset CPPFLAGS
@@ -242,7 +250,7 @@ jobs:
242250
run: |
243251
${{ matrix.XVFB_RUN }} python -mpytest -raR -n auto \
244252
--maxfail=50 --timeout=300 --durations=25 \
245-
--cov-report=xml --cov=lib --log-level=DEBUG
253+
--cov-report=xml --cov=lib --log-level=DEBUG --color=yes
246254
247255
- name: Filter C coverage
248256
run: |

INSTALL.rst

Lines changed: 1 addition & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -1,91 +1 @@
1-
############
2-
Installation
3-
############
4-
5-
==============================
6-
Installing an official release
7-
==============================
8-
9-
Matplotlib releases are available as wheel packages for macOS, Windows and
10-
Linux on `PyPI <https://pypi.org/project/matplotlib/>`_. Install it using
11-
``pip``:
12-
13-
.. code-block:: sh
14-
15-
python -m pip install -U pip
16-
python -m pip install -U matplotlib
17-
18-
If this command results in Matplotlib being compiled from source and
19-
there's trouble with the compilation, you can add ``--prefer-binary`` to
20-
select the newest version of Matplotlib for which there is a
21-
precompiled wheel for your OS and Python.
22-
23-
.. note::
24-
25-
The following backends work out of the box: Agg, ps, pdf, svg
26-
27-
Python is typically shipped with tk bindings which are used by
28-
TkAgg.
29-
30-
For support of other GUI frameworks, LaTeX rendering, saving
31-
animations and a larger selection of file formats, you can
32-
install :ref:`optional_dependencies`.
33-
34-
=========================
35-
Third-party distributions
36-
=========================
37-
38-
Various third-parties provide Matplotlib for their environments.
39-
40-
Conda packages
41-
==============
42-
Matplotlib is available both via the *anaconda main channel*
43-
44-
.. code-block:: sh
45-
46-
conda install matplotlib
47-
48-
as well as via the *conda-forge community channel*
49-
50-
.. code-block:: sh
51-
52-
conda install -c conda-forge matplotlib
53-
54-
Python distributions
55-
====================
56-
57-
Matplotlib is part of major Python distributions:
58-
59-
- `Anaconda <https://www.anaconda.com/>`_
60-
61-
- `ActiveState ActivePython
62-
<https://www.activestate.com/products/python/downloads/>`_
63-
64-
- `WinPython <https://winpython.github.io/>`_
65-
66-
Linux package manager
67-
=====================
68-
69-
If you are using the Python version that comes with your Linux distribution,
70-
you can install Matplotlib via your package manager, e.g.:
71-
72-
* Debian / Ubuntu: ``sudo apt-get install python3-matplotlib``
73-
* Fedora: ``sudo dnf install python3-matplotlib``
74-
* Red Hat: ``sudo yum install python3-matplotlib``
75-
* Arch: ``sudo pacman -S python-matplotlib``
76-
77-
======================
78-
Installing from source
79-
======================
80-
See :ref:`install_from_source`.
81-
82-
==========================
83-
Installing for development
84-
==========================
85-
See :ref:`installing_for_devs`.
86-
87-
==============
88-
Installing FAQ
89-
==============
90-
91-
See :ref:`installing-faq`.
1+
See doc/users/installing/index.rst

README.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,9 @@ various graphical user interface toolkits.
5858
Install
5959
=======
6060

61-
For installation instructions and requirements, see `INSTALL.rst <INSTALL.rst>`_ or the
62-
`install <https://matplotlib.org/stable/users/installing.html>`_ documentation.
61+
For installation instructions and requirements, see the `install documentation
62+
<https://matplotlib.org/stable/users/installing/index.html>`_ or
63+
`installing.rst <doc/users/installing/index.rst>`_ in the source.
6364

6465
Contribute
6566
==========
@@ -98,7 +99,7 @@ Citing Matplotlib
9899
If Matplotlib contributes to a project that leads to publication, please
99100
acknowledge this by citing Matplotlib.
100101

101-
`A ready-made citation entry <https://matplotlib.org/stable/citing.html>`_ is
102+
`A ready-made citation entry <https://matplotlib.org/stable/users/project/citing.html>`_ is
102103
available.
103104

104105
Research notice

doc/_static/anatomy.png

157 KB
Loading

0 commit comments

Comments
 (0)