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

Skip to content

Commit 47665f4

Browse files
committed
fix a bug in AnnotationBase._get_ref_xy
svn path=/trunk/matplotlib/; revision=8319
1 parent 0c57b7a commit 47665f4

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lib/matplotlib/text.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1527,7 +1527,8 @@ def _get_ref_xy(self, renderer):
15271527

15281528
if isinstance(self.xycoords, tuple):
15291529
s1, s2 = self.xycoords
1530-
if s1.split()[0] == "offset" or s2.split()[0] == "offset":
1530+
if (is_string_like(s1) and s1.split()[0] == "offset") \
1531+
or (is_string_like(s2) and s2.split()[0] == "offset"):
15311532
raise ValueError("xycoords should not be an offset coordinate")
15321533
x, y = self.xy
15331534
x1, y1 = self._get_xy(renderer, x, y, s1)

0 commit comments

Comments
 (0)