@@ -941,13 +941,21 @@ def set_bbox_to_anchor(self, bbox, transform=None):
941
941
"""
942
942
Set the bbox that the legend will be anchored to.
943
943
944
- *bbox* can be
945
-
946
- - A `.BboxBase` instance
947
- - A tuple of ``(left, bottom, width, height)`` in the given transform
948
- (normalized axes coordinate if None)
949
- - A tuple of ``(left, bottom)`` where the width and height will be
950
- assumed to be zero.
944
+ Parameters
945
+ ----------
946
+ bbox : `~matplotlib.transforms.BboxBase` or tuple
947
+ The bounding box can be specified in the following ways:
948
+
949
+ - A `.BboxBase` instance
950
+ - A tuple of ``(left, bottom, width, height)`` in the given
951
+ transform (normalized axes coordinate if None)
952
+ - A tuple of ``(left, bottom)`` where the width and height will be
953
+ assumed to be zero.
954
+ - *None*, to remove the bbox anchoring, and use the parent bbox.
955
+
956
+ transform : `~matplotlib.transforms.Transform`, optional
957
+ A transform to apply to the bounding box. If not specified, this
958
+ will use a transform to the bounding box of the parent.
951
959
"""
952
960
if bbox is None :
953
961
self ._bbox_to_anchor = None
@@ -978,13 +986,16 @@ def _get_anchored_bbox(self, loc, bbox, parentbbox, renderer):
978
986
Place the *bbox* inside the *parentbbox* according to a given
979
987
location code. Return the (x, y) coordinate of the bbox.
980
988
981
- - loc: a location code in range(1, 11).
982
- This corresponds to the possible values for self._loc, excluding
983
- "best".
989
+ Parameters
990
+ ----------
991
+ loc : int
992
+ A location code in range(1, 11). This corresponds to the possible
993
+ values for ``self._loc``, excluding "best".
994
+ bbox : `~matplotlib.transforms.Bbox`
995
+ bbox to be placed, in display coordinates.
996
+ parentbbox : `~matplotlib.transforms.Bbox`
997
+ A parent box which will contain the bbox, in display coordinates.
984
998
985
- - bbox: bbox to be placed, display coordinate units.
986
- - parentbbox: a parent box which will contain the bbox. In
987
- display coordinates.
988
999
"""
989
1000
assert loc in range (1 , 11 ) # called only internally
990
1001
@@ -1079,8 +1090,9 @@ def set_draggable(self, state, use_blit=False, update='loc'):
1079
1090
1080
1091
Returns
1081
1092
-------
1082
- If *state* is ``True`` this returns the `~.DraggableLegend` helper
1083
- instance. Otherwise this returns ``None``.
1093
+ `.DraggableLegend` or *None*
1094
+ If *state* is ``True`` this returns the `.DraggableLegend` helper
1095
+ instance. Otherwise this returns *None*.
1084
1096
"""
1085
1097
if state :
1086
1098
if self ._draggable is None :
0 commit comments