Skip to content

Commit 9d0cb8f

Browse files
authored
Merge branch 'master' into doc-update
2 parents 735f308 + 1f7a70d commit 9d0cb8f

File tree

98 files changed

+1301
-1348
lines changed

Some content is hidden

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

98 files changed

+1301
-1348
lines changed

ci/travis/test_script.sh

+3-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#! /bin/bash
22

3-
set -ev
3+
set -ex
44

55
# This script is meant to be called by the "script" step defined in
66
# .travis.yml. See http://docs.travis-ci.com/ for more details.
@@ -16,8 +16,5 @@ if [[ $DELETE_FONT_CACHE == 1 ]]; then
1616
fi
1717

1818
echo The following args are passed to pytest $PYTEST_ARGS $RUN_PEP8
19-
if [[ $TRAVIS_OS_NAME == 'osx' ]]; then
20-
pytest $PYTEST_ARGS $RUN_PEP8
21-
else
22-
gdb -return-child-result -batch -ex r -ex bt --args python $PYTHON_ARGS -m pytest $PYTEST_ARGS $RUN_PEP8
23-
fi
19+
20+
pytest $PYTEST_ARGS $RUN_PEP8

doc/_templates/donate_sidebar.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

22
<div>
3-
<div onclick="open_window('MjI1OA==')" class="donate_button">Support Matplotlib</div>
4-
<div onclick="open_window('MjM2OA==')" class="donate_button">Support NumFOCUS</div>
3+
<a href="https://www.flipcause.com/secure/cause_pdetails/MjI1OA==" target="_blank"> <div class="donate_button" >Support Matplotlib</div></a>
4+
<a href="https://www.flipcause.com/secure/cause_pdetails/MTY3NTU=" target="_blank"> <div class="donate_button" >Support NumFOCUS</div></a>
55
</div>

doc/_templates/layout.html

-46
Original file line numberDiff line numberDiff line change
@@ -344,52 +344,6 @@ <h3>{{ _('Navigation') }}</h3>
344344

345345
</style>
346346

347-
<script>
348-
349-
function open_window(cause_id) {
350-
var protocol=String(document.location.protocol);
351-
var new_url;
352-
if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)){
353-
new_url="https://www.flipcause.com/widget/"+cause_id
354-
window.open(new_url);
355-
}
356-
357-
else {
358-
document.getElementById("fc-fade").style.display = "block";
359-
document.getElementById("fc-fade").style.webkitAnimation = "backfadesin 1s";
360-
document.getElementById("fc-fade").style.animation = "backfadesin 1s";
361-
document.getElementById("fc-fade").style.mozAnimation = "backfadesin 1s";
362-
document.getElementById("fc-light").style.display = "block";
363-
document.getElementById("fc-light").style.webkitAnimation = "fadesin 1.5s";
364-
document.getElementById("fc-light").style.animation = "fadesin 1.5s";
365-
document.getElementById("fc-light").style.mozAnimation = "fadesin 1.5s";
366-
document.getElementById("fc-main").style.display = "block";
367-
document.getElementById("fc-main").style.webkitAnimation = "fadesin 1.5s";
368-
document.getElementById("fc-main").style.animation = "fadesin 1.5s";
369-
document.getElementById("fc-main").style.mozAnimation = "fadesin 1.5s";
370-
document.getElementById("fc-close").style.display = "block";
371-
document.getElementById("fc-close").style.webkitAnimation = "fadesin 1.5s";
372-
document.getElementById("fc-close").style.animation = "fadesin 1.5s";
373-
document.getElementById("fc-close").style.mozAnimation = "fadesin 1.5s";
374-
document.getElementById("fc-myFrame").style.display = "block";
375-
document.getElementById("fc-myFrame").style.webkitAnimation = "fadesin 1.5s";
376-
document.getElementById("fc-myFrame").style.animation = "fadesin 1.5s";
377-
document.getElementById("fc-myFrame").style.mozAnimation = "fadesin 1.5s";
378-
document.getElementById("fc-myFrame").src="https://www.flipcause.com/widget/"+cause_id;
379-
}
380-
}
381-
382-
383-
function close_window() {
384-
document.getElementById("fc-fade").style.display="none";
385-
document.getElementById("fc-light").style.display="none";
386-
document.getElementById("fc-main").style.display="none";
387-
document.getElementById("fc-close").style.display="none";
388-
document.getElementById("fc-myFrame").style.display="none";
389-
}
390-
391-
</script>
392-
393347
<div id="fc-fade" class="fc-black_overlay" onclick="close_window()"></div>
394348
<div id="fc-light" class="fc-white_content">
395349
<div id="fc-main" class="fc-main-box">

doc/api/animation_api.rst

+18-43
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
======================
2-
``animation`` module
3-
======================
1+
*********
2+
animation
3+
*********
44

55
.. automodule:: matplotlib.animation
66
:no-members:
@@ -11,7 +11,6 @@
1111
:local:
1212
:backlinks: entry
1313

14-
1514
Animation
1615
=========
1716

@@ -37,7 +36,6 @@ To save an animation to disk use `Animation.save` or `Animation.to_html5_video`
3736
See :ref:`ani_writer_classes` below for details about what movie formats are
3837
supported.
3938

40-
4139
``FuncAnimation``
4240
-----------------
4341

@@ -48,7 +46,6 @@ The inner workings of `FuncAnimation` is more-or-less::
4846
fig.canvas.draw_idle()
4947
fig.canvas.start_event_loop(interval)
5048

51-
5249
with details to handle 'blitting' (to dramatically improve the live
5350
performance), to be non-blocking, not repeatedly start/stop the GUI
5451
event loop, handle repeats, multiple animated axes, and easily save
@@ -122,54 +119,40 @@ artist at a global scope and let Python sort things out. For example ::
122119
init_func=init, blit=True)
123120
plt.show()
124121

125-
126122
The second method is to us `functools.partial` to 'bind' artists to
127123
function. A third method is to use closures to build up the required
128124
artists and functions. A fourth method is to create a class.
129125

130-
131-
132-
133126
Examples
134127
~~~~~~~~
135128

136129
.. toctree::
137130
:maxdepth: 1
138131

139132
../gallery/animation/animate_decay
140-
../gallery/animation/bayes_update_sgskip
141-
../gallery/animation/double_pendulum_animated_sgskip
142-
../gallery/animation/dynamic_image
133+
../gallery/animation/bayes_update
134+
../gallery/animation/double_pendulum_sgskip
143135
../gallery/animation/histogram
144136
../gallery/animation/rain
145-
../gallery/animation/random_data
146-
../gallery/animation/simple_3danim
137+
../gallery/animation/random_walk
147138
../gallery/animation/simple_anim
148-
../gallery/animation/strip_chart_demo
139+
../gallery/animation/strip_chart
149140
../gallery/animation/unchained
150141

151142
``ArtistAnimation``
152143
-------------------
153144

154-
155145
Examples
156146
~~~~~~~~
157147

158148
.. toctree::
159149
:maxdepth: 1
160150

161-
../gallery/animation/basic_example
162-
../gallery/animation/basic_example_writer_sgskip
163-
../gallery/animation/dynamic_image2
164-
165-
166-
151+
../gallery/animation/dynamic_image
167152

168153
Writer Classes
169154
==============
170155

171-
172-
173156
The provided writers fall into two broad categories: pipe-based and
174157
file-based. The pipe-based writers stream the captured frames over a
175158
pipe to an external process. The pipe-based variants tend to be more
@@ -179,7 +162,6 @@ performant, but may not work on all systems.
179162
:toctree: _as_gen
180163
:nosignatures:
181164

182-
183165
FFMpegWriter
184166
ImageMagickFileWriter
185167
AVConvWriter
@@ -196,7 +178,6 @@ slower, these writers can be easier to debug.
196178
ImageMagickWriter
197179
AVConvFileWriter
198180

199-
200181
Fundamentally, a `MovieWriter` provides a way to grab sequential frames
201182
from the same underlying `~matplotlib.figure.Figure` object. The base
202183
class `MovieWriter` implements 3 methods and a context manager. The
@@ -215,45 +196,39 @@ file to disk. For example ::
215196
moviewriter.grab_frame()
216197
moviewriter.finish()
217198

218-
219-
If using the writer classes directly (not through `Animation.save`), it is strongly encouraged
220-
to use the `~MovieWriter.saving` context manager ::
199+
If using the writer classes directly (not through `Animation.save`), it is
200+
strongly encouraged to use the `~MovieWriter.saving` context manager ::
221201

222202
with moviewriter.saving(fig, 'myfile.mp4', dpi=100):
223203
for j in range(n):
224204
update_figure(n)
225205
moviewriter.grab_frame()
226206

227-
228207
to ensures that setup and cleanup are performed as necessary.
229208

209+
Examples
210+
--------
230211

231-
:ref:`sphx_glr_gallery_animation_moviewriter_sgskip.py`
212+
.. toctree::
213+
:maxdepth: 1
232214

215+
../gallery/animation/frame_grabbing_sgskip
233216

234217
.. _ani_writer_classes:
235218

236219
Helper Classes
237220
==============
238221

239-
240222
Animation Base Classes
241223
----------------------
242224

243-
244225
.. autosummary::
245226
:toctree: _as_gen
246227
:nosignatures:
247228

248229
Animation
249230
TimedAnimation
250231

251-
252-
Custom Animation classes
253-
------------------------
254-
255-
:ref:`sphx_glr_gallery_animation_subplots.py`
256-
257232
Writer Registry
258233
---------------
259234

@@ -280,7 +255,7 @@ To reduce code duplication base classes
280255
MovieWriter
281256
FileMovieWriter
282257

283-
and mixins are provided
258+
and mixins
284259

285260
.. autosummary::
286261
:toctree: _as_gen
@@ -290,9 +265,9 @@ and mixins are provided
290265
FFMpegBase
291266
ImageMagickBase
292267

293-
See the source code for how to easily implement new `MovieWriter`
294-
classes.
268+
are provided.
295269

270+
See the source code for how to easily implement new `MovieWriter` classes.
296271

297272
Inheritance Diagrams
298273
====================

doc/api/api_changes.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ API Changes in 2.1.2
1919
`matplotlib.Figure.legend` used to check if a line had the
2020
same label as an existing legend entry. If it also had the same line color
2121
or marker color legend didn't add a new entry for that line. However, the
22-
list of conditions was incomplete, didn't handle RGB tupples,
22+
list of conditions was incomplete, didn't handle RGB tuples,
2323
didn't handle linewidths or linestyles etc.
2424

2525
This logic did not exist in `Axes.legend`. It was included (erroneously)
@@ -781,7 +781,7 @@ Default Behavior Changes
781781
Changed default ``autorange`` behavior in boxplots
782782
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
783783

784-
Prior to v1.5.2, the whiskers of boxplots would extend to the mininum
784+
Prior to v1.5.2, the whiskers of boxplots would extend to the minimum
785785
and maximum values if the quartiles were all equal (i.e., Q1 = median
786786
= Q3). This behavior has been disabled by default to restore consistency
787787
with other plotting packages.
@@ -3452,7 +3452,7 @@ Changes for 0.40
34523452
- Patches
34533453
* Initialized with a transx, transy which are Transform instances
34543454

3455-
- FigureBase attributes dpi is a DPI intance rather than scalar and
3455+
- FigureBase attributes dpi is a DPI instance rather than scalar and
34563456
new attribute bbox is a Bound2D in display coords, and I got rid
34573457
of the left, width, height, etc... attributes. These are now
34583458
accessible as, for example, bbox.x.min is left, bbox.x.interval()
+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Fontsizes less than 1 pt are clipped to be 1 pt.
2+
------------------------------------------------
3+
4+
FreeType doesn't allow fonts to get smaller than 1 pt, so all Agg
5+
backends were silently rounding up to 1 pt. PDF (other vector
6+
backends?) were letting us write fonts that were less than 1 pt, but
7+
they could not be placed properly because position information comes from
8+
FreeType. This change makes it so no backends can use fonts smaller than
9+
1 pt, consistent with FreeType and ensuring more consistent results across
10+
backends.

doc/devel/MEP/MEP14.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ can be obtained from the `TextSpan` instance::
324324

325325
def get_path(self):
326326
"""
327-
Returns a single Path object of the entire layed out text.
327+
Returns a single Path object of the entire laid out text.
328328

329329
[Not strictly necessary, but might be useful for textpath
330330
functionality]

doc/devel/MEP/MEP19.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ has a number of shortcomings:
3434
- It often fails for inexplicable reasons.
3535

3636
- build or test products can only be saved from build off of branches
37-
on the main repo, not pull requsts, so it is often difficult to
37+
on the main repo, not pull requests, so it is often difficult to
3838
"post mortem" analyse what went wrong. This is particularly
3939
frustrating when the failure can not be subsequently reproduced
4040
locally.
@@ -114,7 +114,7 @@ This section outlines the requirements that we would like to have.
114114
(This would not replace the static documentation for stable
115115
releases as a default).
116116

117-
#. The test systems should be managable by multiple developers, so
117+
#. The test systems should be manageable by multiple developers, so
118118
that no single person becomes a bottleneck. (Travis-CI's design
119119
does this well -- storing build configuration in the git
120120
repository, rather than elsewhere, is a very good design.)

doc/devel/MEP/MEP22.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ the shortcuts out of the `Canvas`. This actions and shortcuts will be
5858
in the form of `Tools`.
5959

6060
A new class `Navigation` will be the bridge between the events from
61-
the `Canvas` and `Toolbar` and redirect them to the appropiate `Tool`.
61+
the `Canvas` and `Toolbar` and redirect them to the appropriate `Tool`.
6262

6363
At the end the user interaction will be divided into three classes:
6464

@@ -170,7 +170,7 @@ ToolbarBase
170170
Methods for **Backend implementation**
171171
* add_toolitem(self, name, group, position, image, description,
172172
toggle): Add a toolitem to the toolbar. This method is a callback
173-
from `tool_added_event` (emited by navigation)
173+
from `tool_added_event` (emitted by navigation)
174174
* set_message(self, s): Display a message on toolbar or in status bar
175175
* toggle_toolitem(self, name): Toggle the toolitem without firing
176176
event.

doc/devel/MEP/MEP23.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@ implemented the **MultiFigure** magic yet.
109109
Alternatives
110110
============
111111

112-
Insted of modifing the `FigureManagerBase` it could be possible to add
112+
Insted of modifying the `FigureManagerBase` it could be possible to add
113113
a parallel class, that handles the cases where
114114
`rcParams['backend.multifigure'] = True`. This will warranty that
115115
there won't be any problems with custom made backends, but also makes
116-
bigger the code, and more things to mantain.
116+
bigger the code, and more things to maintain.

doc/devel/MEP/MEP26.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ on the artist object, which is quite laborious, especially if no
3939
reference to the artist(s) has been stored. The new style sheets
4040
introduced in 1.4 allow styling before a plot is created, but do not
4141
offer any means to dynamically update plots or distinguish between
42-
artists of the same type (i.e. to specifiy the `line color` and `line
42+
artists of the same type (i.e. to specify the `line color` and `line
4343
style` separately for differing `Line2D` objects).
4444

4545
The initial development should concentrate on allowing styling of

doc/devel/MEP/MEP28.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ Variations on the theme
246246

247247
This MEP can be divided into a few loosely coupled components:
248248

249-
#. Allowing pre- and post-computation tranformation function in ``cbook.boxplot_stats``
249+
#. Allowing pre- and post-computation transformation function in ``cbook.boxplot_stats``
250250
#. Exposing that transformation in the ``Axes.boxplot`` API
251251
#. Removing redundant statistical options in ``Axes.boxplot``
252252
#. Shifting all styling parameter processing from ``Axes.boxplot`` to ``Axes.bxp``.
@@ -334,7 +334,7 @@ Users could also pass their own function to compute the stats:
334334
ax1.boxplot(data, statfxn=my_box_stats, bootstrap_method='BCA',
335335
whisker_method='dynamic')
336336
337-
From the examples above, Option Two seems to have only marginal benifit,
337+
From the examples above, Option Two seems to have only marginal benefit,
338338
but in the context of downstream libraries like seaborn, its advantage
339339
is more apparent as the following would be possible without any patches
340340
to seaborn:

doc/devel/MEP/MEP29.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ Problems
5858
--------
5959

6060
* One serious problem is how to deal with text having both latex and
61-
html-like tags. For example, consider the follwing::
61+
html-like tags. For example, consider the following::
6262

6363
$<b>Bold$</b>
6464

0 commit comments

Comments
 (0)