mpl_gui.ioff#

mpl_gui.ioff()[源代码]#

禁用交互模式。

有关更多详细信息,请参见 is_interactive

另请参阅

ion

启用交互模式。

is_interactive

是否启用交互模式。

show

显示所有图形(并可能阻塞)。

注释

对于临时更改,这可以用作上下文管理器

# if interactive mode is on
# then figures will be shown on creation
mg.ion()
# This figure will be shown immediately
fig = mg.figure()

with mg.ioff():
    # interactive mode will be off
    # figures will not automatically be shown
    fig2 = mg.figure()
    # ...

要启用作为上下文管理器的用法,此函数返回一个 _IoffContext 对象。返回值不供用户存储或访问。