Skip to content

Commit af4ab53

Browse files
authored
Merge pull request #16303 from anntzer/legend_draw_frame
Dedupe Legend.draw_frame which is the same as set_frame_on.
2 parents 9933e23 + 11b0510 commit af4ab53

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

lib/matplotlib/legend.py

+2-10
Original file line numberDiff line numberDiff line change
@@ -874,16 +874,6 @@ def _auto_legend_data(self):
874874

875875
return [vertices, bboxes, lines, offsets]
876876

877-
def draw_frame(self, b):
878-
"""
879-
Set whether to draw a frame around the legend box.
880-
881-
Parameters
882-
----------
883-
b : bool
884-
"""
885-
self.set_frame_on(b)
886-
887877
def get_children(self):
888878
"""Return the list of child artists."""
889879
children = []
@@ -972,6 +962,8 @@ def set_frame_on(self, b):
972962
self._drawFrame = b
973963
self.stale = True
974964

965+
draw_frame = set_frame_on # Backcompat alias.
966+
975967
def get_bbox_to_anchor(self):
976968
"""Return the bbox that the legend will be anchored to."""
977969
if self._bbox_to_anchor is None:

0 commit comments

Comments
 (0)