Cursor import matplotlib.pyplot as plt import numpy as np from matplotlib.widgets import Cursor # Fixing random state for reproducibility np.random