Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b6eba0c

Browse files
committed
DOC: Added API entry, fixed Legend.get_tightbbox string
1 parent 037ea6d commit b6eba0c

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

lib/matplotlib/legend.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -972,7 +972,20 @@ def get_tightbbox(self, renderer):
972972
return self._legend_box.get_window_extent(renderer)
973973

974974
def get_tightbbox(self, renderer):
975-
'Return extent of the legend.'
975+
"""
976+
Like `.Legend.get_window_extent`, but uses the box for the legend.
977+
978+
Parameters
979+
----------
980+
renderer : `.RendererBase` instance
981+
renderer that will be used to draw the figures (i.e.
982+
``fig.canvas.get_renderer()``)
983+
984+
Returns
985+
-------
986+
`.BboxBase` : containing the bounding box (in figure-relative
987+
co-ordinates).
988+
"""
976989
return self._legend_box.get_window_extent(renderer)
977990

978991
def get_frame_on(self):

0 commit comments

Comments
 (0)