Skip to content

Commit d7879bc

Browse files
committed
Merge remote-tracking branch 'matplotlib/v2.x'
Conflicts: doc/_templates/index.html - keep upstream changes around extension modules lib/matplotlib/backends/backend_qt5.py - keep both sets of overlapping changes. None-related, just hit same whitespace lib/matplotlib/tests/test_axes.py - do not resurect nose-spcefic main function
2 parents 3f7dad4 + 592e509 commit d7879bc

File tree

7 files changed

+610
-333
lines changed

7 files changed

+610
-333
lines changed

doc/_templates/index.html

Lines changed: 22 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{% extends "layout.html" %}
2-
{% set title = 'matplotlib: python plotting' %}
2+
{% set title = 'Matplotlib: Python plotting' %}
33

44
{% block extrahead %}
55
<script>
@@ -45,16 +45,13 @@
4545

4646
<h1>Introduction</h1>
4747

48-
<p>matplotlib is a python 2D plotting library which produces
48+
<p>Matplotlib is a Python 2D plotting library which produces
4949
publication quality figures in a variety of hardcopy formats and
50-
interactive environments across platforms. matplotlib can be used
51-
in python scripts, the python and <a
52-
href="http://ipython.org">ipython</a> shell (ala
53-
MATLAB<sup>&reg;<a name="matlab" href="#ftn.matlab">*</a></sup>
54-
or
55-
Mathematica<sup>&reg;<a name="mathematica"
56-
href="#ftn.mathematica">&#8224;</a></sup>),
57-
web application servers, and six graphical user
50+
interactive environments across platforms. Matplotlib can be used
51+
in Python scripts, the Python and <a
52+
href="http://ipython.org">IPython</a> shell,
53+
the <a href="http://jupyter.org/index.html">jupyter</a> notebook,
54+
web application servers, and four graphical user
5855
interface toolkits.</p>
5956

6057
<div class="responsive_screenshots">
@@ -75,52 +72,26 @@ <h1>Introduction</h1>
7572
</div>
7673
<span class="clear_screenshots"></span>
7774

78-
<p>matplotlib tries to make easy things easy and hard things possible.
75+
<p>Matplotlib tries to make easy things easy and hard things possible.
7976
You can generate plots, histograms, power spectra, bar charts,
80-
errorcharts, scatterplots, etc, with just a few lines of code.
77+
errorcharts, scatterplots, etc., with just a few lines of code.
8178
For a sampling, see the <a href="{{ pathto('users/screenshots') }}">screenshots</a>, <a href="{{ pathto('gallery') }}">thumbnail</a> gallery, and
8279
<a href="{{ pathto('examples/index') }}">examples</a> directory</p>
8380

84-
<p>For simple plotting the <tt>pyplot</tt> interface provides a
81+
<p>For simple plotting the <tt>pyplot</tt> module provides a
8582
MATLAB-like interface, particularly when combined
8683
with <tt>IPython</tt>. For the power user, you have full control
8784
of line styles, font properties, axes properties, etc, via an object
8885
oriented interface or via a set of functions familiar to MATLAB
8986
users.</p>
9087

91-
<div style="float: right; min-width: 450px; width: 50%; padding-left: 5%;">
92-
<h1>John Hunter (1968-2012)</h1>
93-
<table bgcolor="#ddddff">
94-
<tr>
95-
<td>
96-
<img src="_static/John-hunter-crop-2.jpg" align="left" />
97-
</td>
98-
<td>
99-
<p>
100-
On August 28 2012, John D. Hunter, the creator of matplotlib, died
101-
from complications arising from cancer treatment, after a brief but
102-
intense battle with this terrible illness. John is survived by his
103-
wife Miriam, his three daughters Rahel, Ava and Clara, his sisters
104-
Layne and Mary, and his mother Sarah.</p>
105-
106-
<p>
107-
If you have benefited from John's many contributions, please say
108-
thanks in the way that would matter most to him. Please consider
109-
making a donation to
110-
the <a href="http://numfocus.org/johnhunter/">John Hunter Technology
111-
Fellowship</a>.</p>
112-
</td>
113-
</tr>
114-
</table>
115-
</div>
116-
11788
<h1>Installation</h1>
11889

119-
Visit the <a href="{{ pathto('users/installing') }}">matplotlib installation instructions</a>.
90+
Visit the <a href="{{ pathto('users/installing') }}">Matplotlib installation instructions</a>.
12091

12192
<h1>Documentation</h1>
12293

123-
This is the documentation for matplotlib version {{ version }}.
94+
This is the documentation for Matplotlib version {{ version }}.
12495

12596
<p id="other_versions"></p>
12697
<script>
@@ -139,28 +110,28 @@ <h4>Other learning resources</h4>
139110

140111
<h4>Need help?</h4>
141112

142-
<p>matplotlib is a welcoming, inclusive project, and we try to follow
113+
<p>Matplotlib is a welcoming, inclusive project, and we try to follow
143114
the <a href="http://www.python.org/psf/codeofconduct/">Python Software
144115
Foundation Code of Conduct</a> in everything we do.</p>
145116

146117
<p>Check the <a href="{{ pathto('faq/index') }}">faq</a>,
147-
the <a href="{{ pathto('api/index') }}">api</a> docs and
118+
the <a href="{{ pathto('api/index') }}">api</a> docs and
148119
<a href="http://matplotlib.1069221.n5.nabble.com/matplotlib-users-f3.html">mailing list archives</a> for resources.
149120
Join the <a href="https://gitter.im/matplotlib/matplotlib">gitter</a> and the mailing lists: <a href="https://mail.python.org/mailman/listinfo/matplotlib-users">Users</a>,
150121
<a href="https://mail.python.org/mailman/listinfo/matplotlib-announce">Announce</a> and
151122
<a href="https://mail.python.org/mailman/listinfo/matplotlib-devel">Devel</a>.
152-
Check out the matplotlib questions
123+
Check out the Matplotlib questions
153124
on <a href="http://stackoverflow.com/questions/tagged/matplotlib">stackoverflow</a>.
154125
The <a href="{{ pathto('search') }}">search</a> tool searches all of
155126
the documentation, including full text search of over 350 complete
156-
examples which exercise almost every corner of matplotlib.</p>
127+
examples which exercise almost every corner of Matplotlib.</p>
157128

158129
<p>You can file bugs, patches and feature requests on the
159130
github
160131
<a href="https://github.com/matplotlib/matplotlib/issues?sort=created&direction=desc&state=open">tracker</a>,
161132
but it is a good idea to ping us on the mailing list too.</p>
162133

163-
<p>To keep up to date with what's going on in matplotlib, see
134+
<p>To keep up to date with what's going on in Matplotlib, see
164135
the <a href="{{ pathto('users/whats_new.html', 1) }}">what's new
165136
page</a> or browse the <a href="https://github.com/matplotlib/matplotlib">source
166137
code</a>. Anything that could require changes to your existing code
@@ -187,14 +158,14 @@ <h1>Third party packages</h1>
187158
<a href="http://scitools.org.uk/cartopy/docs/latest">cartopy</a>.
188159
</p>
189160

190-
<h1>Citing matplotlib</h1>
161+
<h1>Citing Matplotlib</h1>
191162

192163
<p>
193-
matplotlib is the brainchild of John Hunter (1968-2012), who, along with its many
164+
Matplotlib is the brainchild of John Hunter (1968-2012), who, along with its many
194165
contributors, have put an immeasurable amount of time and effort into producing a
195166
piece of software utilized by thousands of scientists worldwide.
196167

197-
If matplotlib contributes to a project that leads to a scientific publication,
168+
If Matplotlib contributes to a project that leads to a scientific publication,
198169
please acknowledge this work by citing the project. You can use this
199170
<a href="{{ pathto('citing') }}">ready-made citation entry</a>.
200171
</p>
@@ -205,12 +176,12 @@ <h1>Open source</h1>
205176
<p>
206177
Please
207178
consider <a href="https://www.flipcause.com/widget/MjI1OA==">donating
208-
to the matplotlib project</a> through the Numfocus organization or to
179+
to the Matplotlib project</a> through the Numfocus organization or to
209180
the <a href="http://numfocus.org/johnhunter/">John Hunter Technology Fellowship</a>.
210181
</p>
211182

212183
<p>
213-
The matplotlib <a href="{{ pathto('users/license') }}">license</a> is based on the Python Software Foundation
184+
The Matplotlib <a href="{{ pathto('users/license') }}">license</a> is based on the Python Software Foundation
214185
<a href="http://www.python.org/psf/license">(PSF)</a> license.
215186
</p>
216187

@@ -231,9 +202,5 @@ <h1>Open source</h1>
231202
<sup><a name="ftn.matlab" href="#matlab">*</a></sup>
232203
MATLAB is a registered trademark of The MathWorks, Inc.
233204
</p>
234-
<p>
235-
<sup><a name="ftn.mathematica" href="#mathematica">&#8224;</a></sup>
236-
Mathematica is a registered trademark of Wolfram Research, Inc.
237-
</p>
238205

239206
{% endblock %}

doc/devel/contributing.rst

Lines changed: 46 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -48,44 +48,65 @@ Thank you for your help in keeping bug reports complete, targeted and descriptiv
4848
Retrieving and installing the latest version of the code
4949
========================================================
5050

51+
When working on the Matplotlib source, setting up a `virtual
52+
environment
53+
<http://docs.python-guide.org/en/latest/dev/virtualenvs/>`_ or a
54+
`conda environment <http://conda.pydata.org/docs/using/envs.html>`_ is
55+
recommended.
56+
57+
.. warning::
58+
59+
If you already have a version of Matplotlib installed, use an
60+
virtual environment or uninstall using the same method you used
61+
to install it. Installing multiple versions of Matplotlib via different
62+
methods into the same environment may not always work as expected.
5163

5264
We use `Git <https://git-scm.com/>`_ for version control and
5365
`GitHub <https://github.com/>`_ for hosting our main repository.
5466

55-
You can check out the latest sources with the command::
67+
You can check out the latest sources with the command (see
68+
:ref:`set-up-fork` for more details)::
5669

5770
git clone git@github.com:matplotlib/matplotlib.git
5871

72+
and navigate to the :file:`matplotlib` directory.
5973

60-
After obtaining a local copy of the matplotlib source code (:ref:`set-up-fork`),
61-
navigate to the matplotlib directory and run the following in the shell::
74+
To make sure the tests run locally you must build against the correct version
75+
of freetype. To configure the build system to fetch and build it either export
76+
the env ``MPLLOCALFREETYPE`` as::
6277

63-
python setup.py develop
78+
export MPLLOCALFREETYPE=1
6479

65-
or::
80+
or copy :file:`setup.cfg.template` to :file:`setup.cfg` and edit to contain ::
6681

67-
pip install -v -e .
82+
[test]
83+
local_freetype = True
6884

6985

70-
This installs matplotlib for development (i.e., builds everything and places the
71-
symbolic links back to the source code).
86+
To install Matplotlib (and compile the c-extensions) run the following
87+
command from the top-level directory ::
7288

73-
.. warning::
89+
pip install -v -e ./
7490

75-
If you already have a version of matplotlib installed, you will need to
76-
uninstall it.
91+
This installs Matplotlib in 'editable/develop mode', i.e., builds
92+
everything and places the correct link entries in the install
93+
directory so that python will be able to import Matplotlib from the
94+
source directory. Thus, any changes to the ``*.py`` files will be
95+
reflected the next time you import the library. If you change the
96+
c-extension source (which might happen if you change branches) you
97+
will need to run::
7798

99+
python setup.py build
78100

79-
.. note::
101+
or re-run ``pip install -v -e ./``.
80102

81-
If you decide to do install with ``python setup.py develop`` or ``pip
82-
install -v -e``, you will have to rerun::
83103

84-
python setup.py build
104+
Alternatively, if you do ::
85105

86-
every time the source code of a compiled extension is changed (for
87-
instance when switching branches or pulling changes from upstream).
106+
pip install -v ./
88107

108+
all of the files will be copied to the installation directory however,
109+
you will have to rerun this command every time the source is changed.
89110

90111

91112
You can then run the tests to check your work environment is set up properly::
@@ -102,18 +123,6 @@ You can then run the tests to check your work environment is set up properly::
102123
<https://docs.python.org/dev/library/unittest.mock.html>`_ (if python < 3.3), `Ghostscript
103124
<https://www.ghostscript.com/>`_, `Inkscape <https://inkscape.org>`_
104125

105-
.. note:: To make sure the tests run locally:
106-
107-
* Copy setup.cfg.template to setup.cfg
108-
* Edit setup.cfg to set ``test`` to True, and ``local_freetype`` to True
109-
* If you have built matplotlib previously, remove the ``build`` folder.
110-
* Execute the build command.
111-
112-
When working on bleeding edge packages, setting up a
113-
`virtual environment
114-
<http://docs.python-guide.org/en/latest/dev/virtualenvs/>`_ or a `conda
115-
environment <http://conda.pydata.org/docs/using/envs.html>`_ is recommended.
116-
117126
.. seealso::
118127

119128
* :ref:`testing`
@@ -125,7 +134,7 @@ Contributing code
125134
How to contribute
126135
-----------------
127136

128-
The preferred way to contribute to matplotlib is to fork the `main
137+
The preferred way to contribute to Matplotlib is to fork the `main
129138
repository <https://github.com/matplotlib/matplotlib/>`__ on GitHub,
130139
then submit a "pull request" (PR):
131140

@@ -158,7 +167,7 @@ then submit a "pull request" (PR):
158167

159168
$ git push -u origin my-feature
160169

161-
Finally, go to the web page of your fork of the matplotlib repo,
170+
Finally, go to the web page of your fork of the Matplotlib repo,
162171
and click 'Pull request' to send your changes to the maintainers for review.
163172
You may want to consider sending an email to the mailing list for more
164173
visibility.
@@ -234,7 +243,7 @@ tools:
234243

235244
.. note::
236245

237-
The current state of the matplotlib code base is not compliant with all
246+
The current state of the Matplotlib code base is not compliant with all
238247
of those guidelines, but we expect that enforcing those constraints on all
239248
new contributions will move the overall code base quality in the right
240249
direction.
@@ -257,7 +266,7 @@ New contributors should look for the following tags when looking for issues.
257266
We strongly recommend that new contributors tackle
258267
`new-contributor-friendly <https://github.com/matplotlib/matplotlib/labels/new-contributor-friendly>`_
259268
issues (easy, well documented issues, that do not require an understanding of
260-
the different submodules of matplotlib) and
269+
the different submodules of Matplotlib) and
261270
`Easy-fix <https://github.com/matplotlib/matplotlib/labels/Difficulty%3A%20Easy>`_
262271
issues. This helps the contributor become familiar with the contribution
263272
workflow, and for the core devs to become acquainted with the contributor;
@@ -269,7 +278,7 @@ Other ways to contribute
269278
=========================
270279

271280

272-
Code is not the only way to contribute to matplotlib. For instance,
281+
Code is not the only way to contribute to Matplotlib. For instance,
273282
documentation is also a very important part of the project and often doesn't
274283
get as much attention as it deserves. If you find a typo in the documentation,
275284
or have made improvements, do not hesitate to send an email to the mailing
@@ -399,10 +408,10 @@ Developing a new backend
399408
If you are working on a custom backend, the *backend* setting in
400409
:file:`matplotlibrc` (:ref:`customizing-matplotlib`) supports an
401410
external backend via the ``module`` directive. if
402-
:file:`my_backend.py` is a matplotlib backend in your
411+
:file:`my_backend.py` is a Matplotlib backend in your
403412
:envvar:`PYTHONPATH`, you can set it on one of several ways
404413

405-
* in matplotlibrc::
414+
* in :file:`matplotlibrc`::
406415

407416
backend : module://my_backend
408417

@@ -433,7 +442,7 @@ when the website is built to show up both in the `examples
433442
<../gallery.html>`_ sections of the website.
434443

435444
Any sample data that the example uses should be kept small and
436-
distributed with matplotlib in the
445+
distributed with Matplotlib in the
437446
`lib/matplotlib/mpl-data/sample_data/` directory. Then in your
438447
example code you can load it into a file handle with::
439448

0 commit comments

Comments
 (0)