matplotlib.pyplot.waitforbuttonpress

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

阻止调用以与图形交互。

等待用户输入,如果按了键,则返回True;如果按了鼠标按钮,则返回False;如果没有输入,则返回None 超时 秒。负值停用 超时 .

使用实例 matplotlib.pyplot.waitforbuttonpress