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

Skip to content

Commit c29c773

Browse files
committed
Merge pull request #4942 from jrevans/issue16
FIX: only update bbox_patch if passed in to `Text.update`
2 parents 72b0a92 + ff5748b commit c29c773

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/matplotlib/text.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,8 @@ def update(self, kwargs):
240240
"""
241241
bbox = kwargs.pop('bbox', None)
242242
super(Text, self).update(kwargs)
243-
self.set_bbox(bbox) # depends on font properties
243+
if bbox:
244+
self.set_bbox(bbox) # depends on font properties
244245

245246
def __getstate__(self):
246247
d = super(Text, self).__getstate__()

0 commit comments

Comments
 (0)