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

Skip to content

Commit aa72bc6

Browse files
committed
Fix bug that Text.Annotation is still drawn while set to not visible
svn path=/branches/v0_98_5_maint/; revision=7082
1 parent 25e88d3 commit aa72bc6

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

CHANGELOG

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
======================================================================
2+
2009-05-04 Fix bug that Text.Annotation is still drawn while set to
3+
not visible.-JJL
4+
25
2008-04-12 Release 0.98.5.3 at r7038
36

47
2009-04-06 The pdf backend now escapes newlines and linefeeds in strings.

lib/matplotlib/text.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1602,6 +1602,11 @@ def draw(self, renderer):
16021602
"""
16031603
Draw the :class:`Annotation` object to the given *renderer*.
16041604
"""
1605+
1606+
if renderer is not None:
1607+
self._renderer = renderer
1608+
if not self.get_visible(): return
1609+
16051610
self.update_positions(renderer)
16061611
self.update_bbox_position_size(renderer)
16071612

0 commit comments

Comments
 (0)