Skip to content

Commit 42253c9

Browse files
tacaswellstory645timhoffm
committed
DOC: wording suggestions from review
Co-authored-by: hannah <[email protected]> Co-authored-by: Tim Hoffmann <[email protected]>
1 parent 2a1a1a6 commit 42253c9

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
``legend.legendHandles``
22
~~~~~~~~~~~~~~~~~~~~~~~~
33

4-
... was undocumented and has been renamed to ``legend_handles``. Using the
5-
old name is deprecated.
4+
... was undocumented and has been renamed to ``legend_handles``. Using ``legendHandles`` is deprecated.

lib/matplotlib/legend.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ def __init__(
360360
labels : list of str
361361
A list of labels to show next to the artists. The length of handles
362362
and labels should be the same. If they are not, they are truncated
363-
to the shortest of both lengths.
363+
to the length of the shorter list.
364364
365365
Other Parameters
366366
----------------
@@ -369,7 +369,7 @@ def __init__(
369369
Attributes
370370
----------
371371
legend_handles
372-
A list of legend handles used by the legend.
372+
List of `.Artists` added as legend entries.
373373
374374
.. versionadded:: 3.7
375375

lib/matplotlib/legend_handler.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
`.OffsetBox` instance. Within the call, you should create relevant
1919
artists (using relevant properties from the *legend* and/or
2020
*orig_handle*) and add them into the *handlebox*. The artists need to
21-
be scaled according to the *fontsize* (note that the size is in pixel,
21+
be scaled according to the *fontsize* (note that the size is in pixels,
2222
i.e., this is dpi-scaled value).
2323
2424
This module includes definition of several legend handler classes
@@ -161,7 +161,8 @@ def create_artists(self, legend, orig_handle,
161161
The fontsize in pixels. The legend artists being created should
162162
be scaled according to the given fontsize.
163163
trans : `~matplotlib.transforms.Transform`
164-
The transform that is applied to the legend artists being created.
164+
The transform that is applied to the legend artists being created. Typically
165+
from unit coordinates in the handler box to screen coordinates.
165166
"""
166167
raise NotImplementedError('Derived must override')
167168

@@ -247,7 +248,7 @@ class HandlerLine2DCompound(HandlerNpoints):
247248
def create_artists(self, legend, orig_handle,
248249
xdescent, ydescent, width, height, fontsize,
249250
trans):
250-
# Doc-string inherited
251+
# docstring inherited
251252
xdata, xdata_marker = self.get_xdata(legend, xdescent, ydescent,
252253
width, height, fontsize)
253254

0 commit comments

Comments
 (0)