Skip to content

Commit 29c1cb3

Browse files
committed
fix legend doc typos
svn path=/trunk/matplotlib/; revision=8403
1 parent 711c63a commit 29c1cb3

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

CHANGELOG

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
2010-06-06 Change the way we do split/dividend adjustments in
66
finance.py to handle dividends and fix the zero division bug reported
7-
in sf bug 2949906. Note that volume is not adjusted
7+
in sf bug 2949906 and 2123566. Note that volume is not adjusted
88
because the Yahoo CSV does not distinguish between share
99
split and dividend adjustments making it near impossible to
1010
get volume adjustement right (unless we want to guess based

doc/users/legend_guide.rst

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ What to be displayed
1212
====================
1313

1414
The legend command has a following call signature::
15-
15+
1616
legend(*args, **kwargs)
17-
17+
1818
If len(args) is 2, the first argument should be a list of artist to be
1919
labeled, and the second argument should a list of string labels. If
2020
len(args) is 0, it automatically generate the legend from label
2121
properties of the child artists by calling
22-
:meth:`~matplotlib.axes.Axes.get_legend_handles_labels` method.
22+
:meth:`~matplotlib.axes.Axes.get_legend_handles_labels` method.
2323
For example, *ax.legend()* is equivalent to::
2424

2525
handles, labels = ax.get_legend_handles_labels()
@@ -44,7 +44,7 @@ used as text labels. If label attribute is empty string or starts with
4444
* :class:`~matplotlib.patches.Patch`
4545
* :class:`~matplotlib.collections.LineCollection`
4646
* :class:`~matplotlib.collections.RegularPolyCollection`
47-
47+
4848
Unfortunately, there is no easy workaround when you need legend for
4949
an artist not in the above list (You may use one of the supported
5050
artist as a proxy. See below), or customize it beyond what is
@@ -84,28 +84,28 @@ feeding them to legend call.::
8484
p1, = ax.plot([1,2,3], label="line 1")
8585
p2, = ax.plot([3,2,1], label="line 2")
8686
p3, = ax.plot([2,3,1], label="line 3")
87-
87+
8888
handles, labels = ax.get_legend_handles_labels()
8989

9090
# reverse the order
9191
ax.legend(handles[::-1], labels[::-1])
92-
92+
9393
# or sort them by labels
9494
import operator
9595
hl = sorted(zip(handles, labels),
9696
key=operator.itemgetter(1))
9797
handles2, labels2 = zip(*hl)
98-
98+
9999
ax.legend(handles2, labels2)
100100

101101

102102
Using Proxy Artist
103103
------------------
104104

105-
When you want to display legend for an artist not supported by the
106-
matplotlib, you may use other supported artist as a proxy. For
107-
example, you may creates an proxy artist without adding it to the axes
108-
(so the proxy artist will not be drawn in the main axes) and feet it
105+
When you want to display legend for an artist not supported by
106+
matplotlib, you may use another artist as a proxy. For
107+
example, you may create a proxy artist without adding it to the axes
108+
(so the proxy artist will not be drawn in the main axes) and feed it
109109
to the legend function.::
110110

111111
p = Rectangle((0, 0), 1, 1, fc="r")

0 commit comments

Comments
 (0)