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

Skip to content

Commit 2920408

Browse files
James R. Evanspelson
James R. Evans
authored andcommitted
JRE: Fixed an error where a local variable was used before it was set.
1 parent eb59a06 commit 2920408

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/matplotlib/offsetbox.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1459,10 +1459,10 @@ def finalize_offset(self):
14591459
14601460
"""
14611461
def __init__(self, ref_artist, use_blit=False):
1462-
self.canvas = self.ref_artist.figure.canvas
1463-
14641462
self.ref_artist = ref_artist
14651463
self.got_artist = False
1464+
1465+
self.canvas = self.ref_artist.figure.canvas
14661466
self._use_blit = use_blit and self.canvas.supports_blit
14671467

14681468
c2 = self.canvas.mpl_connect('pick_event', self.on_pick)

0 commit comments

Comments
 (0)