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

Skip to content

Dedupe Legend.draw_frame which is the same as set_frame_on. #16303

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 23, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 2 additions & 10 deletions lib/matplotlib/legend.py
Original file line number Diff line number Diff line change
Expand Up @@ -874,16 +874,6 @@ def _auto_legend_data(self):

return [vertices, bboxes, lines, offsets]

def draw_frame(self, b):
"""
Set whether to draw a frame around the legend box.

Parameters
----------
b : bool
"""
self.set_frame_on(b)

def get_children(self):
"""Return the list of child artists."""
children = []
Expand Down Expand Up @@ -972,6 +962,8 @@ def set_frame_on(self, b):
self._drawFrame = b
self.stale = True

draw_frame = set_frame_on # Backcompat alias.

def get_bbox_to_anchor(self):
"""Return the bbox that the legend will be anchored to."""
if self._bbox_to_anchor is None:
Expand Down