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

Skip to content

Commit be420a3

Browse files
committed
fix a bug in draggable legend
1 parent 55ae1ec commit be420a3

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

lib/matplotlib/offsetbox.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1499,6 +1499,7 @@ def save_offset(self):
14991499
w, h, xd, yd = offsetbox.get_extent(renderer)
15001500
offset = offsetbox.get_offset(w, h, xd, yd, renderer)
15011501
self.offsetbox_x, self.offsetbox_y = offset
1502+
self.offsetbox.set_offset(offset)
15021503

15031504
def update_offset(self, dx, dy):
15041505
loc_in_canvas = self.offsetbox_x + dx, self.offsetbox_y + dy

0 commit comments

Comments
 (0)