Note
Click here to download the full example code
12.3.10.1.2. Multi cursorΒΆ
![demo multicursor](../../../_images/sphx_glr_demo_multicursor_001.png)
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()
Total running time of the script: ( 0 minutes 0.141 seconds)