8000 Merge remote-tracking branch 'matplotlib/v2.1.1-doc' into v2.1.x · matplotlib/matplotlib@d36c42c · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

8000
Appearance settings

Commit d36c42c

Browse files
committed
Merge remote-tracking branch 'matplotlib/v2.1.1-doc' into v2.1.x
2 parents 5b4dc83 + a4f0494 commit d36c42c

File tree

9 files changed

+106
-90
lines changed

9 files changed

+106
-90
lines changed

doc/_static/mpl_template_example.png

69.2 KB
Loading

doc/_static/plotnine.png

27.9 KB
Loading

doc/_templates/layout.html

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,9 +172,13 @@ <h3>{{ _('Navigation') }}</h3>
172172
{%- endif %}
173173
<div style="background-color: white; text-align: left; padding: 10px 10px 15px 15px; position: relative;">
174174
{%- if builder in ('htmlhelp', 'devhelp', 'latex') %}
175-
<a href="{{ pathto('index') }}"><img src="{{pathto("_static/logo2.png", 1) }}" width="540px" border="0" alt="matplotlib"/></a>
175+
<a href="{{ pathto('index') }}">
176+
<div style="float: left; position: absolute; width: 496px; bottom: 0; padding-bottom: 24px"><span style="float: right; color: #789; background: white">Version {{ version|e }}</span></div>
177+
<img src="{{pathto("_static/logo2.png", 1) }}" height="125px" border="0" alt="matplotlib"/></a>
176178
{%- else %}
177-
<a href="{{ pathto('index') }}"><img src="{{pathto("_static/logo2.svg", 1) }}" width="540px" border="0" alt="matplotlib"/></a>
179+
<a href="{{ pathto('index') }}">
180+
<div style="float: left; position: absolute; width: 496px; bottom: 0; padding-bottom: 24px"><span style="float: right; color: #789; background: white">Version {{ version|e }}</span></div>
181+
<img src="{{pathto("_static/logo2.png", 1) }}" height="125px" border="0" alt="matplotlib"/></a>
178182
{%- endif %}
179183

180184
<!-- The "Fork me on github" ribbon -->

doc/devel/contributing.rst

Lines changed: 72 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -19,26 +19,26 @@ welcome to post feature requests or pull requests.
1919

2020
If you are reporting a bug, please do your best to include the following:
2121

22-
1. A short, top-level summary of the bug. In most cases, this should be 1-2
23-
sentences.
22+
1. A short, top-level summary of the bug. In most cases, this should be 1-2
23+
sentences.
2424

25-
2. A short, self-contained code snippet to reproduce the bug, ideally allowing
26-
a simple copy and paste to reproduce. Please do your best to reduce the code
27-
snippet to the minimum required.
25+
2. A short, self-contained code snippet to reproduce the bug, ideally allowing
26+
a simple copy and paste to reproduce. Please do your best to reduce the code
27+
snippet to the minimum required.
2828

29-
3. The actual outcome of the code snippet
29+
3. The actual outcome of the code snippet.
3030

31-
4. The expected outcome of the code snippet
31+
4. The expected outcome of the code snippet.
3232

33-
5. The Matplotlib version, Python version and platform that you are using. You
34-
can grab the version with the following commands::
33+
5. The Matplotlib version, Python version and platform that you are using. You
34+
can grab the version with the following commands::
3535

36-
>>> import matplotlib
37-
>>> matplotlib.__version__
38-
'1.5.3'
39-
>>> import platform
40-
>>> platform.python_version()
41-
'2.7.12'
36+
>>> import matplotlib
37+
>>> matplotlib.__version__
38+
'1.5.3'
39+
>>> import platform
40+
>>> platform.python_version()
41+
'2.7.12'
4242

4343
We have preloaded the issue creation page with a Markdown template that you can
4444
use to organize this information.
@@ -170,39 +170,36 @@ The preferred way to contribute to Matplotlib is to fork the `main
170170
repository <https://github.com/matplotlib/matplotlib/>`__ on GitHub,
171171
then submit a "pull request" (PR):
172172

173-
1. `Create an account <https://github.com/join>`_ on
174-
GitHub if you do not already have one.
173+
1. `Create an account <https://github.com/join>`_ on GitHub if you do not
174+
already have one.
175175

176-
2. Fork the `project repository
177-
<https://github.com/matplotlib/matplotlib>`__: click on the 'Fork' button
178-
near the top of the page. This creates a copy of the code under your
179-
account on the GitHub server.
176+
2. Fork the `project repository <https://github.com/matplotlib/matplotlib>`_:
177+
click on the 'Fork' button near the top of the page. This creates a copy of
178+
the code under your account on the GitHub server.
180179

181-
3. Clone this copy to your local disk::
180+
3. Clone this copy to your local disk::
182181

183-
$ git clone https://github.com/YourLogin/matplotlib.git
182+
$ git clone https://github.com/YourLogin/matplotlib.git
184183

185-
4. Create a branch to hold your changes::
184+
4. Create a branch to hold your changes::
186185

187-
$ git checkout -b my-feature origin/master
186+
$ git checkout -b my-feature origin/master
188187

189-
and start making changes. Never work in the ``master`` branch!
188+
and start making changes. Never work in the ``master`` branch!
190189

191-
5. Work on this copy, on your computer, using Git to do the version
192-
control. When you're done editing e.g., ``lib/matplotlib/collections.py``,
193-
do::
190+
5. Work on this copy, on your computer, using Git to do the version control.
191+
When you're done editing e.g., ``lib/matplotlib/collections.py``, do::
194192

195-
$ git add lib/matplotlib/collections.py
196-
$ git commit
193+
$ git add lib/matplotlib/collections.py
194+
$ git commit
197195

198-
to record your changes in Git, then push them to GitHub with::
196+
to record your changes in Git, then push them to GitHub with::
199197

200-
$ git push -u origin my-feature
198+
$ git push -u origin my-feature
201199

202-
Finally, go to the web page of your fork of the Matplotlib repo,
203-
and click 'Pull request' to send your changes to the maintainers for review.
204-
You may want to consider sending an email to the mailing list for more
205-
visibility.
200+
Finally, go to the web page of your fork of the Matplotlib repo, and click
201+
'Pull request' to send your changes to the maintainers for review. You may
202+
want to consider sending an email to the mailing list for more visibility.
206203

207204
.. seealso::
208205

@@ -216,62 +213,60 @@ Contributing pull requests
216213
It is recommended to check that your contribution complies with the following
217214
rules before submitting a pull request:
218215

219-
* If your pull request addresses an issue, please use the title to describe
220-
the issue and mention the issue number in the pull request description
221-
to ensure a link is created to the original issue.
216+
* If your pull request addresses an issue, please use the title to describe the
217+
issue and mention the issue number in the pull request description to ensure
218+
that a link is created to the original issue.
222219

223-
* All public methods should have informative docstrings with sample
224-
usage when appropriate. Use the
225-
`numpy docstring standard <https://github.com/numpy/numpy/blob/master/doc/HOWTO_DOCUMENT.rst.txt>`_
220+
* All public methods should have informative docstrings with sample usage when
221+
appropriate. Use the `numpy docstring standard
222+
<https://numpydoc.readthedocs.io/en/latest/format.html>`_.
226223

227-
* Formatting should follow `PEP8 recommendation
228-
<https://www.python.org/dev/peps/pep-0008/>`_. You should consider
229-
installing/enabling automatic PEP8 checking in your editor. Part of the
230-
test suite is checking PEP8 compliance, things go smoother if the code is
231-
mostly PEP8 compliant to begin with.
224+
* Formatting should follow the recommendations of `PEP8
225+
<https://www.python.org/dev/peps/pep-0008/>`__. You should consider
226+
installing/enabling automatic PEP8 checking in your editor. Part of the test
227+
suite is checking PEP8 compliance, things go smoother if the code is mostly
228+
PEP8 compliant to begin with.
232229

233-
* Each high-level plotting function should have a simple example in
234-
the ``Example`` section of the docstring. This should be as simple as
235-
possible to demonstrate the method. More complex examples should go
236-
in the ``examples`` tree.
230+
* Each high-level plotting function should have a simple example in the
231+
``Example`` section of the docstring. This should be as simple as possible
232+
to demonstrate the method. More complex examples should go in the
233+
``examples`` tree.
237234

238-
* Changes (both new features and bugfixes) should be tested. See
239-
:ref:`testing` for more details.
235+
* Changes (both new features and bugfixes) should be tested. See :ref:`testing`
236+
for more details.
240237

241-
* Import the following modules using the standard scipy conventions::
238+
* Import the following modules using the standard scipy conventions::
242239

243-
import numpy as np
244-
import numpy.ma as ma
245-
import matplotlib as mpl
246-
import matplotlib.pyplot as plt
247-
import matplotlib.cbook as cbook
248-
import matplotlib.patches as mpatches
240+
import numpy as np
241+
import numpy.ma as ma
242+
import matplotlib as mpl
243+
import matplotlib.pyplot as plt
244+
import matplotlib.cbook as cbook
245+
import matplotlib.patches as mpatches
249246

250-
* If your change is a major new feature, add an entry to the ``What's new``
251-
section by adding a new file in ``doc/users/whats_new`` (see
252-
:file:`doc/users/whats_new/README` for more information).
247+
* If your change is a major new feature, add an entry to the ``What's new``
248+
section by adding a new file in ``doc/users/next_whats_new`` (see
249+
:file:`doc/users/next_whats_new/README.rst` for more information).
253250

254-
* If you change the API in a backward-incompatible way, please
255-
document it in `doc/api/api_changes`, by adding a new file describing your
256-
changes (see :file:`doc/api/api_changes/README` for more information)
251+
* If you change the API in a backward-incompatible way, please document it in
252+
`doc/api/api_changes`, by adding a new file describing your changes (see
253+
:file:`doc/api/api_changes/README.rst` for more information)
257254

258-
* See below for additional points about
259-
:ref:`keyword-argument-processing`, if code in your pull request
260-
does that.
255+
* See below for additional points about :ref:`keyword-argument-processing`, if
256+
applicable for your pull request.
261257

262258
In addition, you can check for common programming errors with the following
263259
tools:
264260

265-
* Code with a good unittest coverage (at least 70%, better 100%), check
266-
with::
261+
* Code with a good unittest coverage (at least 70%, better 100%), check with::
267262

268-
python -mpip install coverage
269-
python tests.py --with-coverage
263+
python -mpip install coverage
264+
python tests.py --with-coverage
270265

271-
* No pyflakes warnings, check with::
266+
* No pyflakes warnings, check with::
272267

273-
python -mpip install pyflakes
274-
pyflakes path/to/module.py
268+
python -mpip install pyflakes
269+
pyflakes path/to/module.py
275270

276271
.. note::
277272

doc/thirdpartypackages/index.rst

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,16 @@ data processing tools. An example plot from the `Cartopy gallery
3838
Declarative libraries
3939
*********************
4040

41+
plotnine
42+
========
43+
44+
`plotnine <https://plotnine.readthedocs.io/en/stable/>`_ implements a grammar
45+
of graphics, similar to R's `ggplot2 <http://ggplot2.org/>`_. The grammar allows
46+
users to compose plots by explicitly mapping data to the visual objects that
47+
make up the plot.
48+
49+
.. image:: /_static/plotnine.png
50+
4151
ggplot
4252
======
4353
`ggplot <https://github.com/yhat/ggplot>`_ is a port of the R ggplot2 package
@@ -147,6 +157,15 @@ annotation boxes) for Matplotlib.
147157
Miscellaneous
148158
*************
149159

160+
mpl-template
161+
============
162+
`mpl-template <https://austinorr.github.io/mpl-template/index.html>`_ provides
163+
a customizable way to add engineering figure elements such as a title block,
164+
border, and logo.
165+
166+
.. image:: /_static/mpl_template_example.png
167+
:height: 330px
168+
150169
adjustText
151170
==========
152171
`adjustText <https://github.com/Phlya/adjustText>`_ is a small library for

doc/users/navigation_toolbar.rst

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,12 @@ The ``Pan/Zoom`` button
5353
.. image:: ../../lib/matplotlib/mpl-data/images/zoom_to_rect_large.png
5454

5555
The ``Zoom-to-rectangle`` button
56-
Click this toolbar button to activate this mode. Put your mouse
57-
somewhere over an axes and press the left mouse button. Drag the
58-
mouse while holding the button to a new location and release. The
59-
axes view limits will be zoomed to the rectangle you have defined.
60-
There is also an experimental 'zoom out to rectangle' in this mode
61-
with the right button, which will place your entire axes in the
62-
region defined by the zoom out rectangle.
56+
Click this toolbar button to activate this mode. Put your mouse somewhere
57+
over an axes and press a mouse button. Define a rectangular region by
58+
dragging the mouse while holding the button to a new location. When using
59+
the left mouse button, the axes view limits will be zoomed to the defined
60+
region. When using the right mouse button, the axes view limits will be
61+
zoomed out, placing the original axes in the defined region.
6362

6463
.. image:: ../../lib/matplotlib/mpl-data/images/subplots_large.png
6564

examples/lines_bars_and_markers/arctest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def f(t):
1818
t1 = np.arange(0.0, 5.0, .2)
1919

2020
l = plt.plot(t1, f(t1), 'ro')
21-
plt.setp(l, 'markersize', 30)
22-
plt.setp(l, 'markerfacecolor', 'C0')
21+
plt.setp(l, markersize=30)
22+
plt.setp(l, markerfacecolor='C0')
2323

2424
plt.show()

examples/lines_bars_and_markers/stem_plot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@
1010

1111
x = np.linspace(0.1, 2 * np.pi, 10)
1212
markerline, stemlines, baseline = plt.stem(x, np.cos(x), '-.')
13-
plt.setp(baseline, 'color', 'r', 'linewidth', 2)
13+
plt.setp(baseline, color='r', linewidth=2)
1414

1515
plt.show()

examples/user_interfaces/toolmanager_sgskip.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
matplotlib.rcParams['toolbar'] = 'toolmanager'
2121
import matplotlib.pyplot as plt
2222
from matplotlib.backend_tools import ToolBase, ToolToggleBase
23-
from gi.repository import Gtk, Gdk
2423

2524

2625
class ListTools(ToolBase):

0 commit comments

Comments
 (0)
0