當前位置: 首頁>>代碼示例>>Python>>正文


Python backends.pylab_setup方法代碼示例

本文整理匯總了Python中matplotlib.backends.pylab_setup方法的典型用法代碼示例。如果您正苦於以下問題:Python backends.pylab_setup方法的具體用法?Python backends.pylab_setup怎麽用?Python backends.pylab_setup使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在matplotlib.backends的用法示例。


在下文中一共展示了backends.pylab_setup方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: switch_backend

# 需要導入模塊: from matplotlib import backends [as 別名]
# 或者: from matplotlib.backends import pylab_setup [as 別名]
def switch_backend(newbackend):
    """
    Switch the default backend.  This feature is **experimental**, and
    is only expected to work switching to an image backend.  e.g., if
    you have a bunch of PostScript scripts that you want to run from
    an interactive ipython session, you may want to switch to the PS
    backend before running them to avoid having a bunch of GUI windows
    popup.  If you try to interactively switch from one GUI backend to
    another, you will explode.

    Calling this command will close all open windows.
    """
    close('all')
    global _backend_mod, new_figure_manager, draw_if_interactive, _show
    matplotlib.use(newbackend, warn=False, force=True)
    from matplotlib.backends import pylab_setup
    _backend_mod, new_figure_manager, draw_if_interactive, _show = pylab_setup() 
開發者ID:ktraunmueller,項目名稱:Computable,代碼行數:19,代碼來源:pyplot.py


注:本文中的matplotlib.backends.pylab_setup方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。