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


Python figure.SubplotParams方法代碼示例

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


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

示例1: get_subplot_params

# 需要導入模塊: from matplotlib import figure [as 別名]
# 或者: from matplotlib.figure import SubplotParams [as 別名]
def get_subplot_params(self, fig=None):
        """
        return a dictionary of subplot layout parameters. The default
        parameters are from rcParams unless a figure attribute is set.
        """
        from matplotlib.figure import SubplotParams
        import copy
        if fig is None:
            kw = dict([(k, rcParams["figure.subplot."+k]) \
                       for k in self._AllowedKeys])
            subplotpars = SubplotParams(**kw)
        else:
            subplotpars = copy.copy(fig.subplotpars)

        update_kw = dict([(k, getattr(self, k)) for k in self._AllowedKeys])
        subplotpars.update(**update_kw)

        return subplotpars 
開發者ID:ktraunmueller,項目名稱:Computable,代碼行數:20,代碼來源:gridspec.py

示例2: timeseries

# 需要導入模塊: from matplotlib import figure [as 別名]
# 或者: from matplotlib.figure import SubplotParams [as 別名]
def timeseries(X, **kwargs):
    """Plot X. See timeseries_subplot."""
    pl.figure(
        figsize=tuple(2 * s for s in rcParams['figure.figsize']),
        subplotpars=sppars(left=0.12, right=0.98, bottom=0.13),
    )
    timeseries_subplot(X, **kwargs) 
開發者ID:theislab,項目名稱:scanpy,代碼行數:9,代碼來源:_utils.py

示例3: load_figure

# 需要導入模塊: from matplotlib import figure [as 別名]
# 或者: from matplotlib.figure import SubplotParams [as 別名]
def load_figure(d, new_fig=True):
        """Create a figure from what is returned by :meth:`inspect_figure`"""
        import matplotlib.pyplot as plt
        subplotpars = d.pop('subplotpars', None)
        if subplotpars is not None:
            subplotpars.pop('validate', None)
            subplotpars = mfig.SubplotParams(**subplotpars)
        if new_fig:
            nums = plt.get_fignums()
            if d.get('num') in nums:
                d['num'] = next(
                    i for i in range(max(plt.get_fignums()) + 1, 0, -1)
                    if i not in nums)
        return plt.figure(subplotpars=subplotpars, **d) 
開發者ID:psyplot,項目名稱:psyplot,代碼行數:16,代碼來源:project.py


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