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 物件。傳回值不應由使用者儲存或存取。