Skip to content

Commit a06a80b

Browse files
Federico Arizafariza
Federico Ariza
authored andcommitted
pep8 imports and unique axes with custom label
1 parent 2ce02b4 commit a06a80b

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

lib/matplotlib/backend_tools.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,12 @@
1414
import time
1515
import warnings
1616
from weakref import WeakKeyDictionary
17-
17+
import textwrap
1818
import numpy as np
1919

2020
from matplotlib import rcParams
2121
from matplotlib._pylab_helpers import Gcf
2222
from matplotlib.table import Table
23-
import textwrap
2423
import matplotlib.cbook as cbook
2524

2625

@@ -1032,7 +1031,10 @@ def __init__(self, *args):
10321031
self.text_axes = None
10331032

10341033
def enable(self, *args):
1035-
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')
10361038
table = Table(self.text_axes, bbox=[0, 0, 1, 1])
10371039
table.edges = 'B'
10381040
self.text_axes.add_table(table)

0 commit comments

Comments
 (0)