Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb39fd90

Browse files
committed
FIX: protect against None child
1 parent4cc9a74 commitb39fd90

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

‎lib/matplotlib/offsetbox.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,8 @@ def axes(self, ax):
192192
# TODO deal with this better
193193
martist.Artist.axes.fset(self,ax)
194194
forcinself.get_children():
195-
c.axes=ax
195+
ifcisnotNone:
196+
c.axes=ax
196197

197198
defcontains(self,mouseevent):
198199
forcinself.get_children():
@@ -1053,7 +1054,8 @@ def __init__(self, loc,
10531054
defset_child(self,child):
10541055
"set the child to be anchored"
10551056
self._child=child
1056-
child.axes=self.axes
1057+
ifchildisnotNone:
1058+
child.axes=self.axes
10571059
self.stale=True
10581060

10591061
defget_child(self):

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp