matplotlib交互事件设置

可以通过fig.canvas.mpl_connect()方法绑定事件 import matplotlib.pyplot as plt def on_key_press(event):     print(event.key) fig, ax = plt.subplots() fig.canvas.mpl_connect('key_press_event', on_key_press) plt.sh
相关文章
相关标签/搜索