Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 937d5be

Browse files
authored
Merge branch 'master' into more-normals
2 parents ac8f801 + 3ba79fb commit 937d5be

File tree

325 files changed

+6800
-8511
lines changed

Some content is hidden

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

325 files changed

+6800
-8511
lines changed

.appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ install:
6363
- activate test-environment
6464
- echo %PYTHON_VERSION% %TARGET_ARCH%
6565
# pytest-cov>=2.3.1 due to https://github.com/pytest-dev/pytest-cov/issues/124
66-
- pip install -q "pytest!=3.3.0,>=3.2.0" "pytest-cov>=2.3.1" pytest-rerunfailures pytest-timeout pytest-xdist
66+
- pip install -q "pytest>=3.4" "pytest-cov>=2.3.1" pytest-rerunfailures pytest-timeout pytest-xdist
6767

6868
# Apply patch to `subprocess` on Python versions > 2 and < 3.6.3
6969
# https://github.com/matplotlib/matplotlib/issues/9176

.circleci/config.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,19 +52,19 @@ pip-run: &pip-install
5252
# Upgrade pip and setuptools and wheel to get as clean an install as possible
5353
name: Upgrade pip, setuptools, wheel
5454
command: |
55-
pip install --upgrade --user pip
56-
pip install --upgrade --user wheel
57-
pip install --upgrade --user setuptools
55+
python -mpip install --upgrade --user pip
56+
python -mpip install --upgrade --user wheel
57+
python -mpip install --upgrade --user setuptools
5858
5959
deps-run: &deps-install
6060
name: Install Python dependencies
6161
command: |
62-
pip install --user numpy${NUMPY_VERSION} codecov coverage
63-
pip install --user -r doc-requirements.txt
62+
python -mpip install --user numpy${NUMPY_VERSION} codecov coverage
63+
python -mpip install --user -r doc-requirements.txt
6464
6565
mpl-run: &mpl-install
6666
name: Install Matplotlib
67-
command: pip install --user -ve .
67+
command: python -mpip install --user -ve .
6868

6969
doc-run: &doc-build
7070
name: Build documentation

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,6 @@ examples/*/*.eps
7474
examples/*/*.svgz
7575
examples/tests/*
7676
!examples/tests/backend_driver.py
77-
texput.log
78-
texput.aux
7977
result_images
8078

8179
# Nose/Pytest generated files #

.travis.yml

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,16 @@ addons:
1818
paths:
1919
- result_images.tar.bz2
2020
apt:
21+
sources:
22+
- sourceline: ppa:jonathonf/ffmpeg-3
2123
packages:
2224
- cm-super
2325
- dvipng
26+
- ffmpeg
2427
- gdb
2528
- gir1.2-gtk-3.0
2629
- graphviz
2730
- inkscape
28-
- libav-tools
2931
- libcairo2
3032
- libgeos-dev
3133
- libgirepository-1.0.1
@@ -45,23 +47,27 @@ env:
4547
- ARTIFACTS_BUCKET=matplotlib-test-results
4648
- secure: RgJI7BBL8aX5FTOQe7xiXqWHMxWokd6GNUWp1NUV2mRLXPb9dI0RXqZt3UJwKTAzf1z/OtlHDmEkBoTVK81E9iUxK5npwyyjhJ8yTJmwfQtQF2n51Q1Ww9p+XSLORrOzZc7kAo6Kw6FIXN1pfctgYq2bQkrwJPRx/oPR8f6hcbY=
4749
- secure: E7OCdqhZ+PlwJcn+Hd6ns9TDJgEUXiUNEI0wu7xjxB2vBRRIKtZMbuaZjd+iKDqCKuVOJKu0ClBUYxmgmpLicTwi34CfTUYt6D4uhrU+8hBBOn1iiK51cl/aBvlUUrqaRLVhukNEBGZcyqAjXSA/Qsnp2iELEmAfOUa92ZYo1sk=
48-
- secure: "dfjNqGKzQG5bu3FnDNwLG8H/C4QoieFo4PfFmZPdM2RY7WIzukwKFNT6kiDfOrpwt+2bR7FhzjOGlDECGtlGOtYPN8XuXGjhcP4a4IfakdbDfF+D3NPIpf5VlE6776k0VpvcZBTMYJKNFIMc7QPkOwjvNJ2aXyfe3hBuGlKJzQU="
50+
- secure: dfjNqGKzQG5bu3FnDNwLG8H/C4QoieFo4PfFmZPdM2RY7WIzukwKFNT6kiDfOrpwt+2bR7FhzjOGlDECGtlGOtYPN8XuXGjhcP4a4IfakdbDfF+D3NPIpf5VlE6776k0VpvcZBTMYJKNFIMc7QPkOwjvNJ2aXyfe3hBuGlKJzQU=
51+
# Variables controlling Python dependencies.
4952
- CYCLER=cycler
5053
- DATEUTIL=python-dateutil
5154
- NOSE=
5255
- NUMPY=numpy
5356
- PANDAS=
5457
- PYPARSING=pyparsing
55-
- PYTEST='pytest!=3.3.0,>=3.2.0'
58+
- PYTEST='pytest>=3.4'
5659
- PYTEST_COV=pytest-cov
5760
- PYTEST_PEP8=
5861
- SPHINX=sphinx
59-
- OPENBLAS_NUM_THREADS=1
62+
# Variables controlling the test run.
63+
- DELETE_FONT_CACHE=
64+
- NO_AT_BRIDGE=1 # Necessary for GTK3 interactive test.
6065
- NPROC=2
61-
- RUN_PEP8=
66+
- OPENBLAS_NUM_THREADS=1
67+
- PYTHONFAULTHANDLER=1
6268
- PYTEST_ARGS="-rawR --maxfail=50 --timeout=300 --durations=25 --cov-report= --cov=lib -n $NPROC"
6369
- PYTHON_ARGS=
64-
- DELETE_FONT_CACHE=
70+
- RUN_PEP8=
6571

6672
matrix:
6773
include:
@@ -74,7 +80,7 @@ matrix:
7480
- NUMPY=numpy==1.10.0
7581
- PANDAS='pandas<0.21.0'
7682
- PYPARSING=pyparsing==2.0.1
77-
- PYTEST=pytest==3.1.0
83+
- PYTEST=pytest==3.4
7884
- PYTEST_COV=pytest-cov==2.3.1
7985
- SPHINX=sphinx==1.3
8086
- python: 3.5
@@ -131,15 +137,16 @@ install:
131137
codecov \
132138
coverage \
133139
$CYCLER \
140+
$DATEUTIL \
134141
$NOSE \
135142
$NUMPY \
136143
$PANDAS \
137144
codecov \
138145
coverage \
139146
pillow \
140147
$PYPARSING \
141-
$DATEUTIL \
142-
$SPHINX
148+
$SPHINX \
149+
tornado
143150
# GUI toolkits are pip-installable only for some versions of Python so
144151
# don't fail if we can't install them. Make it easier to check whether the
145152
# install was successful by trying to import the toolkit (sometimes, the
@@ -149,7 +156,7 @@ install:
149156
python -c 'import pgi as gi; gi.require_version("Gtk", "3.0"); from pgi.repository import Gtk' &&
150157
echo 'pgi is available' ||
151158
echo 'pgi is not available'
152-
python -mpip install pyqt5==5.9 &&
159+
python -mpip install pyqt5 &&
153160
python -c 'import PyQt5.QtCore' &&
154161
echo 'PyQt5 is available' ||
155162
echo 'PyQt5 is not available'

INSTALL.rst

Lines changed: 24 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ Installing
1414
Installing an official release
1515
==============================
1616

17-
Matplotlib and most of its dependencies are all available as wheel
18-
packages for macOS, Windows and Linux distributions::
17+
Matplotlib and its dependencies are available as wheel packages for macOS,
18+
Windows and Linux distributions::
1919

2020
python -mpip install -U pip
2121
python -mpip install -U matplotlib
@@ -32,14 +32,12 @@ Although not required, we suggest also installing ``IPython`` for
3232
interactive use. To easily install a complete Scientific Python
3333
stack, see :ref:`install_scipy_dists` below.
3434

35-
3635
macOS
3736
-----
3837

3938
To use the native OSX backend you will need :ref:`a framework build
4039
<osxframework-faq>` build of Python.
4140

42-
4341
Test Data
4442
---------
4543

@@ -51,14 +49,13 @@ distribution, download the :file:`*.tar.gz` file and look in the
5149
:file:`examples` subdirectory.
5250
To run the test suite:
5351

54-
* extract the :file:`lib\\matplotlib\\tests` or
55-
:file:`lib\\mpl_toolkits\\tests` directories from the source distribution;
52+
* extract the :file:`lib/matplotlib/tests` or
53+
:file:`lib/mpl_toolkits/tests` directories from the source distribution;
5654
* install test dependencies: `pytest <https://pypi.python.org/pypi/pytest>`_,
5755
Pillow, MiKTeX, GhostScript, ffmpeg, avconv, ImageMagick, and `Inkscape
5856
<https://inkscape.org/>`_;
5957
* run ``pytest path\to\tests\directory``.
6058

61-
6259
Third-party distributions of Matplotlib
6360
=======================================
6461

@@ -75,7 +72,6 @@ Linux platforms. `WinPython <https://winpython.github.io/>`__ is an
7572
option for windows users. All of these distributions include
7673
Matplotlib and *lots* of other useful (data) science tools.
7774

78-
7975
Linux : using your package manager
8076
----------------------------------
8177

@@ -87,8 +83,6 @@ is packaged for almost every major Linux distribution.
8783
* Red Hat: ``sudo yum install python3-matplotlib``
8884
* Arch: ``sudo pacman -S python-matplotlib``
8985

90-
91-
9286
.. _install_from_source:
9387

9488
Installing from source
@@ -137,7 +131,7 @@ e.g., if the header of some required library is in
137131
Dependencies
138132
------------
139133

140-
Matplotlib requires a large number of dependencies:
134+
Matplotlib requires the following dependencies:
141135

142136
* `Python <https://www.python.org/downloads/>`_ (>= 3.5)
143137
* `NumPy <http://www.numpy.org>`_ (>= |minimum_numpy_version|)
@@ -148,7 +142,7 @@ Matplotlib requires a large number of dependencies:
148142
* `pytz <http://pytz.sourceforge.net/>`__
149143
* FreeType (>= 2.3)
150144
* `cycler <http://matplotlib.org/cycler/>`__ (>= 0.10.0)
151-
* `six <https://pypi.python.org/pypi/six>`_
145+
* `six <https://pypi.python.org/pypi/six>`_ (>= 1.10)
152146
* `kiwisolver <https://github.com/nucleic/kiwi>`__ (>= 1.0.0)
153147

154148
Optionally, you can also install a number of packages to enable better user
@@ -172,18 +166,17 @@ etc., you can install the following:
172166
<https://libav.org/avconv.html>`_: for saving movies;
173167
* `ImageMagick <https://www.imagemagick.org/script/index.php>`_: for saving
174168
animated gifs;
175-
* `Pillow <https://pillow.readthedocs.io/en/latest/>`_ (>=2.0): for a larger selection of
169+
* `Pillow <https://pillow.readthedocs.io/en/latest/>`_ (>=3.4): for a larger selection of
176170
image file formats: JPEG, BMP, and TIFF image files;
177171
* `LaTeX <https://miktex.org/>`_ and `GhostScript
178172
<https://ghostscript.com/download/>`_ (for rendering text with LaTeX).
179173

180174
.. note::
181175

182-
Matplotlib depends on a large number of non-Python libraries.
183-
`pkg-config <https://www.freedesktop.org/wiki/Software/pkg-config/>`__
184-
can be used to find required non-Python libraries and thus make the install
185-
go more smoothly if the libraries and headers are not in the expected
186-
locations.
176+
Matplotlib depends on non-Python libraries. `pkg-config
177+
<https://www.freedesktop.org/wiki/Software/pkg-config/>`__ can be used
178+
to find required non-Python libraries and thus make the install go more
179+
smoothly if the libraries and headers are not in the expected locations.
187180

188181
.. note::
189182

@@ -218,7 +211,6 @@ Matplotlib by first installing ``yum-builddep`` and then running::
218211
These commands do not build Matplotlib, but instead get and install the
219212
build dependencies, which will make building from source easier.
220213

221-
222214
.. _build_osx:
223215

224216
Building on macOS
@@ -250,22 +242,21 @@ found that, to run the tests, their PYTHONPATH must include
250242
/path/to/anaconda/.../site-packages and their DYLD_FALLBACK_LIBRARY_PATH
251243
must include /path/to/anaconda/lib.
252244

253-
254245
.. _build_windows:
255246

256247
Building on Windows
257248
-------------------
258249

259250
The Python shipped from https://www.python.org is compiled with Visual Studio
260-
2008 for versions before 3.3, Visual Studio 2010 for 3.3 and 3.4, and
261-
Visual Studio 2015 for 3.5 and 3.6. Python extensions are recommended to be compiled
262-
with the same compiler.
251+
2015 for 3.5 and 3.6. Python extensions should be compiled with the same
252+
compiler, see e.g.
253+
https://packaging.python.org/guides/packaging-binary-extensions/#setting-up-a-build-environment-on-windows
254+
for how to set up a build environment.
263255

264256
Since there is no canonical Windows package manager, the methods for building
265257
FreeType, zlib, and libpng from source code are documented as a build script
266258
at `matplotlib-winbuild <https://github.com/jbmohler/matplotlib-winbuild>`_.
267259

268-
269260
There are a few possibilities to build Matplotlib on Windows:
270261

271262
* Wheels via `matplotlib-winbuild <https://github.com/jbmohler/matplotlib-winbuild>`_
@@ -275,17 +266,14 @@ There are a few possibilities to build Matplotlib on Windows:
275266
Wheel builds using conda packages
276267
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
277268

278-
This is a wheel build, but we use conda packages to get all the requirements. The binary
279-
requirements (png, FreeType,...) are statically linked and therefore not needed during the wheel
280-
install.
269+
This is a wheel build, but we use conda packages to get all the requirements.
270+
The binary requirements (png, FreeType,...) are statically linked and therefore
271+
not needed during the wheel install.
281272

282-
The commands below assume that you can compile a native Python lib for the Python version of your
283-
choice. See `this howto <https://blog.ionelmc.ro/2014/12/21/compiling-python-extensions-on-windows/>`_
284-
for how to install and setup such environments. If in doubt: use Python >= 3.5 as it mostly works
285-
without fiddling with environment variables::
273+
::
286274

287275
# create a new environment with the required packages
288-
conda create -n "matplotlib_build" python=3.5 numpy python-dateutil pyparsing pytz tornado "cycler>=0.10" tk libpng zlib freetype
276+
conda create -n "matplotlib_build" python=3.5 numpy python-dateutil pyparsing pytz tornado cycler tk libpng zlib freetype
289277
activate matplotlib_build
290278
# if you want a qt backend, you also have to install pyqt (be aware that pyqt doesn't mix well if
291279
# you have created the environment with conda-forge already activated...)
@@ -294,38 +282,23 @@ without fiddling with environment variables::
294282
conda install -c conda-forge msinttypes
295283

296284
# copy the libs which have "wrong" names
297-
set LIBRARY_LIB=%CONDA_DEFAULT_ENV%\Library\lib
285+
set LIBRARY_LIB=%CONDA_PREFIX%\Library\lib
298286
mkdir lib || cmd /c "exit /b 0"
299287
copy %LIBRARY_LIB%\zlibstatic.lib lib\z.lib
300288
copy %LIBRARY_LIB%\libpng_static.lib lib\png.lib
301289

302290
# Make the header files and the rest of the static libs available during the build
303291
# CONDA_DEFAULT_ENV is a env variable which is set to the currently active environment path
304-
set MPLBASEDIRLIST=%CONDA_DEFAULT_ENV%\Library\;.
292+
set MPLBASEDIRLIST=%CONDA_PREFIX%\Library\;.
305293

306294
# build the wheel
307295
python setup.py bdist_wheel
308296

309297
The `build_alllocal.cmd` script in the root folder automates these steps if
310298
you have already created and activated the conda environment.
311299

312-
313300
Conda packages
314301
^^^^^^^^^^^^^^
315302

316-
This needs a `working installed C compiler
317-
<https://blog.ionelmc.ro/2014/12/21/compiling-python-extensions-on-windows/>`_
318-
for the version of Python you are compiling the package for but you don't need
319-
to setup the environment variables::
320-
321-
# only the first time...
322-
conda install conda-build
323-
324-
# the Python version you want a package for...
325-
set CONDA_PY=3.5
326-
327-
# builds the package, using a clean build environment
328-
conda build ci\conda_recipe
329-
330-
# install the new package
331-
conda install --use-local matplotlib
303+
The conda packaging scripts for Matplotlib are available at
304+
https://github.com/conda-forge/python-feedstock.

README.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,3 +84,5 @@ You've worked out a way to fix it – even better!
8484
You want to tell us about it – best of all!
8585

8686
Start at the `contributing guide <http://matplotlib.org/devdocs/devel/contributing.html>`_!
87+
88+
Developer notes are now at `Developer Discussions <https://github.com/orgs/matplotlib/teams/developers/discussions>`_

build_alllocal.cmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
:: This assumes you have installed all the dependencies via conda packages:
22
:: # create a new environment with the required packages
3-
:: conda create -n "matplotlib_build" python=3.4 numpy python-dateutil pyparsing pytz tornado "cycler>=0.10" tk libpng zlib freetype
3+
:: conda create -n "matplotlib_build" python=3.5 numpy python-dateutil pyparsing pytz tornado cycler tk libpng zlib freetype
44
:: activate matplotlib_build
55
:: if you want qt backend, you also have to install pyqt
66
:: conda install pyqt

doc-requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# Install the documentation requirements with:
77
# pip install -r doc-requirements.txt
88
#
9-
sphinx>=1.3,!=1.5.0,!=1.6.4
9+
sphinx>=1.3,!=1.5.0,!=1.6.4,!=1.7.3
1010
colorspacious
1111
ipython
1212
ipywidgets

0 commit comments

Comments
 (0)