Skip to content

Commit 68176eb

Browse files
committed
Merge remote-tracking branch 'upstream/v1.4.x'
Conflicts: examples/api/scatter_piecharts.py examples/misc/rc_traits.py lib/matplotlib/__init__.py lib/matplotlib/tests/baseline_images/test_path/path_clipping.svg lib/matplotlib/tests/test_path.py src/_backend_agg.cpp src/_image.cpp src/ft2font.cpp src/path_converters.h
2 parents 6e36226 + f52b90b commit 68176eb

Some content is hidden

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

67 files changed

+217
-176
lines changed

INSTALL

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,8 @@ libpng 1.2 (or later)
205205
`pytz`
206206
Used to manipulate time-zone aware datetimes.
207207

208+
:term:`freetype` 2.3 or later
209+
library for reading true type font files.
208210

209211

210212
Optional GUI framework
@@ -246,10 +248,6 @@ Optional dependencies
246248
selection of image file formats.
247249

248250

249-
:term:`freetype` 2.3 or later
250-
library for reading true type font files.
251-
252-
253251
Required libraries that ship with matplotlib
254252
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
255253
:term:`agg` 2.4

doc/README.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ documentation. All of the documentation is written using sphinx, a
66
python documentation system built on top of ReST. This directory contains
77

88

9-
* users - the user documentation, eg plotting tutorials, configuration
9+
* users - the user documentation, e.g., plotting tutorials, configuration
1010
tips, etc.
1111

1212
* devel - documentation for matplotlib developers

doc/_templates/citing.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ <h1>Citing matplotlib</h1>
2828

2929
<h2>DOIs</h2>
3030
<dl>
31+
<dt>v1.4.2</dt><dd><a href="http://dx.doi.org/10.5281/zenodo.12400"><img src="https://zenodo.org/badge/doi/10.5281/zenodo.12400.png" alt="10.5281/zenodo.12400"></a></dd>
32+
<dt>v1.4.1</dt><dd><a href="http://dx.doi.org/10.5281/zenodo.12287"><img src="https://zenodo.org/badge/doi/10.5281/zenodo.12287.png" alt="10.5281/zenodo.12287"></a></dd>
3133
<dt>v1.4.0</dt><dd><a href="http://dx.doi.org/10.5281/zenodo.11451"><img src="https://zenodo.org/badge/doi/10.5281/zenodo.11451.png" alt="10.5281/zenodo.11451"></a></dd>
3234
</dl>
3335

doc/_templates/layout.html

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,17 @@ <h3>{{ _('Navigation') }}</h3>
245245
href="http://sphinx-doc.org/">Sphinx</a> {{ sphinx_version }}.{% endtrans %}
246246
{%- endif %}
247247
</div>
248-
{%- endblock %}
248+
{%- endblock %}
249+
250+
<script>
251+
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
252+
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
253+
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
254+
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
255+
256+
ga('create', 'UA-55954603-1', 'auto');
257+
ga('send', 'pageview');
249258

259+
</script>
250260
</body>
251261
</html>

doc/api/api_changes.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1305,7 +1305,7 @@ Changes for 0.90.1
13051305
units.ConversionInterface.tickers renamed to
13061306
units.ConversionInterface.axisinfo and it now returns a
13071307
units.AxisInfo object rather than a tuple. This will make it
1308-
easier to add axis info functionality (eg I added a default label
1308+
easier to add axis info functionality (e.g., I added a default label
13091309
on this iteration) w/o having to change the tuple length and hence
13101310
the API of the client code every time new functionality is added.
13111311
Also, units.ConversionInterface.convert_to_value is now simply
@@ -1790,7 +1790,7 @@ Changes for 0.71
17901790
pylab still imports most of the symbols from Numerix, MLab, fft,
17911791
etc, but is more cautious. For names that clash with python names
17921792
(min, max, sum), pylab keeps the builtins and provides the numeric
1793-
versions with an a* prefix, eg (amin, amax, asum)
1793+
versions with an a* prefix, e.g., (amin, amax, asum)
17941794

17951795
Changes for 0.70
17961796
================
@@ -1810,7 +1810,7 @@ Changes for 0.65.1
18101810
removed add_axes and add_subplot from backend_bases. Use
18111811
figure.add_axes and add_subplot instead. The figure now manages the
18121812
current axes with gca and sca for get and set current axes. If you
1813-
have code you are porting which called, eg, figmanager.add_axes, you
1813+
have code you are porting which called, e.g., figmanager.add_axes, you
18141814
can now simply do figmanager.canvas.figure.add_axes.
18151815

18161816
Changes for 0.65
@@ -1937,7 +1937,7 @@ pcolor_classic and scatter_classic.
19371937

19381938
The return value from pcolor is a PolyCollection. Most of the
19391939
propertes that are available on rectangles or other patches are also
1940-
available on PolyCollections, eg you can say::
1940+
available on PolyCollections, e.g., you can say::
19411941

19421942
c = scatter(blah, blah)
19431943
c.set_linewidth(1.0)
@@ -1955,7 +1955,7 @@ over the return value of scatter or pcolor to set properties for the
19551955
entire list.
19561956

19571957
If you want the different elements of a collection to vary on a
1958-
property, eg to have different line widths, see matplotlib.collections
1958+
property, e.g., to have different line widths, see matplotlib.collections
19591959
for a discussion on how to set the properties as a sequence.
19601960

19611961
For scatter, the size argument is now in points^2 (the area of the
@@ -2078,7 +2078,7 @@ Transformations
20782078
implementations, matplotlib.transforms.SeparableTransformation and
20792079
matplotlib.transforms.Affine. The SeparableTransformation is
20802080
constructed with the bounding box of the input (this determines the
2081-
rectangular coordinate system of the input, ie the x and y view
2081+
rectangular coordinate system of the input, i.e., the x and y view
20822082
limits), the bounding box of the display, and possibly nonlinear
20832083
transformations of x and y. The 2 most frequently used
20842084
transformations, data coordinates -> display and axes coordinates ->
@@ -2215,7 +2215,7 @@ Changes for 0.42
22152215
needed with double buffered drawing. Ditto with state change.
22162216
Text instances have a get_prop_tup method that returns a hashable
22172217
tuple of text properties which you can use to see if text props
2218-
have changed, eg by caching a font or layout instance in a dict
2218+
have changed, e.g., by caching a font or layout instance in a dict
22192219
with the prop tup as a key -- see RendererGTK.get_pango_layout in
22202220
backend_gtk for an example.
22212221

@@ -2236,7 +2236,7 @@ Changes for 0.42
22362236

22372237
* matplotlib.matlab._get_current_fig_manager renamed to
22382238
matplotlib.matlab.get_current_fig_manager to allow user access to
2239-
the GUI window attribute, eg figManager.window for GTK and
2239+
the GUI window attribute, e.g., figManager.window for GTK and
22402240
figManager.frame for wx
22412241

22422242
Changes for 0.40

doc/devel/documenting_mpl.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ Referring to mpl documents
362362
In the documentation, you may want to include to a document in the
363363
matplotlib src, e.g., a license file or an image file from `mpl-data`,
364364
refer to it via a relative path from the document where the rst file
365-
resides, eg, in :file:`users/navigation_toolbar.rst`, we refer to the
365+
resides, e.g., in :file:`users/navigation_toolbar.rst`, we refer to the
366366
image icons with::
367367

368368
.. image:: ../../lib/matplotlib/mpl-data/images/subplots.png
@@ -392,7 +392,7 @@ So we can include plots from the examples dir using the symlink::
392392

393393

394394
We used to use a symlink for :file:`mpl-data` too, but the distro
395-
becomes very large on platforms that do not support links (eg the font
395+
becomes very large on platforms that do not support links (e.g., the font
396396
files are duplicated and large)
397397

398398
.. _internal-section-refs:
@@ -401,7 +401,7 @@ Internal section references
401401
===========================
402402

403403
To maximize internal consistency in section labeling and references,
404-
use hyphen separated, descriptive labels for section references, eg::
404+
use hyphen separated, descriptive labels for section references, e.g.,::
405405

406406
.. _howto-webapp:
407407

@@ -429,7 +429,7 @@ Section names, etc
429429
==================
430430

431431
For everything but top level chapters, please use ``Upper lower`` for
432-
section titles, eg ``Possible hangups`` rather than ``Possible
432+
section titles, e.g., ``Possible hangups`` rather than ``Possible
433433
Hangups``
434434

435435
Inheritance diagrams

doc/devel/license.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ distributing L/GPL code through an separate channel, possibly a
1414
toolkit. If you include code, make sure you include a copy of that
1515
code's license in the license directory if the code's license requires
1616
you to distribute the license with it. Non-BSD compatible licenses
17-
are acceptable in matplotlib toolkits (eg basemap), but make sure you
17+
are acceptable in matplotlib toolkits (e.g., basemap), but make sure you
1818
clearly state the licenses you are using.
1919

2020
Why BSD compatible?

doc/devel/release_guide.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Testing
1919
* Run :file:`unit/memleak_hawaii3.py` and make sure there are no
2020
memory leaks
2121

22-
* try some GUI examples, eg :file:`simple_plot.py` with GTKAgg, TkAgg, etc...
22+
* try some GUI examples, e.g., :file:`simple_plot.py` with GTKAgg, TkAgg, etc...
2323

2424
* remove font cache and tex cache from :file:`.matplotlib` and test
2525
with and without cache on some example script

doc/faq/howto_faq.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Find all objects in a figure of a certain type
2222
Every matplotlib artist (see :ref:`artist-tutorial`) has a method
2323
called :meth:`~matplotlib.artist.Artist.findobj` that can be used to
2424
recursively search the artist for any artists it may contain that meet
25-
some criteria (eg match all :class:`~matplotlib.lines.Line2D`
25+
some criteria (e.g., match all :class:`~matplotlib.lines.Line2D`
2626
instances or match some arbitrary filter function). For example, the
2727
following snippet finds every object in the figure which has a
2828
`set_color` property and makes the object blue::
@@ -63,7 +63,7 @@ The :meth:`~matplotlib.pyplot.savefig` command has a keyword argument
6363
backgrounds transparent when saving, but will not affect the displayed
6464
image on the screen.
6565

66-
If you need finer grained control, eg you do not want full transparency
66+
If you need finer grained control, e.g., you do not want full transparency
6767
or you want to affect the screen displayed version as well, you can set
6868
the alpha properties directly. The figure has a
6969
:class:`~matplotlib.patches.Rectangle` instance called *patch*
@@ -194,7 +194,7 @@ this chicken and egg problem is to wait until the figure is draw by
194194
connecting
195195
(:meth:`~matplotlib.backend_bases.FigureCanvasBase.mpl_connect`) to the
196196
"on_draw" signal (:class:`~matplotlib.backend_bases.DrawEvent`) and
197-
get the window extent there, and then do something with it, eg move
197+
get the window extent there, and then do something with it, e.g., move
198198
the left of the canvas over; see :ref:`event-handling-tutorial`.
199199

200200
Here is an example that gets a bounding box in relative figure coordinates
@@ -252,10 +252,10 @@ setting in the right subplots.
252252
Skip dates where there is no data
253253
---------------------------------
254254

255-
When plotting time series, eg financial time series, one often wants
256-
to leave out days on which there is no data, eg weekends. By passing
255+
When plotting time series, e.g., financial time series, one often wants
256+
to leave out days on which there is no data, e.g., weekends. By passing
257257
in dates on the x-xaxis, you get large horizontal gaps on periods when
258-
there is not data. The solution is to pass in some proxy x-data, eg
258+
there is not data. The solution is to pass in some proxy x-data, e.g.,
259259
evenly sampled indices, and then use a custom formatter to format
260260
these as dates. The example below shows how to use an 'index formatter'
261261
to achieve the desired plot::
@@ -559,7 +559,7 @@ at the end of the page in the sidebar (or `here
559559
The sphinx website is a good resource for learning sphinx, but we have
560560
put together a cheat-sheet at :ref:`documenting-matplotlib` which
561561
shows you how to get started, and outlines the matplotlib conventions
562-
and extensions, eg for including plots directly from external code in
562+
and extensions, e.g., for including plots directly from external code in
563563
your documents.
564564

565565
Once your documentation contributions are working (and hopefully

doc/faq/installing_faq.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ Standalone binary installers for Windows
391391
If you have already installed Python and numpy, you can use one of the
392392
matplotlib binary installers for windows -- you can get these from the
393393
`download <http://matplotlib.org/downloads.html>`_ site. Chose the files with
394-
an ``.exe`` extension that match your version of Python (eg ``py2.7`` if you
394+
an ``.exe`` extension that match your version of Python (e.g., ``py2.7`` if you
395395
installed Python 2.7). If you haven't already installed Python, you can get
396396
the official version from the `Python web site
397397
<http://python.org/download/>`_.

doc/faq/troubleshooting_faq.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ If you compiled matplotlib yourself, please also provide
125125
platform that are useful for the matplotlib developers to diagnose
126126
your problem.
127127

128-
* your compiler version -- eg, ``gcc --version``
128+
* your compiler version -- e.g., ``gcc --version``
129129

130130
Including this information in your first e-mail to the mailing list
131131
will save a lot of time.

doc/faq/usage_faq.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ others in web application servers to dynamically serve up graphs.
295295

296296
To support all of these use cases, matplotlib can target different
297297
outputs, and each of these capabilities is called a backend; the
298-
"frontend" is the user facing code, ie the plotting code, whereas the
298+
"frontend" is the user facing code, i.e., the plotting code, whereas the
299299
"backend" does all the hard work behind-the-scenes to make the figure.
300300
There are two types of backends: user interface backends (for use in
301301
pygtk, wxpython, tkinter, qt4, or macosx; also referred to as
@@ -336,7 +336,7 @@ from the canvas (the place where the drawing goes). The canonical
336336
renderer for user interfaces is ``Agg`` which uses the `Anti-Grain
337337
Geometry`_ C++ library to make a raster (pixel) image of the figure.
338338
All of the user interfaces except ``macosx`` can be used with
339-
agg rendering, eg
339+
agg rendering, e.g.,
340340
``WXAgg``, ``GTKAgg``, ``QT4Agg``, ``TkAgg``. In
341341
addition, some of the user interfaces support other rendering engines.
342342
For example, with GTK, you can also select GDK rendering (backend

doc/users/artists.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,7 @@ set_major_formatter)
577577
====================== =========================================================
578578
Accessor method Description
579579
====================== =========================================================
580-
get_scale The scale of the axis, eg 'log' or 'linear'
580+
get_scale The scale of the axis, e.g., 'log' or 'linear'
581581
get_view_interval The interval instance of the axis view limits
582582
get_data_interval The interval instance of the axis data limits
583583
get_gridlines A list of grid lines for the Axis

doc/users/event_handling.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ Object picking
410410
==============
411411

412412
You can enable picking by setting the ``picker`` property of an
413-
:class:`~matplotlib.artist.Artist` (eg a matplotlib
413+
:class:`~matplotlib.artist.Artist` (e.g., a matplotlib
414414
:class:`~matplotlib.lines.Line2D`, :class:`~matplotlib.text.Text`,
415415
:class:`~matplotlib.patches.Patch`, :class:`~matplotlib.patches.Polygon`,
416416
:class:`~matplotlib.patches.AxesImage`, etc...)
@@ -429,7 +429,7 @@ There are a variety of meanings of the ``picker`` property:
429429
points and the the artist will fire off an event if its data is
430430
within epsilon of the mouse event. For some artists like lines
431431
and patch collections, the artist may provide additional data to
432-
the pick event that is generated, eg the indices of the data
432+
the pick event that is generated, e.g., the indices of the data
433433
within epsilon of the pick event.
434434

435435
``function``
@@ -457,7 +457,7 @@ your callback is always fired with two attributes:
457457

458458
``mouseevent`` the mouse event that generate the pick event. The
459459
mouse event in turn has attributes like ``x`` and ``y`` (the
460-
coords in display space, eg pixels from left, bottom) and xdata,
460+
coords in display space, e.g., pixels from left, bottom) and xdata,
461461
ydata (the coords in data space). Additionally, you can get
462462
information about which buttons were pressed, which keys were
463463
pressed, which :class:`~matplotlib.axes.Axes` the mouse is over,
@@ -471,7 +471,7 @@ your callback is always fired with two attributes:
471471
Additionally, certain artists like :class:`~matplotlib.lines.Line2D`
472472
and :class:`~matplotlib.collections.PatchCollection` may attach
473473
additional meta data like the indices into the data that meet the
474-
picker criteria (eg all the points in the line that are within the
474+
picker criteria (e.g., all the points in the line that are within the
475475
specified epsilon tolerance)
476476

477477
Simple picking example

doc/users/license.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Matplotlib only uses BSD compatible code, and its license is based on
99
the `PSF <http://www.python.org/psf/license>`_ license. See the Open
1010
Source Initiative `licenses page
1111
<http://www.opensource.org/licenses>`_ for details on individual
12-
licenses. Non-BSD compatible licenses (eg LGPL) are acceptable in
12+
licenses. Non-BSD compatible licenses (e.g., LGPL) are acceptable in
1313
matplotlib toolkits. For a discussion of the motivations behind the
1414
licencing choice, see :ref:`license-discussion`.
1515

doc/users/mathtext.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ The default font is *italics* for mathematical symbols.
161161
This is useful, for example, to use the same font as regular
162162
non-math text for math text, by setting it to ``regular``.
163163

164-
To change fonts, eg, to write "sin" in a Roman font, enclose the text
164+
To change fonts, e.g., to write "sin" in a Roman font, enclose the text
165165
in a font command::
166166

167167
r'$s(t) = \mathcal{A}\mathrm{sin}(2 \omega t)$'

doc/users/path_tutorial.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,14 +122,14 @@ All of the simple patch primitives in matplotlib, Rectangle, Circle,
122122
Polygon, etc, are implemented with simple path. Plotting functions
123123
like :meth:`~matplotlib.axes.Axes.hist` and
124124
:meth:`~matplotlib.axes.Axes.bar`, which create a number of
125-
primitives, eg a bunch of Rectangles, can usually be implemented more
125+
primitives, e.g., a bunch of Rectangles, can usually be implemented more
126126
efficiently using a compound path. The reason ``bar`` creates a list
127127
of rectangles and not a compound path is largely historical: the
128128
:class:`~matplotlib.path.Path` code is comparatively new and ``bar``
129129
predates it. While we could change it now, it would break old code,
130130
so here we will cover how to create compound paths, replacing the
131131
functionality in bar, in case you need to do so in your own code for
132-
efficiency reasons, eg you are creating an animated bar plot.
132+
efficiency reasons, e.g., you are creating an animated bar plot.
133133

134134
We will make the histogram chart by creating a series of rectangles
135135
for each histogram bar: the rectangle width is the bin width and the

doc/users/pyplot_tutorial.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Pyplot tutorial
77
:mod:`matplotlib.pyplot` is a collection of command style functions
88
that make matplotlib work like MATLAB.
99
Each ``pyplot`` function makes
10-
some change to a figure: eg, create a figure, create a plotting area
10+
some change to a figure: e.g., create a figure, create a plotting area
1111
in a figure, plot some lines in a plotting area, decorate the plot
1212
with labels, etc.... :mod:`matplotlib.pyplot` is stateful, in that it
1313
keeps track of the current figure and plotting area, and the plotting
@@ -71,7 +71,7 @@ several ways to set line properties
7171

7272

7373
* Use the setter methods of the ``Line2D`` instance. ``plot`` returns a list
74-
of lines; eg ``line1, line2 = plot(x1,y1,x2,y2)``. Below I have only
74+
of lines; e.g., ``line1, line2 = plot(x1,y1,x2,y2)``. Below I have only
7575
one line so it is a list of length 1. I use tuple unpacking in the
7676
``line, = plot(x, y, 'o')`` to get the first element of the list::
7777

@@ -170,7 +170,7 @@ numcols, fignum`` where ``fignum`` ranges from 1 to
170170
``numrows*numcols``. The commas in the ``subplot`` command are
171171
optional if ``numrows*numcols<10``. So ``subplot(211)`` is identical
172172
to ``subplot(2,1,1)``. You can create an arbitrary number of subplots
173-
and axes. If you want to place an axes manually, ie, not on a
173+
and axes. If you want to place an axes manually, i.e., not on a
174174
rectangular grid, use the :func:`~matplotlib.pyplot.axes` command,
175175
which allows you to specify the location as ``axes([left, bottom,
176176
width, height])`` where all values are in fractional (0 to 1)

0 commit comments

Comments
 (0)