matplotlib.pyplot.waitforbuttonpress#

matplotlib.pyplot.waitforbuttonpress(timeout=-1)[源代码]#

与图形交互的阻塞调用。

等待用户输入,如果按键被按下则返回 True,如果鼠标按钮被按下则返回 False,如果在 timeout 秒内没有输入则返回 None。负值会禁用 timeout

备注

使用 matplotlib.pyplot.waitforbuttonpress 的示例#

交互式函数

交互式函数