Skip to content

Commit 9f11f64

Browse files
authored
Merge branch 'master' into private-funcs-mplot3d
2 parents 661deec + ef48cef commit 9f11f64

File tree

355 files changed

+7984
-6297
lines changed

Some content is hidden

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

355 files changed

+7984
-6297
lines changed

.appveyor.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
branches:
88
except:
99
- /auto-backport-.*/
10+
- /^v\d+\.\d+\.[\dx]+-doc$/
1011

1112
clone_depth: 50
1213

@@ -15,7 +16,7 @@ environment:
1516
global:
1617
PYTHONIOENCODING: UTF-8
1718
PYTEST_ARGS: -raR --numprocesses=auto --timeout=300 --durations=25
18-
--cov-report= --cov=lib -m "not network"
19+
--cov-report= --cov=lib -m "not network" --log-level=DEBUG
1920

2021
matrix:
2122
# theoretically the CONDA_INSTALL_LOCN could be only two: one for 32bit,

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ deps-run: &deps-install
6666
name: Install Python dependencies
6767
command: |
6868
python -mpip install --user numpy${NUMPY_VERSION} codecov coverage
69-
python -mpip install --user -r doc-requirements.txt
69+
python -mpip install --user -r requirements/doc/doc-requirements.txt
7070
7171
mpl-run: &mpl-install
7272
name: Install Matplotlib

.flake8

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -28,38 +28,32 @@ per-file-ignores =
2828
tools/compare_backend_driver_results.py: E501
2929
tools/subset.py: E221, E251, E261, E302, E501
3030

31-
matplotlib/_cm.py: E202, E203, E302
32-
matplotlib/_mathtext_data.py: E203, E261
33-
matplotlib/backends/_backend_tk.py: E501
34-
matplotlib/backends/backend_agg.py: E302
35-
matplotlib/backends/backend_cairo.py: E203, E221, E402
36-
matplotlib/backends/backend_gtk3.py: E203, E221, E222, E225, E251, E501
37-
matplotlib/backends/backend_pgf.py: E731
38-
matplotlib/backends/qt_editor/_formlayout.py: E501
39-
matplotlib/font_manager.py: E203, E221, E251, E501
40-
matplotlib/fontconfig_pattern.py: E201, E203, E221, E222, E225
41-
matplotlib/mathtext.py: E201, E202, E203, E211, E221, E222, E225, E251, E301, E402
42-
matplotlib/projections/geo.py: E203, E221, E502
43-
matplotlib/pylab.py: E501
44-
matplotlib/rcsetup.py: E501
45-
matplotlib/sphinxext/plot_directive.py: E402
46-
matplotlib/tests/test_mathtext.py: E501
47-
matplotlib/transforms.py: E201, E202, E203, E501
48-
matplotlib/tri/triinterpolate.py: E201, E221
49-
matplotlib/type1font.py: E731
31+
lib/matplotlib/_cm.py: E202, E203, E302
32+
lib/matplotlib/_mathtext_data.py: E203, E261
33+
lib/matplotlib/backends/_backend_tk.py: E501
34+
lib/matplotlib/backends/backend_agg.py: E302
35+
lib/matplotlib/backends/backend_cairo.py: E203, E221, E402
36+
lib/matplotlib/backends/backend_gtk3.py: E203, E221, E222, E225, E251, E501
37+
lib/matplotlib/backends/backend_pgf.py: E731
38+
lib/matplotlib/backends/qt_editor/_formlayout.py: E501
39+
lib/matplotlib/font_manager.py: E203, E221, E251, E501
40+
lib/matplotlib/fontconfig_pattern.py: E201, E203, E221, E222, E225
41+
lib/matplotlib/mathtext.py: E201, E202, E203, E211, E221, E222, E225, E251, E301, E402
42+
lib/matplotlib/projections/geo.py: E203, E221, E502
43+
lib/matplotlib/pylab.py: E501
44+
lib/matplotlib/rcsetup.py: E501
45+
lib/matplotlib/tests/test_mathtext.py: E501
46+
lib/matplotlib/transforms.py: E201, E202, E203, E501
47+
lib/matplotlib/tri/triinterpolate.py: E201, E221
48+
lib/matplotlib/type1font.py: E731
5049

51-
mpl_toolkits/axes_grid/axes_rgb.py: E501
52-
mpl_toolkits/axes_grid1/axes_divider.py: E402, E501
53-
mpl_toolkits/axes_grid1/axes_grid.py: E225
54-
mpl_toolkits/axes_grid1/axes_size.py: E272, E501
55-
mpl_toolkits/axes_grid1/colorbar.py: E225, E501
56-
mpl_toolkits/axes_grid1/inset_locator.py: E501
57-
mpl_toolkits/axes_grid1/mpl_axes.py: E501
58-
mpl_toolkits/axisartist/angle_helper.py: E221
59-
mpl_toolkits/axisartist/clip_path.py: E225, E501
60-
mpl_toolkits/axisartist/floating_axes.py: E225, E402, E501
61-
mpl_toolkits/axisartist/grid_helper_curvelinear.py: E225, E501
62-
mpl_toolkits/tests/test_axes_grid1.py: E201, E202
50+
lib/mpl_toolkits/axes_grid1/axes_divider.py: E402, E501
51+
lib/mpl_toolkits/axes_grid1/axes_size.py: E272
52+
lib/mpl_toolkits/axes_grid1/colorbar.py: E225, E501
53+
lib/mpl_toolkits/axisartist/angle_helper.py: E221
54+
lib/mpl_toolkits/axisartist/clip_path.py: E225
55+
lib/mpl_toolkits/axisartist/floating_axes.py: E225, E402, E501
56+
lib/mpl_toolkits/axisartist/grid_helper_curvelinear.py: E225, E501
6357

6458
doc/conf.py: E402, E501
6559
doc/sphinxext/github.py: E302, E501
@@ -142,11 +136,14 @@ per-file-ignores =
142136
examples/images_contours_and_fields/tripcolor_demo.py: E201, E402
143137
examples/images_contours_and_fields/triplot_demo.py: E201, E402
144138
examples/images_contours_and_fields/watermark_image.py: E402
139+
examples/lines_bars_and_markers/errorbar_limits_simple.py: E402
145140
examples/lines_bars_and_markers/fill_between_demo.py: E402
146141
examples/lines_bars_and_markers/filled_step.py: E402
147142
examples/lines_bars_and_markers/joinstyle.py: E402
148143
examples/lines_bars_and_markers/scatter_piecharts.py: E402
144+
examples/lines_bars_and_markers/scatter_with_legend.py: E402
149145
examples/lines_bars_and_markers/span_regions.py: E402
146+
examples/lines_bars_and_markers/step_demo.py: E402
150147
examples/misc/agg_buffer.py: E402
151148
examples/misc/anchored_artists.py: E501
152149
examples/misc/contour_manual.py: E501
@@ -185,7 +182,7 @@ per-file-ignores =
185182
examples/pyplots/pyplot_simple.py: E231, E402
186183
examples/pyplots/pyplot_text.py: E402
187184
examples/pyplots/pyplot_three.py: E402
188-
examples/pyplots/pyplot_two_subplots.py: E302, E402
185+
examples/pyplots/pyplot_two_subplots.py: E402
189186
examples/pyplots/text_commands.py: E231, E402
190187
examples/pyplots/text_layout.py: E231, E402
191188
examples/pyplots/whats_new_1_subplot3d.py: E402
@@ -197,6 +194,7 @@ per-file-ignores =
197194
examples/pyplots/whats_new_99_spines.py: E231, E402
198195
examples/recipes/placing_text_boxes.py: E501
199196
examples/scales/power_norm.py: E402
197+
examples/scales/scales.py: E402
200198
examples/shapes_and_collections/artist_reference.py: E402
201199
examples/shapes_and_collections/collections.py: E402
202200
examples/shapes_and_collections/compound_path.py: E402
@@ -227,6 +225,7 @@ per-file-ignores =
227225
examples/subplots_axes_and_figures/axes_zoom_effect.py: E402
228226
examples/subplots_axes_and_figures/demo_constrained_layout.py: E402
229227
examples/subplots_axes_and_figures/demo_tight_layout.py: E402
228+
examples/subplots_axes_and_figures/secondary_axis.py: E402
230229
examples/subplots_axes_and_figures/two_scales.py: E402
231230
examples/subplots_axes_and_figures/zoom_inset_axes.py: E402
232231
examples/tests/backend_driver_sgskip.py: E402, E501
@@ -240,6 +239,7 @@ per-file-ignores =
240239
examples/text_labels_and_annotations/tex_demo.py: E402
241240
examples/text_labels_and_annotations/watermark_text.py: E402
242241
examples/ticks_and_spines/auto_ticks.py: E501
242+
examples/ticks_and_spines/date_concise_formatter.py: E402
243243
examples/user_interfaces/canvasagg.py: E402
244244
examples/user_interfaces/embedding_in_gtk3_panzoom_sgskip.py: E402
245245
examples/user_interfaces/embedding_in_gtk3_sgskip.py: E402

.github/ISSUE_TEMPLATE.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@
99

1010
**Code for reproduction**
1111

12-
<!--A minimum code snippet required to reproduce the bug, also minimizing the number of dependencies required-->
12+
<!--A minimum code snippet required to reproduce the bug.
13+
Please make sure to minimize the number of dependencies required, and provide
14+
any necessary plotted data.
15+
Avoid using threads, as Matplotlib is (explicitly) not thread-safe.-->
1316

1417
```python
1518
# Paste your code here

.travis.yml

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,13 @@ language: python
33
dist: xenial
44
sudo: false
55

6+
services:
7+
- xvfb
8+
69
branches:
710
except:
811
- /^auto-backport-of-pr-\d*/
12+
- /^v\d+\.\d+\.[\dx]+-doc$/
913

1014
cache:
1115
pip: true
@@ -29,17 +33,22 @@ addons:
2933
- graphviz
3034
- inkscape
3135
- libcairo2
36+
- libcairo2-dev
37+
- libffi-dev
3238
- libgeos-dev
33-
- libgirepository-1.0.1
39+
- libgirepository1.0-dev
3440
- lmodern
3541
- otf-freefont
3642
- pgf
43+
- pkg-config
44+
- qtbase5-dev
3745
- texlive-fonts-recommended
3846
- texlive-latex-base
3947
- texlive-latex-extra
4048
- texlive-latex-recommended
41-
- texlive-xetex
4249
- texlive-luatex
50+
- texlive-xetex
51+
- ttf-wqy-zenhei
4352

4453
env:
4554
global:
@@ -63,7 +72,7 @@ env:
6372
- NPROC=2
6473
- OPENBLAS_NUM_THREADS=1
6574
- PYTHONFAULTHANDLER=1
66-
- PYTEST_ADDOPTS="-raR --maxfail=50 --timeout=300 --durations=25 --cov-report= --cov=lib -n $NPROC"
75+
- PYTEST_ADDOPTS="-raR --maxfail=50 --timeout=300 --durations=25 --cov-report= --cov=lib -n $NPROC --log-level=DEBUG"
6776
- RUN_PYTEST=1
6877
- RUN_FLAKE8=
6978

@@ -83,7 +92,8 @@ matrix:
8392
- python: 3.7
8493
sudo: true
8594
- python: "nightly"
86-
env: PRE=--pre
95+
env:
96+
- PRE=--pre
8797
- os: osx
8898
language: generic # https://github.com/travis-ci/travis-ci/issues/2312
8999
only: master
@@ -107,7 +117,7 @@ before_install: |
107117
ci/silence brew update
108118
brew uninstall numpy gdal postgis
109119
brew upgrade python
110-
brew install ffmpeg imagemagick mplayer ccache
120+
brew install ffmpeg imagemagick mplayer ccache font-wenquanyi-zen-hei
111121
hash -r
112122
which python
113123
python --version
@@ -132,10 +142,11 @@ install:
132142
# install was successful by trying to import the toolkit (sometimes, the
133143
# install appears to be successful but shared libraries cannot be loaded at
134144
# runtime, so an actual import is a better check).
135-
python -mpip install --upgrade cairocffi>=0.8 pgi>=0.0.11.2 &&
136-
python -c 'import pgi as gi; gi.require_version("Gtk", "3.0"); from pgi.repository import Gtk' &&
137-
echo 'pgi is available' ||
138-
echo 'pgi is not available'
145+
python -mpip install --upgrade pycairo cairocffi>=0.8
146+
python -mpip install --upgrade PyGObject &&
147+
python -c 'import gi; gi.require_version("Gtk", "3.0"); from gi.repository import Gtk' &&
148+
echo 'PyGObject is available' ||
149+
echo 'PyGObject is not available'
139150
python -mpip install --upgrade pyqt5 &&
140151
python -c 'import PyQt5.QtCore' &&
141152
echo 'PyQt5 is available' ||
@@ -152,10 +163,6 @@ install:
152163
python -mpip install -ve .
153164
154165
before_script: |
155-
if [[ $TRAVIS_OS_NAME != 'osx' ]]; then
156-
export DISPLAY=:99.0
157-
sh -e /etc/init.d/xvfb start
158-
fi
159166
if [[ $DELETE_FONT_CACHE == 1 ]]; then
160167
rm -rf ~/.cache/matplotlib
161168
fi

INSTALL.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,7 @@ optional Matplotlib backends and the capabilities they provide.
152152
`PySide <https://pypi.org/project/PySide>`_ (>= 1.0.3): for the Qt4-based
153153
backends;
154154
* `PyQt5 <https://pypi.org/project/PyQt5>`_: for the Qt5-based backends;
155-
* `PyGObject <https://pypi.org/project/PyGObject/>`_ or
156-
`pgi <https://pypi.org/project/pgi/>`_ (>= 0.0.11.2): for the GTK3-based
155+
* `PyGObject <https://pypi.org/project/PyGObject/>`_: for the GTK3-based
157156
backends;
158157
* :term:`wxpython` (>= 4): for the WX-based backends;
159158
* `cairocffi <https://cairocffi.readthedocs.io/en/latest/>`_ (>= 0.8) or

azure-pipelines.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141

4242
- script: |
4343
env
44-
pytest --junitxml=junit/test-results.xml -raR --maxfail=50 --timeout=300 --durations=25 --cov-report= --cov=lib -n 2
44+
pytest --junitxml=junit/test-results.xml -raR --maxfail=50 --timeout=300 --durations=25 --cov-report= --cov=lib -n 2 --log-level=DEBUG
4545
displayName: 'pytest'
4646
4747
- task: PublishTestResults@2

doc/_static/animatplot.png

34.9 KB
Loading

doc/api/animation_api.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ artist at a global scope and let Python sort things out. For example ::
122122
init_func=init, blit=True)
123123
plt.show()
124124

125-
The second method is to us `functools.partial` to 'bind' artists to
125+
The second method is to use `functools.partial` to 'bind' artists to
126126
function. A third method is to use closures to build up the required
127127
artists and functions. A fourth method is to create a class.
128128

doc/api/api_changes.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ API Changes for 3.0.1
4242
`.tight_layout.auto_adjust_subplotpars` can return ``None`` now if the new
4343
subplotparams will collapse axes to zero width or height. This prevents
4444
``tight_layout`` from being executed. Similarly
45-
`.tight_layout.get_tight_layout_figure` will return None.
45+
`.tight_layout.get_tight_layout_figure` will return None.
4646

4747
API Changes for 3.0.0
4848
=====================
@@ -359,7 +359,7 @@ Changes regarding the text.latex.unicode rcParam
359359
------------------------------------------------
360360

361361
The rcParam now defaults to True and is deprecated (i.e., in future versions
362-
of Maplotlib, unicode input will always be supported).
362+
of Matplotlib, unicode input will always be supported).
363363

364364
Moreover, the underlying implementation now uses ``\usepackage[utf8]{inputenc}``
365365
instead of ``\usepackage{ucs}\usepackage[utf8x]{inputenc}``.
@@ -514,7 +514,7 @@ Removals
514514
Hold machinery
515515
``````````````
516516

517-
Setting or unsetting ``hold`` (deprecated in version 2.1) has now
517+
Setting or unsetting ``hold`` (:ref:`deprecated in version 2.0<v200_deprecate_hold>`) has now
518518
been completely removed. Matplotlib now always behaves as if ``hold=True``.
519519
To clear an axes you can manually use :meth:`~.axes.Axes.cla()`,
520520
or to clear an entire figure use :meth:`~.figure.Figure.clf()`.

0 commit comments

Comments
 (0)