Skip to content

Commit 99f325d

Browse files
committed
Rewrite of the entire legend documentation, including tidy ups of code
and style to all things "legend".
1 parent 1822356 commit 99f325d

31 files changed

+765
-917
lines changed

doc/api/api_changes.rst

+10
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,16 @@ original location:
7474
thus `colorbar.ColorbarBase.outline` is now a
7575
`matplotlib.patches.Polygon` object.
7676

77+
* The legend handler interface has changed from a callable, to any object
78+
which implements the ``legend_artists`` method. See
79+
:ref:`plotting-guide-legend` for further details. Further legend changes
80+
include:
81+
82+
* :func:`matplotlib.axes.Axes._get_legend_handles` now returns a generator
83+
of handles, rather than a list.
84+
85+
* The :func:`~matplotlib.pyplot.legend` function's "loc" positional
86+
argument has been deprecated. Use the "loc" keyword instead.
7787

7888
* The rcParams `savefig.transparent` has been added to control
7989
default transparency when saving figures.

doc/api/axes_api.rst

-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,3 @@ axes
99
.. autoclass:: matplotlib.axes.Axes
1010
:members:
1111
:undoc-members:
12-

doc/api/legend_api.rst

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
******
2-
legend
2+
Legend
33
******
44

55

@@ -10,3 +10,9 @@ legend
1010
:members:
1111
:undoc-members:
1212
:show-inheritance:
13+
14+
:mod:`matplotlib.legend_handler`
15+
================================
16+
.. automodule:: matplotlib.legend_handler
17+
:members:
18+
:undoc-members:

doc/api/matplotlib_configuration_api.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ The top level :mod:`matplotlib` module
66
77
.. autofunction:: use
88

9-
.. autofunction:: get_backend
9+
.. autofunction:: get_backend
1010

11-
.. py:data:: matplotlib.rcParams
11+
.. py:data:: rcParams
1212
1313
An instance of :class:`RcParams` for handling default matplotlib values.
1414

doc/api/offsetbox.rst

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
*********
2+
offsetbox
3+
*********
4+
5+
6+
:mod:`matplotlib.offsetbox`
7+
===========================
8+
9+
.. automodule:: matplotlib.offsetbox
10+
:members:
11+
:undoc-members:
12+
:show-inheritance:

0 commit comments

Comments
 (0)