Skip to content

Commit c32a7d2

Browse files
author
Federico Ariza
committed
pep8 imports and unique axes with custom label
1 parent 9fa7d45 commit c32a7d2

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/matplotlib/backend_tools.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@
1515
from matplotlib import rcParams
1616
from matplotlib._pylab_helpers import Gcf
1717
from matplotlib.table import Table
18-
import textwrap
1918
import matplotlib.cbook as cbook
19+
20+
import textwrap
2021
from weakref import WeakKeyDictionary
2122
import six
2223
import time
@@ -1030,7 +1031,10 @@ def __init__(self, *args):
10301031
self.text_axes = None
10311032

10321033
def enable(self, *args):
1033-
self.text_axes = self.figure.add_axes((0, 0, 1, 1))
1034+
# Using custom axes label to prevent reuse of old axes
1035+
# https://github.com/matplotlib/matplotlib/issues/9024
1036+
self.text_axes = self.figure.add_axes((0, 0, 1, 1),
1037+
label='help_tool_axes')
10341038
table = Table(self.text_axes, bbox=[0, 0, 1, 1])
10351039
table.edges = 'B'
10361040
self.text_axes.add_table(table)

0 commit comments

Comments
 (0)