Skip to content

Commit 7362fa3

Browse files
committed
TST and DOC
1 parent 486286c commit 7362fa3

File tree

2 files changed

+4
-20
lines changed

2 files changed

+4
-20
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
QuadMesh cursor data removed
2+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
`.QuadMesh.get_cursor_data`, introduced in 3.5.1 is unreasonably slow for
4+
large meshes, so this method has been removed.

lib/matplotlib/tests/test_collections.py

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1039,26 +1039,6 @@ def test_array_wrong_dimensions():
10391039
pc.update_scalarmappable()
10401040

10411041

1042-
def test_quadmesh_cursor_data():
1043-
fig, ax = plt.subplots()
1044-
*_, qm = ax.hist2d(
1045-
np.arange(11)**2, 100 + np.arange(11)**2) # width-10 bins
1046-
1047-
x, y = ax.transData.transform([1, 101])
1048-
event = MouseEvent('motion_notify_event', fig.canvas, x, y)
1049-
1050-
assert qm.get_show_cursor_data() is False
1051-
assert qm.get_cursor_data(event) is None
1052-
1053-
qm.set_show_cursor_data(True)
1054-
assert qm.get_cursor_data(event) == 4 # (0**2, 1**2, 2**2, 3**2)
1055-
1056-
# Outside the quadmesh bounds
1057-
x, y = ax.transData.transform([-1, 101])
1058-
event = MouseEvent('motion_notify_event', fig.canvas, x, y)
1059-
assert qm.get_cursor_data(event) is None
1060-
1061-
10621042
def test_get_segments():
10631043
segments = np.tile(np.linspace(0, 1, 256), (2, 1)).T
10641044
lc = LineCollection([segments])

0 commit comments

Comments
 (0)