Skip to content

[WIP] API: remove unused attribute on Annotation #7445

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

Closed
Closed
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
9 changes: 0 additions & 9 deletions lib/matplotlib/text.py
Original file line number Diff line number Diff line change
Expand Up @@ -2149,8 +2149,6 @@ def __init__(self, s, xy,

self.arrowprops = arrowprops

self.arrow = None

if arrowprops is not None:
if "arrowstyle" in arrowprops:
arrowprops = self.arrowprops.copy()
Expand All @@ -2170,9 +2168,6 @@ def __init__(self, s, xy,

def contains(self, event):
contains, tinfo = Text.contains(self, event)
if self.arrow is not None:
in_arrow, _ = self.arrow.contains(event)
contains = contains or in_arrow
if self.arrow_patch is not None:
in_patch, _ = self.arrow_patch.contains(event)
contains = contains or in_patch
Expand All @@ -2197,8 +2192,6 @@ def anncoords(self, coords):

def set_figure(self, fig):

if self.arrow is not None:
self.arrow.set_figure(fig)
if self.arrow_patch is not None:
self.arrow_patch.set_figure(fig)
Artist.set_figure(self, fig)
Expand Down Expand Up @@ -2366,8 +2359,6 @@ def get_window_extent(self, renderer=None):
text_bbox = Text.get_window_extent(self, renderer=renderer)
bboxes = [text_bbox]

if self.arrow is not None:
bboxes.append(arrow.get_window_extent(renderer=renderer))
elif self.arrow_patch is not None:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

elif -> if

bboxes.append(arrow_patch.get_window_extent(renderer=renderer))

Expand Down