Skip to content

Commit 665be24

Browse files
committed
Merge branch 'master' into tex_gallery
2 parents 5d1f225 + 2063e81 commit 665be24

224 files changed

Lines changed: 5289 additions & 976 deletions

File tree

Some content is hidden

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

.travis.yml

Lines changed: 10 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -48,26 +48,26 @@ env:
4848
- PYTEST_ARGS="-ra --maxfail=1 --timeout=300 --durations=25 --cov-report= --cov=lib -n $NPROC"
4949
- PYTHON_ARGS=
5050
- DELETE_FONT_CACHE=
51-
- USE_PYTEST=false
5251

5352
matrix:
5453
include:
5554
- python: 2.7
56-
env: MOCK=mock NUMPY=numpy==1.7.1
55+
env: MOCK=mock NUMPY=numpy==1.7.1 PANDAS=pandas
56+
- python: 2.7
57+
env: BUILD_DOCS=true
5758
- python: 3.4
5859
env: PYTHON_ARGS=-OO
5960
- python: 3.5
6061
env: BUILD_DOCS=true
61-
- python: 3.5
62-
env: USE_PYTEST=true PANDAS=pandas DELETE_FONT_CACHE=1
6362
- python: 3.6
64-
env: USE_PYTEST=true DELETE_FONT_CACHE=1 INSTALL_PEP8=pytest-pep8 RUN_PEP8=--pep8
63+
env: DELETE_FONT_CACHE=1 INSTALL_PEP8=pytest-pep8 RUN_PEP8=--pep8
6564
- python: "nightly"
6665
env: PRE=--pre
6766
- os: osx
6867
osx_image: xcode7.3
6968
language: generic # https://github.com/travis-ci/travis-ci/issues/2312
7069
env: MOCK=mock
70+
only: master
7171
cache:
7272
# As for now travis caches only "$HOME/.cache/pip"
7373
# https://docs.travis-ci.com/user/caching/#pip-cache
@@ -102,9 +102,12 @@ before_install:
102102
fi
103103
104104
install:
105+
# Upgrade pip and setuptools. Mock has issues with the default version of
106+
# setuptools
105107
- |
106108
# Setup environment
107109
ccache -s
110+
git describe
108111
# Upgrade pip and setuptools and wheel to get as clean an install as possible
109112
pip install --upgrade pip
110113
pip install --upgrade wheel
@@ -138,46 +141,8 @@ install:
138141
# Install matplotlib
139142
pip install -ve .
140143
141-
script:
142-
# The number of processes is hardcoded, because using too many causes the
143-
# Travis VM to run out of memory (since so many copies of inkscape and
144-
# ghostscript are running at the same time).
145-
- |
146-
echo Testing import of tkagg backend
147-
MPLBACKEND="tkagg" python -c 'import matplotlib.pyplot as plt; print(plt.get_backend())'
148-
if [[ $BUILD_DOCS == false ]]; then
149-
if [[ $DELETE_FONT_CACHE == 1 ]]; then
150-
rm -rf ~/.cache/matplotlib
151-
fi
152-
# Workaround for pytest-xdist flaky collection order
153-
# https://github.com/pytest-dev/pytest/issues/920
154-
# https://github.com/pytest-dev/pytest/issues/1075
155-
export PYTHONHASHSEED=$(python -c 'import random; print(random.randint(1, 4294967295))')
156-
echo PYTHONHASHSEED=$PYTHONHASHSEED
157-
158-
echo The following args are passed to pytest $PYTEST_ARGS $RUN_PEP8
159-
if [[ $USE_PYTEST == false ]]; then
160-
if [[ $TRAVIS_OS_NAME == 'osx' ]]; then
161-
python tests.py $PYTEST_ARGS $RUN_PEP8
162-
else
163-
gdb -return-child-result -batch -ex r -ex bt --args python $PYTHON_ARGS tests.py $PYTEST_ARGS $RUN_PEP8
164-
fi
165-
else
166-
py.test $PYTEST_ARGS $RUN_PEP8
167-
fi
168-
else
169-
cd doc
170-
python make.py html -n 2
171-
# We don't build the LaTeX docs here, so linkchecker will complain
172-
touch build/html/Matplotlib.pdf
173-
# Linkchecker only works with python 2.7 for the time being
174-
deactivate
175-
source ~/virtualenv/python2.7/bin/activate
176-
pip install pip --upgrade
177-
# linkchecker is currently broken with requests 2.10.0 so force an earlier version
178-
pip install $PRE requests==2.9.2 linkchecker
179-
linkchecker build/html/index.html
180-
fi
144+
script: source ci/travis/test_script.sh
145+
before_cache:
181146
- rm -rf $HOME/.cache/matplotlib/tex.cache
182147
- rm -rf $HOME/.cache/matplotlib/test_cache
183148

Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ clean:
2121

2222
release: ${DISTFILES}
2323
rm -f MANIFEST;\
24-
${PYTHON} license.py ${VERSION} license/LICENSE;\
2524
${PYTHON} setup.py sdist --formats=gztar,zip;
2625

2726
pyback:

README.rst

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,8 @@
1313
.. |PyPi| image:: https://badge.fury.io/py/matplotlib.svg
1414
.. _PyPi: https://badge.fury.io/py/matplotlib
1515

16-
.. |Gitter| image:: https://badges.gitter.im/Join%20Chat.svg
17-
:alt: Join the chat at https://gitter.im/matplotlib/matplotlib
18-
.. _Gitter: https://gitter.im/matplotlib/matplotlib?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
16+
.. |Gitter| image:: https://img.shields.io/gitter/room/nwjs/nw.js.svg
17+
:target: https://gitter.im/matplotlib/matplotlib?utm_source=share-link&utm_medium=link&utm_campaign=share-link
1918

2019
.. |Depsy| image:: http://depsy.org/api/package/pypi/matplotlib/badge.svg
2120
.. _Depsy: http://depsy.org/package/python/matplotlib
@@ -61,11 +60,9 @@ matplotlib's communication channels include active mailing lists:
6160
* `Announcement <https://mail.python.org/mailman/listinfo/matplotlib-announce>`_ mailing list: matplotlib-announce@python.org
6261
* `Development <https://mail.python.org/mailman/listinfo/matplotlib-devel>`_ mailing list: matplotlib-devel@python.org
6362

64-
6563
The first is a good starting point for general questions and discussions.
6664

67-
68-
65+
`Gitter <https://gitter.im/matplotlib/matplotlib>`_ is for coordinating development and asking questions directly related to contributing to matplotlib.
6966

7067
Contribute
7168
==========

appveyor.yml

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ environment:
1515
# Workaround for https://github.com/conda/conda-build/issues/636
1616
PYTHONIOENCODING: "UTF-8"
1717
PYTEST_ARGS: -ra --timeout=300 --durations=25 -n %NUMBER_OF_PROCESSORS% --cov-report= --cov=lib -m "not network"
18-
USE_PYTEST: no
1918
PYTHONHASHSEED: 0 # Workaround for pytest-xdist flaky collection order
2019
# https://github.com/pytest-dev/pytest/issues/920
2120
# https://github.com/pytest-dev/pytest/issues/1075
@@ -37,13 +36,6 @@ environment:
3736
PYTHON_VERSION: "3.5"
3837
TEST_ALL: "no"
3938
CONDA_INSTALL_LOCN: "C:\\Miniconda35-x64"
40-
- TARGET_ARCH: "x64"
41-
CONDA_PY: "35"
42-
CONDA_NPY: "110"
43-
PYTHON_VERSION: "3.5"
44-
TEST_ALL: "no"
45-
CONDA_INSTALL_LOCN: "C:\\Miniconda35-x64"
46-
USE_PYTEST: yes
4739
- TARGET_ARCH: "x86"
4840
CONDA_PY: "27"
4941
CONDA_NPY: "18"
@@ -63,8 +55,12 @@ platform:
6355
# all our python builds have to happen in tests_script...
6456
build: false
6557

58+
cache:
59+
- '%LOCALAPPDATA%\pip\Cache'
60+
- '%USERPROFILE%\.cache\matplotlib'
61+
6662
init:
67-
- cmd: "ECHO %PYTHON_VERSION% PYTEST=%USE_PYTEST% %CONDA_INSTALL_LOCN%"
63+
- cmd: "ECHO %PYTHON_VERSION% %CONDA_INSTALL_LOCN%"
6864

6965
install:
7066
- cmd: set PATH=%CONDA_INSTALL_LOCN%;%CONDA_INSTALL_LOCN%\scripts;%PATH%;
@@ -136,10 +132,9 @@ test_script:
136132
- python -c "import matplotlib as m; m.use('tkagg'); import matplotlib.pyplot as plt; print(plt.get_backend())"
137133
# tests
138134
- echo The following args are passed to pytest %PYTEST_ARGS%
139-
- if x%USE_PYTEST% == xyes py.test %PYTEST_ARGS%
140-
- if x%USE_PYTEST% == xno python tests.py %PYTEST_ARGS%
135+
- python tests.py %PYTEST_ARGS%
141136
# Generate a html for visual tests
142-
- python visual_tests.py
137+
- python tools/visualize_tests.py --no-browser
143138
- pip install codecov
144139
- codecov -e PYTHON_VERSION PLATFORM
145140

@@ -180,7 +175,7 @@ artifacts:
180175
on_finish:
181176

182177
on_failure:
183-
- python visual_tests.py
178+
- python tools/visualize_tests.py --no-browser
184179
- echo zipping images after a failure...
185180
- 7z a result_images.zip result_images\ |grep -v "Compressing"
186181
- appveyor PushArtifact result_images.zip

ci/travis/test_script.sh

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
#! /bin/bash
2+
3+
# This script is meant to be called by the "script" step defined in
4+
# .travis.yml. See http://docs.travis-ci.com/ for more details.
5+
# The behavior of the script is controlled by environment variabled defined
6+
# in the .travis.yml in the top level folder of the project.
7+
8+
# The number of processes is hardcoded, because using too many causes the
9+
# Travis VM to run out of memory (since so many copies of inkscape and
10+
# ghostscript are running at the same time).
11+
12+
echo Testing import of tkagg backend
13+
MPLBACKEND="tkagg" python -c 'import matplotlib.pyplot as plt; print(plt.get_backend())'
14+
15+
if [[ $BUILD_DOCS == false ]]; then
16+
if [[ $DELETE_FONT_CACHE == 1 ]]; then
17+
rm -rf ~/.cache/matplotlib
18+
fi
19+
# Workaround for pytest-xdist flaky collection order
20+
# https://github.com/pytest-dev/pytest/issues/920
21+
# https://github.com/pytest-dev/pytest/issues/1075
22+
export PYTHONHASHSEED=$(python -c 'import random; print(random.randint(1, 4294967295))')
23+
echo PYTHONHASHSEED=$PYTHONHASHSEED
24+
25+
echo The following args are passed to pytest $PYTEST_ARGS $RUN_PEP8
26+
if [[ $TRAVIS_OS_NAME == 'osx' ]]; then
27+
python tests.py $PYTEST_ARGS $RUN_PEP8
28+
else
29+
gdb -return-child-result -batch -ex r -ex bt --args python $PYTHON_ARGS tests.py $PYTEST_ARGS $RUN_PEP8
30+
fi
31+
else
32+
cd doc
33+
python make.py html -n 2
34+
# We don't build the LaTeX docs here, so linkchecker will complain
35+
touch build/html/Matplotlib.pdf
36+
# Linkchecker only works with python 2.7 for the time being
37+
deactivate
38+
source ~/virtualenv/python2.7/bin/activate
39+
pip install pip --upgrade
40+
# linkchecker is currently broken with requests 2.10.0 so force an earlier version
41+
pip install $PRE requests==2.9.2 linkchecker
42+
linkchecker build/html/index.html
43+
fi

determinism_tex.svg

Lines changed: 29 additions & 0 deletions
Loading

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.0,!=1.5.0
9+
sphinx>=1.3,!=1.5.0
1010
numpydoc
1111
ipython
1212
mock
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Elliptical arcs now drawn between correct angles
2+
````````````````````````````````````````````````
3+
4+
The `matplotlib.patches.Arc` patch is now correctly drawn between the given
5+
angles.
6+
7+
Previously a circular arc was drawn and then stretched into an ellipse,
8+
so the resulting arc did not lie between *theta1* and *theta2*.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
Path.intersects_bbox always treats the bounding box as filled
2+
`````````````````````````````````````````````````````````````
3+
4+
Previously, when ``Path.intersects_bbox`` was called with ``filled`` set to
5+
``False``, it would treat both the path and the bounding box as unfilled. This
6+
behavior was not well documented and it is usually not the desired behavior,
7+
since bounding boxes are used to represent more complex shapes located inside
8+
the bounding box. This behavior has now been changed: when ``filled`` is
9+
``False``, the path will be treated as unfilled, but the bounding box is still
10+
treated as filled. The old behavior was arguably an implementation bug.
11+
12+
When ``Path.intersects_bbox`` is called with ``filled`` set to ``True``
13+
(the default value), there is no change in behavior. For those rare cases where
14+
``Path.intersects_bbox`` was called with ``filled`` set to ``False`` and where
15+
the old behavior is actually desired, the suggested workaround is to call
16+
``Path.intersects_path`` with a rectangle as the path::
17+
18+
from matplotlib.path import Path
19+
from matplotlib.transforms import Bbox, BboxTransformTo
20+
rect = Path.unit_rectangle().transformed(BboxTransformTo(bbox))
21+
result = path.intersects_path(rect, filled=False)

doc/api/artist_api.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
``Artist`` class
1717
================
1818

19+
.. autoclass:: Artist
1920

2021
Interactive
2122
-----------

0 commit comments

Comments
 (0)