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

Skip to content

Commit 8b73cb2

Browse files
committed
fix draggable legend offset changes with dpi value
1 parent 5960b77 commit 8b73cb2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/legend.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -731,6 +731,7 @@ def _set_loc(self, loc):
731731
# value of the find_offset.
732732
self._loc_real = loc
733733
self.stale = True
734+
self._legend_box.set_offset(self._findoffset)
734735

735736
def _get_loc(self):
736737
return self._loc_real
@@ -1002,7 +1003,6 @@ def _init_legend_box(self, handles, labels, markerfirst=True):
10021003
children=[self._legend_title_box,
10031004
self._legend_handle_box])
10041005
self._legend_box.set_figure(self.figure)
1005-
self._legend_box.set_offset(self._findoffset)
10061006
self.texts = text_list
10071007
self.legendHandles = handle_list
10081008

0 commit comments

Comments
 (0)