|
7 | 7 |
|
8 | 8 | import matplotlib as mpl |
9 | 9 | import matplotlib.pyplot as plt |
10 | | -from matplotlib.backend_bases import MouseEvent |
11 | 10 | import matplotlib.collections as mcollections |
12 | 11 | import matplotlib.colors as mcolors |
13 | 12 | import matplotlib.transforms as mtransforms |
@@ -1039,26 +1038,6 @@ def test_array_wrong_dimensions(): |
1039 | 1038 | pc.update_scalarmappable() |
1040 | 1039 |
|
1041 | 1040 |
|
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 | | - |
1062 | 1041 | def test_get_segments(): |
1063 | 1042 | segments = np.tile(np.linspace(0, 1, 256), (2, 1)).T |
1064 | 1043 | lc = LineCollection([segments]) |
|
0 commit comments