Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/v1.4.x'
Browse files Browse the repository at this point in the history
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
  • Loading branch information
mdboom committed Nov 5, 2014
2 parents 6e36226 + f52b90b commit 68176eb
Show file tree
Hide file tree
Showing 67 changed files with 217 additions and 176 deletions.
6 changes: 2 additions & 4 deletions INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,8 @@ libpng 1.2 (or later)
`pytz`
Used to manipulate time-zone aware datetimes.

:term:`freetype` 2.3 or later
library for reading true type font files.


Optional GUI framework
Expand Down Expand Up @@ -246,10 +248,6 @@ Optional dependencies
selection of image file formats.


:term:`freetype` 2.3 or later
library for reading true type font files.


Required libraries that ship with matplotlib
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
:term:`agg` 2.4
Expand Down
2 changes: 1 addition & 1 deletion doc/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ documentation. All of the documentation is written using sphinx, a
python documentation system built on top of ReST. This directory contains


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

* devel - documentation for matplotlib developers
Expand Down
2 changes: 2 additions & 0 deletions doc/_templates/citing.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ <h1>Citing matplotlib</h1>

<h2>DOIs</h2>
<dl>
<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>
<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>
<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>
</dl>

Expand Down
12 changes: 11 additions & 1 deletion doc/_templates/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,17 @@ <h3>{{ _('Navigation') }}</h3>
href="http://sphinx-doc.org/">Sphinx</a> {{ sphinx_version }}.{% endtrans %}
{%- endif %}
</div>
{%- endblock %}
{%- endblock %}

<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-55954603-1', 'auto');
ga('send', 'pageview');

</script>
</body>
</html>
16 changes: 8 additions & 8 deletions doc/api/api_changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1305,7 +1305,7 @@ Changes for 0.90.1
units.ConversionInterface.tickers renamed to
units.ConversionInterface.axisinfo and it now returns a
units.AxisInfo object rather than a tuple. This will make it
easier to add axis info functionality (eg I added a default label
easier to add axis info functionality (e.g., I added a default label
on this iteration) w/o having to change the tuple length and hence
the API of the client code every time new functionality is added.
Also, units.ConversionInterface.convert_to_value is now simply
Expand Down Expand Up @@ -1790,7 +1790,7 @@ Changes for 0.71
pylab still imports most of the symbols from Numerix, MLab, fft,
etc, but is more cautious. For names that clash with python names
(min, max, sum), pylab keeps the builtins and provides the numeric
versions with an a* prefix, eg (amin, amax, asum)
versions with an a* prefix, e.g., (amin, amax, asum)

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

Changes for 0.65
Expand Down Expand Up @@ -1937,7 +1937,7 @@ pcolor_classic and scatter_classic.

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

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

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

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

Expand All @@ -2236,7 +2236,7 @@ Changes for 0.42

* matplotlib.matlab._get_current_fig_manager renamed to
matplotlib.matlab.get_current_fig_manager to allow user access to
the GUI window attribute, eg figManager.window for GTK and
the GUI window attribute, e.g., figManager.window for GTK and
figManager.frame for wx

Changes for 0.40
Expand Down
8 changes: 4 additions & 4 deletions doc/devel/documenting_mpl.rst
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ Referring to mpl documents
In the documentation, you may want to include to a document in the
matplotlib src, e.g., a license file or an image file from `mpl-data`,
refer to it via a relative path from the document where the rst file
resides, eg, in :file:`users/navigation_toolbar.rst`, we refer to the
resides, e.g., in :file:`users/navigation_toolbar.rst`, we refer to the
image icons with::

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


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

.. _internal-section-refs:
Expand All @@ -401,7 +401,7 @@ Internal section references
===========================

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

.. _howto-webapp:

Expand Down Expand Up @@ -429,7 +429,7 @@ Section names, etc
==================

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

Inheritance diagrams
Expand Down
2 changes: 1 addition & 1 deletion doc/devel/license.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ distributing L/GPL code through an separate channel, possibly a
toolkit. If you include code, make sure you include a copy of that
code's license in the license directory if the code's license requires
you to distribute the license with it. Non-BSD compatible licenses
are acceptable in matplotlib toolkits (eg basemap), but make sure you
are acceptable in matplotlib toolkits (e.g., basemap), but make sure you
clearly state the licenses you are using.

Why BSD compatible?
Expand Down
2 changes: 1 addition & 1 deletion doc/devel/release_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Testing
* Run :file:`unit/memleak_hawaii3.py` and make sure there are no
memory leaks

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

* remove font cache and tex cache from :file:`.matplotlib` and test
with and without cache on some example script
Expand Down
14 changes: 7 additions & 7 deletions doc/faq/howto_faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Find all objects in a figure of a certain type
Every matplotlib artist (see :ref:`artist-tutorial`) has a method
called :meth:`~matplotlib.artist.Artist.findobj` that can be used to
recursively search the artist for any artists it may contain that meet
some criteria (eg match all :class:`~matplotlib.lines.Line2D`
some criteria (e.g., match all :class:`~matplotlib.lines.Line2D`
instances or match some arbitrary filter function). For example, the
following snippet finds every object in the figure which has a
`set_color` property and makes the object blue::
Expand Down Expand Up @@ -63,7 +63,7 @@ The :meth:`~matplotlib.pyplot.savefig` command has a keyword argument
backgrounds transparent when saving, but will not affect the displayed
image on the screen.

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

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

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

Once your documentation contributions are working (and hopefully
Expand Down
2 changes: 1 addition & 1 deletion doc/faq/installing_faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ Standalone binary installers for Windows
If you have already installed Python and numpy, you can use one of the
matplotlib binary installers for windows -- you can get these from the
`download <http://matplotlib.org/downloads.html>`_ site. Chose the files with
an ``.exe`` extension that match your version of Python (eg ``py2.7`` if you
an ``.exe`` extension that match your version of Python (e.g., ``py2.7`` if you
installed Python 2.7). If you haven't already installed Python, you can get
the official version from the `Python web site
<http://python.org/download/>`_.
2 changes: 1 addition & 1 deletion doc/faq/troubleshooting_faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ If you compiled matplotlib yourself, please also provide
platform that are useful for the matplotlib developers to diagnose
your problem.

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

Including this information in your first e-mail to the mailing list
will save a lot of time.
Expand Down
4 changes: 2 additions & 2 deletions doc/faq/usage_faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ others in web application servers to dynamically serve up graphs.

To support all of these use cases, matplotlib can target different
outputs, and each of these capabilities is called a backend; the
"frontend" is the user facing code, ie the plotting code, whereas the
"frontend" is the user facing code, i.e., the plotting code, whereas the
"backend" does all the hard work behind-the-scenes to make the figure.
There are two types of backends: user interface backends (for use in
pygtk, wxpython, tkinter, qt4, or macosx; also referred to as
Expand Down Expand Up @@ -336,7 +336,7 @@ from the canvas (the place where the drawing goes). The canonical
renderer for user interfaces is ``Agg`` which uses the `Anti-Grain
Geometry`_ C++ library to make a raster (pixel) image of the figure.
All of the user interfaces except ``macosx`` can be used with
agg rendering, eg
agg rendering, e.g.,
``WXAgg``, ``GTKAgg``, ``QT4Agg``, ``TkAgg``. In
addition, some of the user interfaces support other rendering engines.
For example, with GTK, you can also select GDK rendering (backend
Expand Down
2 changes: 1 addition & 1 deletion doc/users/artists.rst
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@ set_major_formatter)
====================== =========================================================
Accessor method Description
====================== =========================================================
get_scale The scale of the axis, eg 'log' or 'linear'
get_scale The scale of the axis, e.g., 'log' or 'linear'
get_view_interval The interval instance of the axis view limits
get_data_interval The interval instance of the axis data limits
get_gridlines A list of grid lines for the Axis
Expand Down
8 changes: 4 additions & 4 deletions doc/users/event_handling.rst
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ Object picking
==============

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

``function``
Expand Down Expand Up @@ -457,7 +457,7 @@ your callback is always fired with two attributes:

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

Simple picking example
Expand Down
2 changes: 1 addition & 1 deletion doc/users/license.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Matplotlib only uses BSD compatible code, and its license is based on
the `PSF <http://www.python.org/psf/license>`_ license. See the Open
Source Initiative `licenses page
<http://www.opensource.org/licenses>`_ for details on individual
licenses. Non-BSD compatible licenses (eg LGPL) are acceptable in
licenses. Non-BSD compatible licenses (e.g., LGPL) are acceptable in
matplotlib toolkits. For a discussion of the motivations behind the
licencing choice, see :ref:`license-discussion`.

Expand Down
2 changes: 1 addition & 1 deletion doc/users/mathtext.rst
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ The default font is *italics* for mathematical symbols.
This is useful, for example, to use the same font as regular
non-math text for math text, by setting it to ``regular``.

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

r'$s(t) = \mathcal{A}\mathrm{sin}(2 \omega t)$'
Expand Down
4 changes: 2 additions & 2 deletions doc/users/path_tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -122,14 +122,14 @@ All of the simple patch primitives in matplotlib, Rectangle, Circle,
Polygon, etc, are implemented with simple path. Plotting functions
like :meth:`~matplotlib.axes.Axes.hist` and
:meth:`~matplotlib.axes.Axes.bar`, which create a number of
primitives, eg a bunch of Rectangles, can usually be implemented more
primitives, e.g., a bunch of Rectangles, can usually be implemented more
efficiently using a compound path. The reason ``bar`` creates a list
of rectangles and not a compound path is largely historical: the
:class:`~matplotlib.path.Path` code is comparatively new and ``bar``
predates it. While we could change it now, it would break old code,
so here we will cover how to create compound paths, replacing the
functionality in bar, in case you need to do so in your own code for
efficiency reasons, eg you are creating an animated bar plot.
efficiency reasons, e.g., you are creating an animated bar plot.

We will make the histogram chart by creating a series of rectangles
for each histogram bar: the rectangle width is the bin width and the
Expand Down
6 changes: 3 additions & 3 deletions doc/users/pyplot_tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Pyplot tutorial
:mod:`matplotlib.pyplot` is a collection of command style functions
that make matplotlib work like MATLAB.
Each ``pyplot`` function makes
some change to a figure: eg, create a figure, create a plotting area
some change to a figure: e.g., create a figure, create a plotting area
in a figure, plot some lines in a plotting area, decorate the plot
with labels, etc.... :mod:`matplotlib.pyplot` is stateful, in that it
keeps track of the current figure and plotting area, and the plotting
Expand Down Expand Up @@ -71,7 +71,7 @@ several ways to set line properties


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

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

0 comments on commit 68176eb

Please sign in to comment.