<jupyter_start><jupyter_text>MulticursorShowing a cursor on multiple plots simultaneously.This example generates two subplots and on hovering the cursor over data in onesubplot, the values of that datapoint are shown in both respectively.<jupyter_code>import numpy as np
import matplotlib.pyplot as plt
from matplotlib.widgets import MultiCursor

t = np.arange(0.0, 2.0, 0.01)
s1 = np.sin(2*np.pi*t)
s2 = np.sin(4*np.pi*t)

fig, (ax1, ax2) = plt.subplots(2, sharex=True)
ax1.plot(t, s1)
ax2.plot(t, s2)

multi = MultiCursor(fig.canvas, (ax1, ax2), color='r', lw=1)
plt.show()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1206611570247934, 'fraction_numerical': 0.03471074380165289, 'mean_word_length': 5.733333333333333, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '240911', 'license': 'MIT', 'n_tokens_mistral': 242, 'n_tokens_neox': 234, 'n_words': 65, 'path': 'matplotlib/gallery_jupyter/widgets/multicursor.ipynb', 'repo_name': 'kingreatwill/penter', 'size': '605'}