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

Skip to content

Commit a168bc4

Browse files
committed
Merge branch 'v1.0.x-maint'
2 parents a51010b + dd19aab commit a168bc4

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

lib/matplotlib/font_manager.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -685,8 +685,14 @@ def _parse_fontconfig_pattern(self, pattern):
685685
return parse_fontconfig_pattern(pattern)
686686

687687
def __hash__(self):
688-
l = [(k, getattr(self, "get" + k)()) for k in sorted(self.__dict__)]
689-
return hash(repr(l))
688+
l = (tuple(self.get_family()),
689+
self.get_slant(),
690+
self.get_variant(),
691+
self.get_weight(),
692+
self.get_stretch(),
693+
self.get_size_in_points(),
694+
self.get_file())
695+
return hash(l)
690696

691697
def __str__(self):
692698
return self.get_fontconfig_pattern()

lib/matplotlib/offsetbox.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1618,6 +1618,7 @@ def save_offset(self):
16181618

16191619
self.ox, self.oy = ox0, oy0
16201620
self.annotation.textcoords = "figure pixels"
1621+
self.update_offset(0, 0)
16211622

16221623
def update_offset(self, dx, dy):
16231624
ann = self.annotation

0 commit comments

Comments
 (0)