Skip to content

Commit 867819f

Browse files
authored
Merge branch 'master' into optimize_3d
2 parents 1696d52 + 2ac048b commit 867819f

File tree

414 files changed

+29798
-39434
lines changed

Some content is hidden

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

414 files changed

+29798
-39434
lines changed

.appveyor.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ environment:
1212

1313
global:
1414
PYTHONIOENCODING: UTF-8
15-
PYTEST_ARGS: -rawR --numprocesses=auto --timeout=300 --durations=25
15+
PYTEST_ARGS: -raR --numprocesses=auto --timeout=300 --durations=25
1616
--cov-report= --cov=lib -m "not network"
1717

1818
matrix:
@@ -106,7 +106,7 @@ test_script:
106106
- python -c "import matplotlib as m; m.use('tkagg'); import matplotlib.pyplot as plt; print(plt.get_backend())"
107107
# tests
108108
- echo The following args are passed to pytest %PYTEST_ARGS%
109-
- python tests.py %PYTEST_ARGS%
109+
- pytest %PYTEST_ARGS%
110110

111111
after_test:
112112
# After the tests were a success, build wheels with the static libs

.flake8

Lines changed: 35 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -23,69 +23,46 @@ exclude =
2323

2424
per-file-ignores =
2525
setup.py: E402
26-
setupext.py: E302, E501
26+
setupext.py: E501
2727

2828
tools/compare_backend_driver_results.py: E501
29-
tools/subset.py: E221, E231, E251, E261, E302, E501, E701
29+
tools/subset.py: E221, E251, E261, E302, E501
3030

31-
matplotlib/_cm.py: E202, E203
31+
matplotlib/_cm.py: E202, E203, E302
3232
matplotlib/_mathtext_data.py: E203, E261
3333
matplotlib/backend_bases.py: E225
34-
matplotlib/backends/_backend_tk.py: E203, E222, E225, E231, E271, E301, E303, E401, E501, E701
35-
matplotlib/backends/backend_agg.py: E261, E302, E303, E701
36-
matplotlib/backends/backend_cairo.py: E203, E221, E261, E303, E402, E711
37-
matplotlib/backends/backend_gtk3.py: E203, E221, E222, E225, E251, E261, E501
38-
matplotlib/backends/backend_macosx.py: E231, E261
39-
matplotlib/backends/backend_pgf.py: E303, E731
40-
matplotlib/backends/backend_ps.py: E203, E225, E228, E231, E261, E262, E302, E303, E501, E701
41-
matplotlib/backends/backend_svg.py: E203, E225, E228, E231, E261, E302, E501
34+
matplotlib/backends/_backend_tk.py: E203, E222, E225, E301, E401, E501
35+
matplotlib/backends/backend_agg.py: E302
36+
matplotlib/backends/backend_cairo.py: E203, E221, E402
37+
matplotlib/backends/backend_gtk3.py: E203, E221, E222, E225, E251, E501
38+
matplotlib/backends/backend_pgf.py: E731
4239
matplotlib/backends/qt_editor/formlayout.py: E301, E501
43-
matplotlib/backends/tkagg.py: E231, E302, E701
44-
matplotlib/backends/windowing.py: E301, E302
45-
matplotlib/font_manager.py: E203, E221, E251, E261, E262, E302, E501
46-
matplotlib/fontconfig_pattern.py: E201, E203, E221, E222, E225, E302
47-
matplotlib/legend_handler.py: E201, E501
48-
matplotlib/mathtext.py: E201, E202, E203, E211, E221, E222, E225, E231, E251, E261, E301, E302, E303, E402, E501
49-
matplotlib/patheffects.py: E231
50-
matplotlib/projections/geo.py: E203, E221, E231, E261, E502
40+
matplotlib/font_manager.py: E203, E221, E251, E501
41+
matplotlib/fontconfig_pattern.py: E201, E203, E221, E222, E225
42+
matplotlib/mathtext.py: E201, E202, E203, E211, E221, E222, E225, E251, E301, E402
43+
matplotlib/projections/geo.py: E203, E221, E502
5144
matplotlib/pylab.py: E501
52-
matplotlib/pyplot.py: E201, E202, E221, E222, E225, E231, E251, E261, E302, E501, E701
53-
matplotlib/rcsetup.py: E203, E225, E261, E302, E501
54-
matplotlib/sphinxext/mathmpl.py: E302
55-
matplotlib/sphinxext/only_directives.py: E302
56-
matplotlib/sphinxext/plot_directive.py: E261, E302, E402
57-
matplotlib/tests/test_image.py: E225, E231, E251, E302, E501
58-
matplotlib/tests/test_lines.py: E231, E261
59-
matplotlib/tests/test_mathtext.py: E261, E501
45+
matplotlib/pyplot.py: E302, E701
46+
matplotlib/rcsetup.py: E203, E225, E501
47+
matplotlib/sphinxext/plot_directive.py: E402
48+
matplotlib/tests/test_mathtext.py: E501
6049
matplotlib/transforms.py: E201, E202, E203, E501
6150
matplotlib/tri/triinterpolate.py: E201, E221
6251
matplotlib/type1font.py: E731
6352

64-
mpl_toolkits/__init__.py: E261
65-
mpl_toolkits/axes_grid/axes_divider.py: E501
66-
mpl_toolkits/axes_grid/axes_rgb.py: E302, E501
53+
mpl_toolkits/axes_grid/axes_rgb.py: E501
6754
mpl_toolkits/axes_grid1/axes_divider.py: E402, E501
6855
mpl_toolkits/axes_grid1/axes_grid.py: E225
69-
mpl_toolkits/axes_grid1/axes_rgb.py: E231
70-
mpl_toolkits/axes_grid1/axes_size.py: E261, E501
71-
mpl_toolkits/axes_grid1/colorbar.py: E225, E231, E261, E262, E302, E303, E501, E701
56+
mpl_toolkits/axes_grid1/axes_size.py: E272, E501
57+
mpl_toolkits/axes_grid1/colorbar.py: E225, E501
7258
mpl_toolkits/axes_grid1/inset_locator.py: E501
73-
mpl_toolkits/axes_grid1/mpl_axes.py: E303, E501
74-
mpl_toolkits/axes_grid1/parasite_axes.py: E225, E231, E302, E303, E501
75-
mpl_toolkits/axisartist/angle_helper.py: E201, E203, E221, E222, E225, E231, E251, E261, E262, E302, E303, E501
76-
mpl_toolkits/axisartist/axis_artist.py: E201, E202, E221, E225, E228, E231, E251, E261, E262, E302, E303, E402, E501, E701, E711
77-
mpl_toolkits/axisartist/axisline_style.py: E231, E261, E262, E302, E303
78-
mpl_toolkits/axisartist/axislines.py: E225, E231, E261, E303, E501
79-
mpl_toolkits/axisartist/clip_path.py: E225, E302, E303, E501
80-
mpl_toolkits/axisartist/floating_axes.py: E225, E231, E261, E262, E302, E303, E402, E501
81-
mpl_toolkits/axisartist/grid_finder.py: E231, E261, E302, E303, E402
82-
mpl_toolkits/axisartist/grid_helper_curvelinear.py: E225, E231, E261, E262, E271, E302, E303, E501
83-
mpl_toolkits/mplot3d/art3d.py: E222, E225
84-
mpl_toolkits/mplot3d/axes3d.py: E203, E231, E402, E501, E701
85-
mpl_toolkits/mplot3d/axis3d.py: E231, E302
86-
mpl_toolkits/mplot3d/proj3d.py: E231, E302, E303
59+
mpl_toolkits/axes_grid1/mpl_axes.py: E501
60+
mpl_toolkits/axisartist/angle_helper.py: E221
61+
mpl_toolkits/axisartist/axislines.py: E225, E501
62+
mpl_toolkits/axisartist/clip_path.py: E225, E501
63+
mpl_toolkits/axisartist/floating_axes.py: E225, E402, E501
64+
mpl_toolkits/axisartist/grid_helper_curvelinear.py: E225, E501
8765
mpl_toolkits/tests/test_axes_grid1.py: E201, E202
88-
mpl_toolkits/tests/test_mplot3d.py: E231, E302
8966

9067
doc/conf.py: E402, E501
9168
doc/sphinxext/github.py: E302, E501
@@ -97,6 +74,7 @@ per-file-ignores =
9774
tutorials/advanced/transforms_tutorial.py: E402, E501
9875
tutorials/colors/colormaps.py: E501
9976
tutorials/colors/colors.py: E402
77+
tutorials/colors/colormap-manipulation.py: E402
10078
tutorials/intermediate/artists.py: E402, E501
10179
tutorials/intermediate/constrainedlayout_guide.py: E402, E501
10280
tutorials/intermediate/gridspec.py: E402, E501
@@ -125,6 +103,7 @@ per-file-ignores =
125103
examples/color/color_demo.py: E402
126104
examples/color/colorbar_basics.py: E402
127105
examples/color/colormap_reference.py: E402
106+
examples/color/custom_cmap.py: E402
128107
examples/color/named_colors.py: E402
129108
examples/event_handling/data_browser.py: E501
130109
examples/event_handling/path_editor.py: E501
@@ -140,7 +119,6 @@ per-file-ignores =
140119
examples/images_contours_and_fields/contourf_demo.py: E402, E501
141120
examples/images_contours_and_fields/contourf_hatching.py: E402
142121
examples/images_contours_and_fields/contourf_log.py: E402
143-
examples/images_contours_and_fields/custom_cmap.py: E402
144122
examples/images_contours_and_fields/demo_bboximage.py: E402
145123
examples/images_contours_and_fields/image_clip_path.py: E402
146124
examples/images_contours_and_fields/image_demo.py: E402
@@ -173,7 +151,7 @@ per-file-ignores =
173151
examples/lines_bars_and_markers/joinstyle.py: E402
174152
examples/lines_bars_and_markers/scatter_piecharts.py: E402
175153
examples/lines_bars_and_markers/span_regions.py: E402
176-
examples/misc/agg_oo_sgskip.py: E402
154+
examples/misc/agg_buffer.py: E402
177155
examples/misc/anchored_artists.py: E501
178156
examples/misc/contour_manual.py: E501
179157
examples/misc/font_indexing.py: E501
@@ -185,6 +163,7 @@ per-file-ignores =
185163
examples/misc/table_demo.py: E201
186164
examples/mplot3d/voxels.py: E501
187165
examples/mplot3d/wire3d_zero_stride.py: E501
166+
examples/pie_and_polar_charts/bar_of_pie.py: E402
188167
examples/pie_and_polar_charts/nested_pie.py: E402
189168
examples/pie_and_polar_charts/pie_and_donut_labels.py: E402
190169
examples/pie_and_polar_charts/pie_demo2.py: E402
@@ -197,11 +176,11 @@ per-file-ignores =
197176
examples/pyplots/annotate_transform.py: E228, E251, E402, E501
198177
examples/pyplots/annotation_basic.py: E402
199178
examples/pyplots/annotation_polar.py: E231, E402
200-
examples/pyplots/auto_subplots_adjust.py: E231, E261, E302, E402
179+
examples/pyplots/auto_subplots_adjust.py: E231, E302, E402
201180
examples/pyplots/boxplot_demo_pyplot.py: E231, E402
202181
examples/pyplots/compound_path_demo.py: E231
203182
examples/pyplots/dollar_ticks.py: E402
204-
examples/pyplots/fig_axes_customize_simple.py: E261, E402
183+
examples/pyplots/fig_axes_customize_simple.py: E402
205184
examples/pyplots/fig_axes_labels_simple.py: E402
206185
examples/pyplots/fig_x.py: E402
207186
examples/pyplots/pyplot_formatstr.py: E231, E402
@@ -215,12 +194,12 @@ per-file-ignores =
215194
examples/pyplots/text_commands.py: E231, E402
216195
examples/pyplots/text_layout.py: E231, E402
217196
examples/pyplots/whats_new_1_subplot3d.py: E402
218-
examples/pyplots/whats_new_98_4_fancy.py: E225, E261, E302, E402
197+
examples/pyplots/whats_new_98_4_fancy.py: E302, E402
219198
examples/pyplots/whats_new_98_4_fill_between.py: E225, E402
220199
examples/pyplots/whats_new_98_4_legend.py: E228, E402
221200
examples/pyplots/whats_new_99_axes_grid.py: E402
222201
examples/pyplots/whats_new_99_mplot3d.py: E402
223-
examples/pyplots/whats_new_99_spines.py: E231, E261, E402
202+
examples/pyplots/whats_new_99_spines.py: E231, E402
224203
examples/recipes/placing_text_boxes.py: E501
225204
examples/scales/power_norm.py: E402
226205
examples/shapes_and_collections/artist_reference.py: E402
@@ -254,6 +233,7 @@ per-file-ignores =
254233
examples/subplots_axes_and_figures/demo_constrained_layout.py: E402
255234
examples/subplots_axes_and_figures/demo_tight_layout.py: E402
256235
examples/subplots_axes_and_figures/two_scales.py: E402
236+
examples/subplots_axes_and_figures/zoom_inset_axes.py: E402
257237
examples/tests/backend_driver_sgskip.py: E402, E501
258238
examples/text_labels_and_annotations/annotation_demo.py: E501
259239
examples/text_labels_and_annotations/custom_legends.py: E402
@@ -265,6 +245,7 @@ per-file-ignores =
265245
examples/text_labels_and_annotations/tex_demo.py: E402
266246
examples/text_labels_and_annotations/watermark_text.py: E402
267247
examples/ticks_and_spines/auto_ticks.py: E501
248+
examples/user_interfaces/canvasagg.py: E402
268249
examples/user_interfaces/embedding_in_gtk3_panzoom_sgskip.py: E402
269250
examples/user_interfaces/embedding_in_gtk3_sgskip.py: E402
270251
examples/user_interfaces/embedding_in_qt_sgskip.py: E402

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
## PR Checklist
44

55
- [ ] Has Pytest style unit tests
6-
- [ ] Code is PEP 8 compliant
6+
- [ ] Code is [Flake 8](http://flake8.pycqa.org/en/latest/) compliant
77
- [ ] New features are documented, with examples if plot related
88
- [ ] Documentation is sphinx and numpydoc compliant
99
- [ ] Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,13 @@ doc/tutorials
6767
doc/modules
6868
doc/pyplots/tex_demo.png
6969
lib/dateutil
70+
examples/*/*.eps
7071
examples/*/*.pdf
7172
examples/*/*.png
7273
examples/*/*.svg
73-
examples/*/*.eps
7474
examples/*/*.svgz
7575
examples/tests/*
76-
!examples/tests/backend_driver.py
76+
!examples/tests/backend_driver_sgskip.py
7777
result_images
7878

7979
# Nose/Pytest generated files #

.travis.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
language: python
22

3-
dist: trusty
3+
dist: xenial
44
sudo: false
55

66
branches:
@@ -63,23 +63,23 @@ env:
6363
- NPROC=2
6464
- OPENBLAS_NUM_THREADS=1
6565
- PYTHONFAULTHANDLER=1
66-
- PYTEST_ADDOPTS="-rawR --maxfail=50 --timeout=300 --durations=25 --cov-report= --cov=lib -n $NPROC"
66+
- PYTEST_ADDOPTS="-raR --maxfail=50 --timeout=300 --durations=25 --cov-report= --cov=lib -n $NPROC"
6767
- RUN_FLAKE8=
6868

6969
matrix:
7070
include:
7171
- python: 3.5
72+
dist: trusty
7273
# pytest-cov>=2.3.1 due to https://github.com/pytest-dev/pytest-cov/issues/124.
7374
env:
7475
- PINNEDVERS='-c requirements/testing/travis35.txt'
75-
- python: 3.5
76-
env:
77-
# - PYTHONOPTIMIZE=2 # This currently doesn't work.
7876
- python: 3.6
7977
env:
8078
- DELETE_FONT_CACHE=1
8179
- EXTRAREQS='-r requirements/testing/travis36.txt'
8280
- RUN_FLAKE8=1
81+
- python: 3.7
82+
sudo: true
8383
- python: "nightly"
8484
env: PRE=--pre
8585
- os: osx

INSTALL.rst

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
.. _pip: https://pypi.python.org/pypi/pip/
2-
31
==========
42
Installing
53
==========
@@ -42,7 +40,7 @@ Test data
4240
---------
4341

4442
The wheels (:file:`*.whl`) on the `PyPI download page
45-
<https://pypi.python.org/pypi/matplotlib/>`_ do not contain test data
43+
<https://pypi.org/project/matplotlib/>`_ do not contain test data
4644
or example code.
4745

4846
If you want to try the many demos that come in the Matplotlib source
@@ -53,7 +51,7 @@ To run the test suite:
5351

5452
* extract the :file:`lib/matplotlib/tests` or :file:`lib/mpl_toolkits/tests`
5553
directories from the source distribution;
56-
* install test dependencies: `pytest <https://pypi.python.org/pypi/pytest>`_,
54+
* install test dependencies: `pytest <https://pypi.org/project/pytest>`_,
5755
Pillow, MiKTeX, GhostScript, ffmpeg, avconv, ImageMagick, and `Inkscape
5856
<https://inkscape.org/>`_;
5957
* run ``python -mpytest``.
@@ -94,9 +92,9 @@ If you are interested in contributing to Matplotlib development,
9492
running the latest source code, or just like to build everything
9593
yourself, it is not difficult to build Matplotlib from source. Grab
9694
the latest *tar.gz* release file from `the PyPI files page
97-
<https://pypi.python.org/pypi/matplotlib/>`_, or if you want to
95+
<https://pypi.org/project/matplotlib/>`_, or if you want to
9896
develop Matplotlib or just need the latest bugfixed version, grab the
99-
latest git version :ref:`install-from-git`.
97+
latest git version, and see :ref:`install-from-git`.
10098

10199
The standard environment variables `CC`, `CXX`, `PKG_CONFIG` are respected.
102100
This means you can set them if your toolchain is prefixed. This may be used for
@@ -138,10 +136,10 @@ Matplotlib requires the following dependencies:
138136
* `Python <https://www.python.org/downloads/>`_ (>= 3.5)
139137
* `FreeType <https://www.freetype.org/>`_ (>= 2.3)
140138
* `libpng <http://www.libpng.org>`_ (>= 1.2)
141-
* `NumPy <http://www.numpy.org>`_ (>= |minimum_numpy_version|)
139+
* `NumPy <http://www.numpy.org>`_ (>= 1.10.0)
142140
* `setuptools <https://setuptools.readthedocs.io/en/latest/>`_
143141
* `cycler <http://matplotlib.org/cycler/>`_ (>= 0.10.0)
144-
* `dateutil <https://pypi.python.org/pypi/python-dateutil>`_ (>= 2.1)
142+
* `dateutil <https://pypi.org/project/python-dateutil>`_ (>= 2.1)
145143
* `kiwisolver <https://github.com/nucleic/kiwi>`_ (>= 1.0.0)
146144
* `pyparsing <https://pyparsing.wikispaces.com/>`_
147145

@@ -150,17 +148,18 @@ interface toolkits. See :ref:`what-is-a-backend` for more details on the
150148
optional Matplotlib backends and the capabilities they provide.
151149

152150
* :term:`tk` (>= 8.3, != 8.6.0 or 8.6.1): for the Tk-based backends;
153-
* `PyQt4 <https://pypi.python.org/pypi/PyQt4>`_ (>= 4.4) or
154-
`PySide <https://pypi.python.org/pypi/PySide>`_: for the Qt4-based backends;
155-
* `PyQt5 <https://pypi.python.org/pypi/PyQt5>`_: for the Qt5-based backends;
151+
* `PyQt4 <https://pypi.org/project/PyQt4>`_ (>= 4.6) or
152+
`PySide <https://pypi.org/project/PySide>`_ (>= 1.0.3): for the Qt4-based
153+
backends;
154+
* `PyQt5 <https://pypi.org/project/PyQt5>`_: for the Qt5-based backends;
156155
* `PyGObject <https://pypi.org/project/PyGObject/>`_ or
157156
`pgi <https://pypi.org/project/pgi/>`_ (>= 0.0.11.2): for the GTK3-based
158157
backends;
159158
* :term:`wxpython` (>= 4): for the WX-based backends;
160159
* `cairocffi <https://cairocffi.readthedocs.io/en/latest/>`_ (>= 0.8) or
161-
`pycairo <https://pypi.python.org/pypi/pycairo>`_: for the cairo-based
160+
`pycairo <https://pypi.org/project/pycairo>`_: for the cairo-based
162161
backends;
163-
* `Tornado <https://pypi.python.org/pypi/tornado>`_: for the WebAgg backend;
162+
* `Tornado <https://pypi.org/project/tornado>`_: for the WebAgg backend;
164163

165164
For better support of animation output format and image file formats, LaTeX,
166165
etc., you can install the following:
@@ -251,7 +250,7 @@ Building on Windows
251250
-------------------
252251

253252
The Python shipped from https://www.python.org is compiled with Visual Studio
254-
2015 for 3.5 and 3.6. Python extensions should be compiled with the same
253+
2015 for 3.5+. Python extensions should be compiled with the same
255254
compiler, see e.g.
256255
https://packaging.python.org/guides/packaging-binary-extensions/#setting-up-a-build-environment-on-windows
257256
for how to set up a build environment.
@@ -304,4 +303,4 @@ Conda packages
304303
^^^^^^^^^^^^^^
305304

306305
The conda packaging scripts for Matplotlib are available at
307-
https://github.com/conda-forge/python-feedstock.
306+
https://github.com/conda-forge/matplotlib-feedstock.

README.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
|Travis|_ |AppVeyor|_ |Codecov|_ |PyPi|_ |Gitter|_ |NUMFocus|_
1+
|Travis|_ |AppVeyor|_ |Codecov|_ |LGTM|_ |PyPi|_ |Gitter|_ |NUMFocus|_
22

33

44
.. |Travis| image:: https://travis-ci.org/matplotlib/matplotlib.svg?branch=master
@@ -10,6 +10,9 @@
1010
.. |Codecov| image:: https://codecov.io/github/matplotlib/matplotlib/badge.svg?branch=master&service=github
1111
.. _Codecov: https://codecov.io/github/matplotlib/matplotlib?branch=master
1212

13+
.. |LGTM| image:: https://img.shields.io/lgtm/grade/python/g/matplotlib/matplotlib.svg?logo=lgtm&logoWidth=18
14+
.. _LGTM: https://lgtm.com/projects/g/matplotlib/matplotlib
15+
1316
.. |PyPi| image:: https://badge.fury.io/py/matplotlib.svg
1417
.. _PyPi: https://badge.fury.io/py/matplotlib
1518

doc/_static/brokenaxes.png

17 KB
Loading

0 commit comments

Comments
 (0)