Skip to content

Commit 9ba94a7

Browse files
Merge branch 'master' into fix-inset_axes
2 parents cbc956a + 213f399 commit 9ba94a7

File tree

216 files changed

+2144
-2066
lines changed

Some content is hidden

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

216 files changed

+2144
-2066
lines changed

.gitignore

-2
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

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ env:
4747
- ARTIFACTS_BUCKET=matplotlib-test-results
4848
- secure: RgJI7BBL8aX5FTOQe7xiXqWHMxWokd6GNUWp1NUV2mRLXPb9dI0RXqZt3UJwKTAzf1z/OtlHDmEkBoTVK81E9iUxK5npwyyjhJ8yTJmwfQtQF2n51Q1Ww9p+XSLORrOzZc7kAo6Kw6FIXN1pfctgYq2bQkrwJPRx/oPR8f6hcbY=
4949
- secure: E7OCdqhZ+PlwJcn+Hd6ns9TDJgEUXiUNEI0wu7xjxB2vBRRIKtZMbuaZjd+iKDqCKuVOJKu0ClBUYxmgmpLicTwi34CfTUYt6D4uhrU+8hBBOn1iiK51cl/aBvlUUrqaRLVhukNEBGZcyqAjXSA/Qsnp2iELEmAfOUa92ZYo1sk=
50-
- secure: "dfjNqGKzQG5bu3FnDNwLG8H/C4QoieFo4PfFmZPdM2RY7WIzukwKFNT6kiDfOrpwt+2bR7FhzjOGlDECGtlGOtYPN8XuXGjhcP4a4IfakdbDfF+D3NPIpf5VlE6776k0VpvcZBTMYJKNFIMc7QPkOwjvNJ2aXyfe3hBuGlKJzQU="
50+
- secure: dfjNqGKzQG5bu3FnDNwLG8H/C4QoieFo4PfFmZPdM2RY7WIzukwKFNT6kiDfOrpwt+2bR7FhzjOGlDECGtlGOtYPN8XuXGjhcP4a4IfakdbDfF+D3NPIpf5VlE6776k0VpvcZBTMYJKNFIMc7QPkOwjvNJ2aXyfe3hBuGlKJzQU=
5151
# Variables controlling Python dependencies.
5252
- CYCLER=cycler
5353
- DATEUTIL=python-dateutil
@@ -156,7 +156,7 @@ install:
156156
python -c 'import pgi as gi; gi.require_version("Gtk", "3.0"); from pgi.repository import Gtk' &&
157157
echo 'pgi is available' ||
158158
echo 'pgi is not available'
159-
python -mpip install pyqt5==5.9 &&
159+
python -mpip install pyqt5 &&
160160
python -c 'import PyQt5.QtCore' &&
161161
echo 'PyQt5 is available' ||
162162
echo 'PyQt5 is not available'

INSTALL.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ Matplotlib requires the following dependencies:
142142
* `pytz <http://pytz.sourceforge.net/>`__
143143
* FreeType (>= 2.3)
144144
* `cycler <http://matplotlib.org/cycler/>`__ (>= 0.10.0)
145-
* `six <https://pypi.python.org/pypi/six>`_
145+
* `six <https://pypi.python.org/pypi/six>`_ (>= 1.10)
146146
* `kiwisolver <https://github.com/nucleic/kiwi>`__ (>= 1.0.0)
147147

148148
Optionally, you can also install a number of packages to enable better user
@@ -166,7 +166,7 @@ etc., you can install the following:
166166
<https://libav.org/avconv.html>`_: for saving movies;
167167
* `ImageMagick <https://www.imagemagick.org/script/index.php>`_: for saving
168168
animated gifs;
169-
* `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
170170
image file formats: JPEG, BMP, and TIFF image files;
171171
* `LaTeX <https://miktex.org/>`_ and `GhostScript
172172
<https://ghostscript.com/download/>`_ (for rendering text with LaTeX).

doc-requirements.txt

+1-1
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

doc/_static/mpl.css

+38
Original file line numberDiff line numberDiff line change
@@ -768,6 +768,26 @@ figcaption {
768768
text-align: center;
769769
}
770770

771+
772+
/* "Summer Fellowship" message. */
773+
#summer-fellowship {
774+
background: #11557C;
775+
box-sizing: border-box;
776+
color: #fffa;
777+
font-weight: bold;
778+
left: 0;
779+
min-height: 3em;
780+
padding: 0.5em;
781+
top: 0;
782+
width: 100%;
783+
z-index: 10000;
784+
}
785+
786+
#summer-fellowship a {
787+
color: #fff;
788+
text-decoration:underline;
789+
}
790+
771791
/* "Go to released version" message. */
772792
#unreleased-message {
773793
background: #d62728;
@@ -971,6 +991,24 @@ p.sphx-glr-signature a.reference.external {
971991
font-weight: 400;
972992
}
973993

994+
.viewcode-link {
995+
float: right;
996+
}
997+
998+
.viewcode-back {
999+
float: right;
1000+
font-family: "Helvetica Neue", Helvetica, 'Lucida Grande', 'Lucida Sans Unicode', 'Geneva', 'Verdana', sans-serif;
1001+
}
1002+
1003+
div.viewcode-block:target {
1004+
margin: -1px -13px;
1005+
padding: 0 10px;
1006+
border-top: 1px solid #ccc;
1007+
border-bottom: 1px solid #ccc;
1008+
background-color: #f4debf;
1009+
1010+
}
1011+
9741012
.sidebar-announcement {
9751013
border: 1px solid #11557C;
9761014
background: #eff9ff;

doc/_templates/layout.html

+13-4
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,12 @@ <h3>{{ _('Navigation') }}</h3>
172172
</a>
173173
</div>
174174
{%- endif %}
175+
<div id="summer-fellowship">
176+
Applications are open for the 2018 John Hunter Matplotlib Summer Fellowship.
177+
<a href="https://www.numfocus.org/programs/john-hunter-technology-fellowship">
178+
Apply now!
179+
</a>
180+
</div>
175181
<div style="background-color: white; text-align: left; padding: 10px 10px 15px 15px; position: relative;">
176182
{%- if builder in ('htmlhelp', 'devhelp', 'latex') %}
177183
<a href="{{ pathto('index') }}">
@@ -231,13 +237,16 @@ <h3>{{ _('Navigation') }}</h3>
231237
endtrans %}
232238
{%- endif %}
233239
{%- endif %}
240+
<br />
234241
{%- if last_updated %}
235-
{% trans last_updated=last_updated|e %}Last updated on {{ last_updated
236-
}}.{% endtrans %}
242+
{% trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %}
237243
{%- endif %}
238244
{%- if show_sphinx %}
239-
{% trans sphinx_version=sphinx_version|e %}Created using <a
240-
href="http://sphinx-doc.org/">Sphinx</a> {{ sphinx_version }}.{% endtrans %}
245+
{% trans sphinx_version=sphinx_version|e %}Created using
246+
<ahref="http://sphinx-doc.org/">Sphinx</a> {{ sphinx_version }}.{% endtrans %}
247+
{%- endif %}
248+
{%- if sha %}
249+
Doc version {{ sha }}.
241250
{%- endif %}
242251
</div>
243252
{%- endblock %}

doc/api/api_changes.rst

+16
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,22 @@ Both bindings are disabled if only a subset of the grid lines (in either
407407
direction) is visible, to avoid making irreversible changes to the figure.
408408

409409

410+
Ticklabels are turned off instead of being invisible
411+
----------------------------------------------------
412+
413+
Internally, the `Tick`'s :func:`~matplotlib.axis.Tick.label1On` attribute
414+
is now used to hide tick labels instead of setting the visibility on the tick
415+
label objects.
416+
This improves overall performance and fixes some issues.
417+
As a consequence, in case those labels ought to be shown,
418+
:func:`~matplotlib.axes.Axes.tick_params`
419+
needs to be used, e.g.
420+
421+
::
422+
423+
ax.tick_params(labelbottom=True)
424+
425+
410426
Removal of warning on empty legends
411427
-----------------------------------
412428

doc/api/next_api_changes/2018-02-15-AL-deprecations.rst

+9-2
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,22 @@ The following modules are deprecated:
1111
The following classes, methods, functions, and attributes are deprecated:
1212

1313
- ``afm.parse_afm``,
14+
- ``backend_qt5.error_msg_qt``, ``backend_qt5.exception_handler``,
1415
- ``backend_wx.FigureCanvasWx.macros``,
1516
- ``cbook.GetRealpathAndStat``, ``cbook.Locked``,
1617
- ``cbook.is_numlike`` (use ``isinstance(..., numbers.Number)`` instead),
17-
``cbook.listFiles``, ``cbook.unicode_safe``
18+
``cbook.listFiles``, ``cbook.unicode_safe``,
1819
- ``container.Container.set_remove_method``,
20+
- ``contour.ContourLabeler.cl``, ``.cl_xy``, and ``.cl_cvalues``,
1921
- ``dates.DateFormatter.strftime_pre_1900``, ``dates.DateFormatter.strftime``,
2022
- ``font_manager.TempCache``,
2123
- ``mathtext.unichr_safe`` (use ``chr`` instead),
22-
- ``testing.ImageComparisonTest``,
24+
- ``table.Table.get_child_artists`` (use ``get_children`` instead),
25+
- ``testing.compare.ImageComparisonTest``, ``testing.compare.compare_float``,
26+
- ``testing.decorators.skip_if_command_unavailable``.
27+
- ``FigureCanvasQT.keyAutoRepeat`` (directly check
28+
``event.guiEvent.isAutoRepeat()`` in the event handler to decide whether to
29+
handle autorepeated key presses).
2330
- ``FigureCanvasWx.macros``,
2431
- ``_ImageBase.iterpnames``, use the ``interpolation_names`` property instead.
2532
(this affects classes that inherit from ``_ImageBase`` including

doc/api/next_api_changes/2018-02-16-AL-deprecations.rst

-5
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
``bar``/``barh`` no longer accepts ``left``/``bottom`` as first named argument
2+
``````````````````````````````````````````````````````````````````````````````
3+
4+
These arguments were renamed in 2.0 to ``x``/``y`` following the change of the
5+
default alignment from ``edge`` to ``center``.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Deprecation of certain marker styles
2+
````````````````````````````````````
3+
4+
Using ``(n, 3)`` as marker style to specify a circle marker is deprecated. Use
5+
``"o"`` instead.
6+
7+
Using ``([(x0, y0), (x1, y1), ...], 0)`` as marker style to specify a custom
8+
marker path is deprecated. Use ``[(x0, y0), (x1, y1), ...]`` instead.

doc/citing.rst

+6
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ publication, please acknowledge this fact by citing `Hunter et al (2007)
2727
2828
DOIs
2929
----
30+
v2.2.2
31+
.. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.1202077.svg
32+
:target: https://doi.org/10.5281/zenodo.1202077
33+
v2.2.1
34+
.. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.1202050.svg
35+
:target: https://doi.org/10.5281/zenodo.1202050
3036
v2.2.0
3137
.. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.1189358.svg
3238
:target: https://doi.org/10.5281/zenodo.1189358

doc/conf.py

+10-1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
'sphinx.ext.doctest',
3434
'sphinx.ext.inheritance_diagram',
3535
'sphinx.ext.intersphinx',
36+
'sphinx.ext.viewcode',
3637
'IPython.sphinxext.ipython_console_highlighting',
3738
'IPython.sphinxext.ipython_directive',
3839
'numpydoc', # Needs to be loaded *after* autodoc.
@@ -87,7 +88,8 @@ def _check_deps():
8788
'python': ('https://docs.python.org/3', None),
8889
'numpy': ('https://docs.scipy.org/doc/numpy/', None),
8990
'scipy': ('https://docs.scipy.org/doc/scipy/reference/', None),
90-
'pandas': ('https://pandas.pydata.org/pandas-docs/stable', None)
91+
'pandas': ('https://pandas.pydata.org/pandas-docs/stable', None),
92+
'cycler': ('https://matplotlib.org/cycler', None),
9193
}
9294

9395
explicit_order_folders = [
@@ -143,11 +145,18 @@ def _check_deps():
143145
master_doc = 'contents'
144146

145147
# General substitutions.
148+
from matplotlib.compat.subprocess import check_output
149+
SHA = check_output(['git', 'describe', '--dirty']).decode('utf-8').strip()
150+
151+
html_context = {'sha': SHA}
152+
146153
project = 'Matplotlib'
147154
copyright = ('2002 - 2012 John Hunter, Darren Dale, Eric Firing, '
148155
'Michael Droettboom and the Matplotlib development '
149156
'team; 2012 - 2018 The Matplotlib development team')
150157

158+
159+
151160
# The default replacements for |version| and |release|, also used in various
152161
# other places throughout the built documents.
153162
#

doc/devel/coding_guide.rst

+63-21
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,10 @@ Pull request checklist
1212
Branch selection
1313
----------------
1414

15-
* In general, simple bugfixes that are unlikely to introduce new bugs
16-
of their own should be merged onto the maintenance branch. New
17-
features, or anything that changes the API, should be made against
18-
master. The rules are fuzzy here -- when in doubt, target master.
15+
In general target the master branch for all new features and
16+
bug-fixes. PRs may target maintenance or doc branches on
17+
a case-by-case basis.
1918

20-
* Once changes are merged into the maintenance branch, they should
21-
be merged into master.
2219

2320
Documentation
2421
-------------
@@ -87,31 +84,76 @@ PR Review guidelines
8784
merge the PR and then open a new PR against upstream.
8885

8986

90-
Backports
91-
=========
87+
Branches and Backports
88+
======================
9289

9390

94-
When doing backports please include the branch you backported the
95-
commit to along with the SHA in a comment on the original PR.
91+
The current active branches are
9692

97-
We do a backport from master to v2.0.x assuming:
93+
*master*
94+
This will be Matplotlib 3.0. Supports Python 3.5+.
9895

99-
* ``matplotlib`` is a read-only remote branch of the matplotlib/matplotlib repo
96+
*v2.2.x*
97+
Maintenance branch for Matplotlib 2.2 LTS. Supports Python 2.7, 3.4+
98+
99+
*v2.2.N-doc*
100+
Documentation for the current release. On a patch release, this will be replaced
101+
by a properly named branch for the new release.
102+
103+
104+
We always will backport to 2.2.x
105+
106+
- critical bug fixes (segfault, failure to import, things that the
107+
user can not work around)
108+
- fixes for regressions against 2.0 or 2.1
109+
110+
Everything else (regressions against 1.x versions, bugs/api
111+
inconsistencies the user can work around in their code) are on a
112+
case-by-case basis, should be low-risk, and need someone to advocate
113+
for and shepherd through the backport.
114+
115+
The only changes to be backported to 2.2.N-doc are changes to
116+
``doc``, ``examples``, or ``tutorials``. Any changes to
117+
``lib`` or ``src`` should not be backported to this branch.
118+
119+
Automated backports
120+
-------------------
100121

101-
* ``DANGER`` is a read/write remote branch of the matplotlib/matplotlib repo
122+
We use meeseeksdev bot to automatically backport merges to the correct
123+
maintenance branch base on the milestone. To work properly the
124+
milestone must be set before merging. If you have commit rights, the
125+
bot can also be manually triggered after a merge by leaving a message
126+
``@meeseeksdev backport to BRANCH`` on the PR. If there are conflicts
127+
meeseekdevs will inform you that the backport needs to be done
128+
manually.
129+
130+
The target branch is configured by putting ``on-merge: backport to
131+
TARGETBRANCH`` in the milestone description on it's own line.
132+
133+
If the bot is not working as expected, please report issues to
134+
`Meeseeksdev <https://github.com/MeeseeksBox/MeeseeksDev>`__.
135+
136+
137+
Manual backports
138+
----------------
139+
140+
When doing backports please copy the form used by meeseekdev,
141+
``Backport PR #XXXX: TITLE OF PR``. If you need to manually resolve
142+
conflicts make note of them and how you resolved them in the commit
143+
message.
144+
145+
We do a backport from master to v2.2.x assuming:
146+
147+
* ``matplotlib`` is a read-only remote branch of the matplotlib/matplotlib repo
102148

103149
The ``TARGET_SHA`` is the hash of the merge commit you would like to
104150
backport. This can be read off of the github PR page (in the UI with
105151
the merge notification) or through the git CLI tools.::
106152

107153
git fetch matplotlib
108-
git checkout v2.0.x
109-
git merge --ff-only matplotlib/v2.0.x
154+
git checkout v2.2.x
155+
git merge --ff-only matplotlib/v2.2.x
110156
git cherry-pick -m 1 TARGET_SHA
111-
git log --graph --decorate # to look at it
112-
# local tests? (use your judgment)
113-
git push DANGER v2.0.x
114-
# leave a comment on PR noting sha of the resulting commit
115-
# from the cherry-pick + branch it was moved to
157+
# resolve conflicts and commit if required
116158

117-
These commands work on git 2.7.1.
159+
Use your discretion to push directly to upstream or to open a PR.

doc/devel/index.rst

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ The Matplotlib Developers' Guide
2020
gitwash/index.rst
2121
coding_guide.rst
2222
release_guide.rst
23+
min_dep_policy.rst
2324
MEP/index
2425

2526
.. toctree::

0 commit comments

Comments
 (0)