matplotlib.pyplot.ioff#
- matplotlib.pyplot.ioff()[source]#
禁用交互模式。
有关更多详细信息,请参阅
pyplot.isinteractive
。另请参阅
ion
启用交互模式。
isinteractive
交互模式是否已启用。
显示
显示所有图形(可能阻塞)。
pause
显示所有图形,并阻塞一段时间。
备注
对于临时更改,这可以用作上下文管理器
# if interactive mode is on # then figures will be shown on creation plt.ion() # This figure will be shown immediately fig = plt.figure() with plt.ioff(): # interactive mode will be off # figures will not automatically be shown fig2 = plt.figure() # ...
为了支持作为上下文管理器的可选用法,此函数返回一个上下文管理器对象,该对象不应由用户存储或访问。