Skip to content

Commit 6c4e61d

Browse files
committed
Further work in polishing the documentation for the upcoming release.
1 parent dde91be commit 6c4e61d

File tree

4 files changed

+46
-30
lines changed

4 files changed

+46
-30
lines changed

doc/mpl_toolkits/mplot3d/api.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ mplot3d API
1919

2020
.. automodule:: mpl_toolkits.mplot3d.axes3d
2121
:members:
22+
:undoc-members:
2223
:show-inheritance:
2324

2425

@@ -38,6 +39,7 @@ mplot3d API
3839

3940
.. automodule:: mpl_toolkits.mplot3d.axis3d
4041
:members:
42+
:undoc-members:
4143
:show-inheritance:
4244

4345
.. _toolkit_mplot3d-artapi:
@@ -47,6 +49,7 @@ mplot3d API
4749

4850
.. automodule:: mpl_toolkits.mplot3d.art3d
4951
:members:
52+
:undoc-members:
5053
:show-inheritance:
5154

5255
.. _toolkit_mplot3d-projapi:
@@ -56,5 +59,6 @@ mplot3d API
5659

5760
.. automodule:: mpl_toolkits.mplot3d.proj3d
5861
:members:
62+
:undoc-members:
5963
:show-inheritance:
6064

doc/users/legend_guide.rst

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
Legend guide
55
************
66

7-
Do not proceed unless you already have read :func:`~matplotlib.pyplot.legend` and
8-
:class:`matplotlib.legend.Legend`!
7+
Do not proceed unless you already have read :func:`~matplotlib.pyplot.legend`
8+
and :class:`matplotlib.legend.Legend`!
99

1010

1111
What to be displayed
@@ -30,7 +30,7 @@ returns a tuple of two lists, i.e., list of artists and list of labels
3030
(python string). However, it does not return all of its child
3131
artists. It returns artists that are currently supported by matplotlib.
3232

33-
For matplotlib v1.0 and before, the supported artists are as follows.
33+
For matplotlib v1.0 and earlier, the supported artists are as follows.
3434

3535
* :class:`~matplotlib.lines.Line2D`
3636
* :class:`~matplotlib.patches.Patch`
@@ -186,11 +186,12 @@ legend.
186186
.. plot:: users/plotting/examples/simple_legend02.py
187187
:include-source:
188188

189+
.. _legend-complex-plots:
189190

190191
Legend of Complex Plots
191192
=======================
192193

193-
In matplotlib v1.1 (FIXME when released) and later, the legend is
194+
In matplotlib v1.1 and later, the legend is
194195
improved to support more plot commands and ease the customization.
195196

196197
Artist Container
@@ -224,15 +225,15 @@ or ::
224225
legend([b1], ["Bar 1"])
225226

226227

227-
At this time of writing, however, "bar" and "errorbar" are only
228+
At this time of writing, however, only "bar", "errorbar", and "stem" are
228229
supported (hopefully the list will increase). Here is an example.
229230

230231
.. plot:: mpl_examples/pylab_examples/legend_demo4.py
231232

232233
Legend Handler
233234
--------------
234235

235-
One of the change is that drawing of legend handles is delegated to
236+
One of the changes is that drawing of legend handles has been delegated to
236237
legend handlers. For example, :class:`~matplotlib.lines.Line2D`
237238
instances are handled by
238239
:class:`~matplotlib.legend_handler.HandlerLine2D`. The mapping
@@ -247,8 +248,9 @@ Let's consider the following sample code, ::
247248

248249
For each *p_i*, matplotlib
249250

250-
1. check if *p_i* itself is in the handler_map
251-
2. if not, iterate over type(p_i).mro() until a matching key is found in the handler_map
251+
1. check if *p_i* is in the handler_map
252+
2. if not, iterate over type(p_i).mro() until a matching key is found
253+
in the handler_map
252254

253255

254256
Unless specified, the defaul handler_map is used. Below is a partial
@@ -260,7 +262,7 @@ list of key-handler pairs included in the default handler map.
260262
* ...
261263

262264

263-
The legend command takes an optional argument of "handler_map". When
265+
The legend() command takes an optional argument of "handler_map". When
264266
provided, the default handler map will be updated (using dict.update
265267
method) with the provided one. ::
266268

@@ -279,9 +281,9 @@ instances (p1 and p2). ::
279281
In the above example, only *p1* will be handled by *my_handler*, while
280282
others will be handled by default handlers.
281283

282-
The curent default handler_map has handlers for errobar and bar
284+
The curent default handler_map has handlers for errorbar and bar
283285
plots. Also, it includes an entry for `tuple` which is mapped to
284-
`HandlerTuple`. It simply overplots all the handles for items in the
286+
`HandlerTuple`. It simply plots over all the handles for items in the
285287
given tuple. For example,
286288

287289

@@ -312,5 +314,5 @@ pixles, and *handlebox* is a OffsetBox instance. Within the call, you
312314
create relevant artists (using relevant properties from the *legend*
313315
and/or *orig_handle*) and add them into the handlebox. The artists
314316
needs to be scaled according to the fontsize (note that the size is in
315-
pixel, i.e., this is dpi-scaled value). See legend_handler.py for more
316-
details.
317+
pixel, i.e., this is dpi-scaled value). See :mod:`~matplotlib.legend_handler`
318+
for more details.

doc/users/whats_new.rst

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,24 +19,28 @@ Animation
1919
Ryan May invested significant effort to create a backend-independent
2020
framework for creating animated figures. The :mod:`~matplotlib.animation`
2121
module is intended to replace the difficult-to-understand,
22-
backend-specific examples that has existed in the examples listing.
22+
backend-specific examples that used to exist in the :ref:`examples-index`
23+
listings.
2324

2425
This framework should be considered a beta feature for matplotlib, but
2526
we highly encourage users to try it out and provide feedback.
2627

28+
Check out the :ref:`animation-examples-index` and try them out!
29+
30+
2731
Tight Layout
2832
------------
2933

3034
A frequent issue raised by users of matplotlib is the lack of a layout
31-
engine to nicely space out elements of the plots. While we still adhere
32-
to the philosphy of giving users complete control over the placement of
33-
plot elements, a :mod:`~matplotlib.tight_layout` module was created to
34-
address the most common layout issues.
35+
engine to nicely space out elements of the plots. While matplotlib still
36+
adheres to the philosphy of giving users complete control over the placement
37+
of plot elements, Jae-Joon Lee created the :mod:`~matplotlib.tight_layout`
38+
module to address the most common layout issues.
3539

3640
:mod:`~matplotlib.tight_layout` will adjust the spacing between subplots
37-
so that the axis labels do not overlap with neighboring subplots.
38-
39-
Need to acknowledge author
41+
so that the axis labels do not overlap with neighboring subplots. A
42+
:ref:`plotting-guide-tight-layout` has been created to show how to use
43+
this new tool.
4044

4145
Full IPython 0.11 compatibility
4246
-------------------------------
@@ -49,11 +53,16 @@ is fully compatible with ipython.
4953
Legend
5054
------
5155

52-
Jae-Joon Lee has been working on revamping how plot legends are handled
56+
Jae-Joon Lee has also been working on revamping how plot legends are handled
5357
in matplotlib. This has resulted in some immediate enhancements. First,
54-
legends for :func:`~matplotlib.pyplot.stem` plots will now display
55-
correctly. Second, the 'best' placement of a legend has been improved
56-
in the presence of NaNs.
58+
legends for complex plots such as :func:`~matplotlib.pyplot.stem` plots
59+
will now display correctly. Second, the 'best' placement of a legend has
60+
been improved in the presence of NANs.
61+
62+
See :ref:`legend-complex-plots` for more detailed explanation and
63+
examples.
64+
65+
.. plot:: mpl_examples/pylab_examples/legend_demo4.py
5766

5867
mplot3d
5968
-------
@@ -66,14 +75,15 @@ as 2D plotting, Ben Root has made several improvements to the
6675
improved to bring the class towards feature-parity with regular
6776
Axes objects
6877

69-
* Documentation for the mplot3d module was significantly expanded.
78+
* Documentation for :ref:`toolkit_mplot3d-index` was significantly expanded
7079

7180
* Axis labels and orientation improved
7281

7382
* Ticker offset display added
7483

7584
* :func:`~mpl_toolkits.mplot3d.axes3d.Axes3D.contourf`
76-
gains *zdir* and *offset* kwargs.
85+
gains *zdir* and *offset* kwargs
86+
.. plot:: mpl_examples/mplot3d/contourf3d_demo2.py
7787

7888
* Most 3D plotting functions now support empty inputs
7989

lib/matplotlib/legend.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
plot elements in the axes or figures (e.g., lines, patches, etc.) are
88
specified by the handler map, which defines the mapping between the
99
plot elements and the legend handlers to be used (the default legend
10-
handlers are defined in the matplotlib.legend_handler module). Note
11-
that not all kinds of artist are supported by the legend yet (See LINK
12-
(FIXME) for details).
10+
handlers are defined in the :mod:`~matplotlib.legend_handler` module). Note
11+
that not all kinds of artist are supported by the legend yet (See
12+
:ref:`plotting-guide-legend` for more information).
1313
"""
1414
from __future__ import division
1515
import warnings

0 commit comments

Comments
 (0)