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

Skip to content

Commit 98c06ca

Browse files
committed
TST: make sure invisible axes is not pickable
1 parent 8a12e8b commit 98c06ca

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/matplotlib/tests/test_axes.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6898,3 +6898,11 @@ def test_pi_get_negative_values():
68986898
fig, ax = plt.subplots()
68996899
with pytest.raises(ValueError):
69006900
ax.pie([5, 5, -3], explode=[0, .1, .2])
6901+
6902+
6903+
def test_invisible_axes():
6904+
# invisible axes should not respond to events...
6905+
fig, ax = plt.subplots()
6906+
assert fig.canvas.inaxes((200,200)) is not None
6907+
ax.set_visible(False)
6908+
assert fig.canvas.inaxes((200,200)) is None

0 commit comments

Comments
 (0)