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

Skip to content

Commit e027afc

Browse files
Merge branch 'master' into wxmorecleanup
2 parents 6f358b2 + 91bc843 commit e027afc

File tree

283 files changed

+5699
-10511
lines changed

Some content is hidden

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

283 files changed

+5699
-10511
lines changed

.appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ install:
5959
#
6060
- conda create -q -n test-environment python=%PYTHON_VERSION%
6161
msinttypes freetype=2.6 "libpng>=1.6.21,<1.7" zlib=1.2 tk=8.5
62-
pip setuptools numpy mock pandas sphinx tornado
62+
pip setuptools numpy pandas sphinx tornado
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

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ result_images
8080

8181
# Nose/Pytest generated files #
8282
###############################
83+
.pytest_cache/
8384
.cache/
8485
.coverage
8586
.coverage.*

.travis.yml

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ addons:
3737
- texlive-latex-extra
3838
- texlive-latex-recommended
3939
- texlive-xetex
40+
- texlive-luatex
4041

4142
env:
4243
global:
@@ -47,7 +48,6 @@ env:
4748
- secure: "dfjNqGKzQG5bu3FnDNwLG8H/C4QoieFo4PfFmZPdM2RY7WIzukwKFNT6kiDfOrpwt+2bR7FhzjOGlDECGtlGOtYPN8XuXGjhcP4a4IfakdbDfF+D3NPIpf5VlE6776k0VpvcZBTMYJKNFIMc7QPkOwjvNJ2aXyfe3hBuGlKJzQU="
4849
- CYCLER=cycler
4950
- DATEUTIL=python-dateutil
50-
- MOCK=
5151
- NOSE=
5252
- NUMPY=numpy
5353
- PANDAS=
@@ -70,7 +70,6 @@ matrix:
7070
env:
7171
- CYCLER=cycler==0.10
7272
- DATEUTIL=python-dateutil==2.1
73-
- MOCK=mock
7473
- NOSE=nose
7574
- NUMPY=numpy==1.10.0
7675
- PANDAS='pandas<0.21.0'
@@ -86,7 +85,6 @@ matrix:
8685
env: PRE=--pre
8786
- os: osx
8887
language: generic # https://github.com/travis-ci/travis-ci/issues/2312
89-
env: MOCK=mock
9088
only: master
9189
cache:
9290
# As for now travis caches only "$HOME/.cache/pip"
@@ -109,43 +107,40 @@ before_install:
109107
export PATH=/usr/lib/ccache:$PATH
110108
else
111109
ci/travis/silence brew update
112-
brew install python3 ffmpeg imagemagick mplayer ccache
113-
# make 'python' mean 'python3'
114-
ln -sf /usr/local/bin/python3 /usr/local/bin/python
110+
brew upgrade python
111+
brew install ffmpeg imagemagick mplayer ccache
115112
hash -r
116113
which python
117114
python --version
118115
# We could install ghostscript and inkscape here to test svg and pdf
119116
# but this makes the test time really long.
120117
# brew install ghostscript inkscape
121-
export PATH=/usr/local/opt/ccache/libexec:$PATH
118+
export PATH=/usr/local/opt/python/libexec/bin:/usr/local/opt/ccache/libexec:$PATH
122119
fi
123120
124121
install:
125-
# Upgrade pip and setuptools. Mock has issues with the default version of
126-
# setuptools
127122
- |
128-
# Setup environment
123+
# Setup environment.
129124
ccache -s
130125
git describe
131-
# Upgrade pip and setuptools and wheel to get as clean an install as possible
126+
# Upgrade pip and setuptools and wheel to get as clean an install as possible.
132127
python -mpip install --upgrade pip setuptools wheel
133128
- |
134-
# Install dependencies from PyPI
129+
# Install dependencies from PyPI.
135130
python -mpip install --upgrade $PRE \
136131
codecov \
137132
coverage \
138133
$CYCLER \
139-
$MOCK \
134+
$DATEUTIL \
140135
$NOSE \
141136
$NUMPY \
142137
$PANDAS \
143138
codecov \
144139
coverage \
145140
pillow \
146141
$PYPARSING \
147-
$DATEUTIL \
148-
$SPHINX
142+
$SPHINX \
143+
tornado
149144
# GUI toolkits are pip-installable only for some versions of Python so
150145
# don't fail if we can't install them. Make it easier to check whether the
151146
# install was successful by trying to import the toolkit (sometimes, the
@@ -159,7 +154,7 @@ install:
159154
python -c 'import PyQt5.QtCore' &&
160155
echo 'PyQt5 is available' ||
161156
echo 'PyQt5 is not available'
162-
python -mpip install -U --pre \
157+
python -mpip install -U \
163158
--no-index -f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-14.04 \
164159
wxPython &&
165160
python -c 'import wx' &&

INSTALL.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ To run the test suite:
5454
* extract the :file:`lib\\matplotlib\\tests` or
5555
:file:`lib\\mpl_toolkits\\tests` directories from the source distribution;
5656
* install test dependencies: `pytest <https://pypi.python.org/pypi/pytest>`_,
57-
`mock <https://pypi.python.org/pypi/mock>`_, Pillow, MiKTeX, GhostScript,
58-
ffmpeg, avconv, ImageMagick, and `Inkscape <https://inkscape.org/>`_;
59-
* run ``py.test path\to\tests\directory``.
57+
Pillow, MiKTeX, GhostScript, ffmpeg, avconv, ImageMagick, and `Inkscape
58+
<https://inkscape.org/>`_;
59+
* run ``pytest path\to\tests\directory``.
6060

6161

6262
Third-party distributions of Matplotlib
@@ -159,7 +159,6 @@ optional Matplotlib backends and the capabilities they provide.
159159
* `PyQt4 <https://pypi.python.org/pypi/PyQt4>`_ (>= 4.4) or
160160
`PySide <https://pypi.python.org/pypi/PySide>`_: for the Qt4Agg backend;
161161
* `PyQt5 <https://pypi.python.org/pypi/PyQt5>`_: for the Qt5Agg backend;
162-
* :term:`pygtk` (>= 2.4): for the GTK and the GTKAgg backend;
163162
* :term:`wxpython` (>= 2.9 or later): for the WX or WXAgg backend;
164163
* `cairocffi <https://cairocffi.readthedocs.io/en/latest/>`__ (>=
165164
v0.8): for cairo based backends;

MANIFEST.in

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
include INSTALL.rst README.rst
2-
include CONTRIBUTING.md
32
include pytest.ini
4-
include Makefile MANIFEST.in
3+
include MANIFEST.in
54
include matplotlibrc.template setup.cfg.template
6-
include setupext.py setup.py distribute_setup.py
5+
include setupext.py setup.py
76
include lib/matplotlib/mpl-data/lineprops.glade
87
include lib/matplotlib/mpl-data/matplotlibrc
98
include lib/matplotlib/mpl-data/images/*

README.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,16 +52,16 @@ Testing
5252

5353
After installation, you can launch the test suite::
5454

55-
py.test
55+
pytest
5656

5757
Or from the Python interpreter::
5858

5959
import matplotlib
6060
matplotlib.test()
6161

62-
Consider reading http://matplotlib.org/devel/coding_guide.html#testing for
63-
more information. Note that the test suite requires pytest and, on Python 2.7,
64-
mock. Please install with pip or your package manager of choice.
62+
Consider reading http://matplotlib.org/devel/coding_guide.html#testing for more
63+
information. Note that the test suite requires pytest. Please install with pip
64+
or your package manager of choice.
6565

6666
Contact
6767
=======

doc-requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ sphinx>=1.3,!=1.5.0,!=1.6.4
1010
colorspacious
1111
ipython
1212
ipywidgets
13-
mock
1413
numpydoc>=0.4
1514
pillow
1615
sphinx-gallery>=0.1.12

doc/_static/mpl.css

Lines changed: 52 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -232,9 +232,6 @@ div.sphinxsidebar {
232232
text-align: left;
233233
/* margin-left: -100%; */
234234
}
235-
div.sphinxsidebarwrapper {
236-
padding-top: 28px
237-
}
238235

239236
div.sphinxsidebar h4, div.sphinxsidebar h3 {
240237
margin: 1em 0 0.5em 0;
@@ -245,6 +242,11 @@ div.sphinxsidebar h4, div.sphinxsidebar h3 {
245242
background-color: #AFC1C4;
246243
}
247244

245+
div.sphinxsidebar h3 a {
246+
/* workaround for table of contents heading, which is a link */
247+
color: white !important;
248+
}
249+
248250
div.sphinxsidebar ul {
249251
padding-left: 1.5em;
250252
margin-top: 7px;
@@ -258,6 +260,36 @@ div.sphinxsidebar ul ul {
258260
margin-left: 20px;
259261
}
260262

263+
div.sphinxsidebar #searchbox input {
264+
border: 1px solid #aaa;
265+
padding: 0.25em;
266+
box-sizing: border-box;
267+
}
268+
269+
div.sphinxsidebar #searchbox form {
270+
display: inline-block;
271+
width: 100%
272+
}
273+
274+
div.sphinxsidebar #searchbox input[type="text"] {
275+
float: left;
276+
width: 80%;
277+
}
278+
279+
div.sphinxsidebar #searchbox input[type="submit"] {
280+
float: left;
281+
width: 20%;
282+
border-left: none;
283+
}
284+
285+
div.sphinxsidebar #searchbox input[type="submit"]:hover {
286+
background: #ddd;
287+
}
288+
289+
div.sphinxsidebar .searchformwrapper {
290+
display: block;
291+
}
292+
261293
p {
262294
margin: 0.8em 0 0.8em 0;
263295
}
@@ -373,14 +405,24 @@ div.warning {
373405
border: 1px solid #eed3d7;
374406
}
375407

408+
div.deprecated {
409+
color: #606060;
410+
background-color: #f0f0f0;
411+
border: 1px solid #404040;
412+
}
413+
414+
div.deprecated span.versionmodified {
415+
color: #606060;
416+
font-weight: bold;
417+
}
418+
376419
div.green {
377420
color: #468847;
378421
background-color: #dff0d8;
379422
border: 1px solid #d6e9c6;
380423
}
381424

382-
383-
div.admonition p, div.warning p {
425+
div.admonition p, div.warning p, div.deprecated p {
384426
margin: 0.5em 1em 0.5em 1em;
385427
padding: 0;
386428
}
@@ -401,15 +443,14 @@ div.warning p.admonition-title {
401443
font-size: 14px;
402444
}
403445

404-
div.admonition {
446+
div.admonition, div.deprecated {
405447
margin-bottom: 10px;
406448
margin-top: 10px;
407449
padding: 7px;
408450
border-radius: 4px;
409451
-moz-border-radius: 4px;
410452
}
411453

412-
413454
div.note {
414455
background-color: #eee;
415456
border: 1px solid #ccc;
@@ -804,6 +845,10 @@ figcaption {
804845
}
805846
}
806847

848+
#sidebar-donations {
849+
margin-top: 28px;
850+
}
851+
807852
.donate_button {
808853
background:#11557C;
809854
font-weight:normal;

doc/_templates/donate_sidebar.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
<div>
2+
<div id="sidebar-donations">
33
<a href="https://www.flipcause.com/secure/cause_pdetails/MjI1OA==" target="_blank"> <div class="donate_button" >Support Matplotlib</div></a>
44
<a href="https://www.flipcause.com/secure/cause_pdetails/MTY3NTU=" target="_blank"> <div class="donate_button" >Support NumFOCUS</div></a>
55
</div>

doc/_templates/pagesource.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{%- if show_source and has_source and sourcename %}
2+
<div id="sidebar-pagesource" role="note" aria-label="source link"
3+
style="margin-top: 1.5em; padding-top: 0.1em; border-top: 1px solid #86989b">
4+
<a href="{{ pathto('_sources/' + sourcename, true)|e }}"
5+
style="color: #c0c0c0" rel="nofollow">{{ _('Show Page Source') }}</a>
6+
</div>
7+
{%- endif %}

doc/api/api_changes.rst

Lines changed: 34 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,28 @@ out what caused the breakage and how to fix it by updating your code.
1010
For new features that were added to Matplotlib, please see
1111
:ref:`whats-new`.
1212

13+
.. for a release comment out the toctree below
14+
15+
16+
.. toctree::
17+
:glob:
18+
:maxdepth: 1
19+
20+
next_api_changes/*
21+
22+
1323
API Changes in 2.2.0
1424
====================
1525

16-
..
1726

18-
.. toctree::
19-
:glob:
20-
:maxdepth: 1
2127

22-
next_api_changes/*
28+
New dependency
29+
--------------
30+
31+
`kiwisolver <https://github.com/nucleic/kiwi>`__ is now a required
32+
dependency to support the new constrained_layout, see
33+
:ref:`sphx_glr_tutorials_intermediate_constrainedlayout_guide.py` for
34+
more details.
2335

2436

2537
Deprecations
@@ -80,6 +92,10 @@ transparency of figure patches in the nbagg (or any other) backend,
8092
directly set ``figure.patch.facecolor``, or the ``figure.facecolor``
8193
rcParam.
8294

95+
Deprecated `Axis.unit_data`
96+
~~~~~~~~~~~~~~~~~~~~~~~~~~~
97+
98+
Use `Axis.units` (which has long existed) instead.
8399

84100

85101
Removals
@@ -136,6 +152,12 @@ The following deprecated rcParams have been removed:
136152

137153

138154

155+
Only accept string-like for Categorical input
156+
---------------------------------------------
157+
158+
Do not accept mixed string / float / int input, only
159+
strings are valid categoricals.
160+
139161
Removal of unused imports
140162
-------------------------
141163
Many unused imports were removed from the codebase. As a result,
@@ -144,6 +166,13 @@ trying to import certain classes or functions from the "wrong" module
144166
:mod:`matplotlib.figure`) will now raise an `ImportError`.
145167

146168

169+
``Axes3D.get_xlim``, ``get_ylim`` and ``get_zlim`` now return a tuple
170+
---------------------------------------------------------------------
171+
172+
They previously returned an array. Returning a tuple is consistent with the
173+
behavior for 2D axes.
174+
175+
147176
Exception type changes
148177
----------------------
149178

@@ -261,14 +290,6 @@ and ::
261290

262291

263292

264-
New dependency
265-
--------------
266-
267-
`kiwisolver <https://github.com/nucleic/kiwi>`__ is now a required
268-
dependency to support the new constrained_layout, see
269-
:ref:`sphx_glr_tutorials_intermediate_constrainedlayout_guide.py` for
270-
more details.
271-
272293

273294
`Axes.imshow` clips RGB values to the valid range
274295
-------------------------------------------------

doc/api/axes_api.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -509,8 +509,6 @@ Interactive
509509
Axes.contains_point
510510

511511
Axes.get_cursor_data
512-
Axes.get_cursor_props
513-
Axes.set_cursor_props
514512

515513
Children
516514
========

0 commit comments

Comments
 (0)