当前位置: 首页>>代码示例>>Python>>正文


Python cbook.mplDeprecation方法代码示例

本文整理汇总了Python中matplotlib.cbook.mplDeprecation方法的典型用法代码示例。如果您正苦于以下问题:Python cbook.mplDeprecation方法的具体用法?Python cbook.mplDeprecation怎么用?Python cbook.mplDeprecation使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在matplotlib.cbook的用法示例。


在下文中一共展示了cbook.mplDeprecation方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: get_subplot_params

# 需要导入模块: from matplotlib import cbook [as 别名]
# 或者: from matplotlib.cbook import mplDeprecation [as 别名]
def get_subplot_params(self, figure=None, fig=None):
        """
        Return a dictionary of subplot layout parameters. The default
        parameters are from rcParams unless a figure attribute is set.
        """
        if fig is not None:
            warnings.warn("the 'fig' kwarg is deprecated "
                          "use 'figure' instead", mplDeprecation)
        if figure is None:
            figure = fig

        if figure is None:
            kw = {k: rcParams["figure.subplot."+k] for k in self._AllowedKeys}
            subplotpars = mpl.figure.SubplotParams(**kw)
        else:
            subplotpars = copy.copy(figure.subplotpars)

        update_kw = {k: getattr(self, k) for k in self._AllowedKeys}
        subplotpars.update(**update_kw)

        return subplotpars 
开发者ID:alvarobartt,项目名称:twitter-stock-recommendation,代码行数:23,代码来源:gridspec.py

示例2: spy

# 需要导入模块: from matplotlib import cbook [as 别名]
# 或者: from matplotlib.cbook import mplDeprecation [as 别名]
def spy(Z, precision=0, marker=None, markersize=None, aspect='equal', **kwargs):
    ax = gca()
    hold = kwargs.pop('hold', None)
    # allow callers to override the hold state by passing hold=True|False
    washold = ax._hold

    if hold is not None:
        ax._hold = hold
        from matplotlib.cbook import mplDeprecation
        warnings.warn("The 'hold' keyword argument is deprecated since 2.0.",
                      mplDeprecation)
    try:
        ret = ax.spy(Z, precision, marker, markersize, aspect, **kwargs)
    finally:
        ax._hold = washold
    if isinstance(ret, cm.ScalarMappable):
        sci(ret)
    return ret

# just to be safe.  Interactive mode can be turned on without
# calling `plt.ion()` so register it again here.
# This is safe because multiple calls to `install_repl_displayhook`
# are no-ops and the registered function respect `mpl.is_interactive()`
# to determine if they should trigger a draw. 
开发者ID:alvarobartt,项目名称:twitter-stock-recommendation,代码行数:26,代码来源:pyplot.py

示例3: acorr

# 需要导入模块: from matplotlib import cbook [as 别名]
# 或者: from matplotlib.cbook import mplDeprecation [as 别名]
def acorr(x, hold=None, data=None, **kwargs):
    ax = gca()
    # Deprecated: allow callers to override the hold state
    # by passing hold=True|False
    washold = ax._hold

    if hold is not None:
        ax._hold = hold
        from matplotlib.cbook import mplDeprecation
        warnings.warn("The 'hold' keyword argument is deprecated since 2.0.",
                      mplDeprecation)
    try:
        ret = ax.acorr(x, data=data, **kwargs)
    finally:
        ax._hold = washold

    return ret

# Autogenerated by boilerplate.py.  Do not edit as changes will be lost. 
开发者ID:alvarobartt,项目名称:twitter-stock-recommendation,代码行数:21,代码来源:pyplot.py

示例4: arrow

# 需要导入模块: from matplotlib import cbook [as 别名]
# 或者: from matplotlib.cbook import mplDeprecation [as 别名]
def arrow(x, y, dx, dy, hold=None, **kwargs):
    ax = gca()
    # Deprecated: allow callers to override the hold state
    # by passing hold=True|False
    washold = ax._hold

    if hold is not None:
        ax._hold = hold
        from matplotlib.cbook import mplDeprecation
        warnings.warn("The 'hold' keyword argument is deprecated since 2.0.",
                      mplDeprecation)
    try:
        ret = ax.arrow(x, y, dx, dy, **kwargs)
    finally:
        ax._hold = washold

    return ret

# Autogenerated by boilerplate.py.  Do not edit as changes will be lost. 
开发者ID:alvarobartt,项目名称:twitter-stock-recommendation,代码行数:21,代码来源:pyplot.py

示例5: axhline

# 需要导入模块: from matplotlib import cbook [as 别名]
# 或者: from matplotlib.cbook import mplDeprecation [as 别名]
def axhline(y=0, xmin=0, xmax=1, hold=None, **kwargs):
    ax = gca()
    # Deprecated: allow callers to override the hold state
    # by passing hold=True|False
    washold = ax._hold

    if hold is not None:
        ax._hold = hold
        from matplotlib.cbook import mplDeprecation
        warnings.warn("The 'hold' keyword argument is deprecated since 2.0.",
                      mplDeprecation)
    try:
        ret = ax.axhline(y=y, xmin=xmin, xmax=xmax, **kwargs)
    finally:
        ax._hold = washold

    return ret

# Autogenerated by boilerplate.py.  Do not edit as changes will be lost. 
开发者ID:alvarobartt,项目名称:twitter-stock-recommendation,代码行数:21,代码来源:pyplot.py

示例6: axhspan

# 需要导入模块: from matplotlib import cbook [as 别名]
# 或者: from matplotlib.cbook import mplDeprecation [as 别名]
def axhspan(ymin, ymax, xmin=0, xmax=1, hold=None, **kwargs):
    ax = gca()
    # Deprecated: allow callers to override the hold state
    # by passing hold=True|False
    washold = ax._hold

    if hold is not None:
        ax._hold = hold
        from matplotlib.cbook import mplDeprecation
        warnings.warn("The 'hold' keyword argument is deprecated since 2.0.",
                      mplDeprecation)
    try:
        ret = ax.axhspan(ymin, ymax, xmin=xmin, xmax=xmax, **kwargs)
    finally:
        ax._hold = washold

    return ret

# Autogenerated by boilerplate.py.  Do not edit as changes will be lost. 
开发者ID:alvarobartt,项目名称:twitter-stock-recommendation,代码行数:21,代码来源:pyplot.py

示例7: axvline

# 需要导入模块: from matplotlib import cbook [as 别名]
# 或者: from matplotlib.cbook import mplDeprecation [as 别名]
def axvline(x=0, ymin=0, ymax=1, hold=None, **kwargs):
    ax = gca()
    # Deprecated: allow callers to override the hold state
    # by passing hold=True|False
    washold = ax._hold

    if hold is not None:
        ax._hold = hold
        from matplotlib.cbook import mplDeprecation
        warnings.warn("The 'hold' keyword argument is deprecated since 2.0.",
                      mplDeprecation)
    try:
        ret = ax.axvline(x=x, ymin=ymin, ymax=ymax, **kwargs)
    finally:
        ax._hold = washold

    return ret

# Autogenerated by boilerplate.py.  Do not edit as changes will be lost. 
开发者ID:alvarobartt,项目名称:twitter-stock-recommendation,代码行数:21,代码来源:pyplot.py

示例8: axvspan

# 需要导入模块: from matplotlib import cbook [as 别名]
# 或者: from matplotlib.cbook import mplDeprecation [as 别名]
def axvspan(xmin, xmax, ymin=0, ymax=1, hold=None, **kwargs):
    ax = gca()
    # Deprecated: allow callers to override the hold state
    # by passing hold=True|False
    washold = ax._hold

    if hold is not None:
        ax._hold = hold
        from matplotlib.cbook import mplDeprecation
        warnings.warn("The 'hold' keyword argument is deprecated since 2.0.",
                      mplDeprecation)
    try:
        ret = ax.axvspan(xmin, xmax, ymin=ymin, ymax=ymax, **kwargs)
    finally:
        ax._hold = washold

    return ret

# Autogenerated by boilerplate.py.  Do not edit as changes will be lost. 
开发者ID:alvarobartt,项目名称:twitter-stock-recommendation,代码行数:21,代码来源:pyplot.py

示例9: barh

# 需要导入模块: from matplotlib import cbook [as 别名]
# 或者: from matplotlib.cbook import mplDeprecation [as 别名]
def barh(*args, **kwargs):
    ax = gca()
    # Deprecated: allow callers to override the hold state
    # by passing hold=True|False
    washold = ax._hold
    hold = kwargs.pop('hold', None)
    if hold is not None:
        ax._hold = hold
        from matplotlib.cbook import mplDeprecation
        warnings.warn("The 'hold' keyword argument is deprecated since 2.0.",
                      mplDeprecation)
    try:
        ret = ax.barh(*args, **kwargs)
    finally:
        ax._hold = washold

    return ret

# Autogenerated by boilerplate.py.  Do not edit as changes will be lost. 
开发者ID:alvarobartt,项目名称:twitter-stock-recommendation,代码行数:21,代码来源:pyplot.py

示例10: broken_barh

# 需要导入模块: from matplotlib import cbook [as 别名]
# 或者: from matplotlib.cbook import mplDeprecation [as 别名]
def broken_barh(xranges, yrange, hold=None, data=None, **kwargs):
    ax = gca()
    # Deprecated: allow callers to override the hold state
    # by passing hold=True|False
    washold = ax._hold

    if hold is not None:
        ax._hold = hold
        from matplotlib.cbook import mplDeprecation
        warnings.warn("The 'hold' keyword argument is deprecated since 2.0.",
                      mplDeprecation)
    try:
        ret = ax.broken_barh(xranges, yrange, data=data, **kwargs)
    finally:
        ax._hold = washold

    return ret

# Autogenerated by boilerplate.py.  Do not edit as changes will be lost. 
开发者ID:alvarobartt,项目名称:twitter-stock-recommendation,代码行数:21,代码来源:pyplot.py

示例11: cohere

# 需要导入模块: from matplotlib import cbook [as 别名]
# 或者: from matplotlib.cbook import mplDeprecation [as 别名]
def cohere(x, y, NFFT=256, Fs=2, Fc=0, detrend=mlab.detrend_none,
           window=mlab.window_hanning, noverlap=0, pad_to=None, sides='default',
           scale_by_freq=None, hold=None, data=None, **kwargs):
    ax = gca()
    # Deprecated: allow callers to override the hold state
    # by passing hold=True|False
    washold = ax._hold

    if hold is not None:
        ax._hold = hold
        from matplotlib.cbook import mplDeprecation
        warnings.warn("The 'hold' keyword argument is deprecated since 2.0.",
                      mplDeprecation)
    try:
        ret = ax.cohere(x, y, NFFT=NFFT, Fs=Fs, Fc=Fc, detrend=detrend,
                        window=window, noverlap=noverlap, pad_to=pad_to,
                        sides=sides, scale_by_freq=scale_by_freq, data=data,
                        **kwargs)
    finally:
        ax._hold = washold

    return ret

# Autogenerated by boilerplate.py.  Do not edit as changes will be lost. 
开发者ID:alvarobartt,项目名称:twitter-stock-recommendation,代码行数:26,代码来源:pyplot.py

示例12: clabel

# 需要导入模块: from matplotlib import cbook [as 别名]
# 或者: from matplotlib.cbook import mplDeprecation [as 别名]
def clabel(CS, *args, **kwargs):
    ax = gca()
    # Deprecated: allow callers to override the hold state
    # by passing hold=True|False
    washold = ax._hold
    hold = kwargs.pop('hold', None)
    if hold is not None:
        ax._hold = hold
        from matplotlib.cbook import mplDeprecation
        warnings.warn("The 'hold' keyword argument is deprecated since 2.0.",
                      mplDeprecation)
    try:
        ret = ax.clabel(CS, *args, **kwargs)
    finally:
        ax._hold = washold

    return ret

# Autogenerated by boilerplate.py.  Do not edit as changes will be lost. 
开发者ID:alvarobartt,项目名称:twitter-stock-recommendation,代码行数:21,代码来源:pyplot.py

示例13: contourf

# 需要导入模块: from matplotlib import cbook [as 别名]
# 或者: from matplotlib.cbook import mplDeprecation [as 别名]
def contourf(*args, **kwargs):
    ax = gca()
    # Deprecated: allow callers to override the hold state
    # by passing hold=True|False
    washold = ax._hold
    hold = kwargs.pop('hold', None)
    if hold is not None:
        ax._hold = hold
        from matplotlib.cbook import mplDeprecation
        warnings.warn("The 'hold' keyword argument is deprecated since 2.0.",
                      mplDeprecation)
    try:
        ret = ax.contourf(*args, **kwargs)
    finally:
        ax._hold = washold
    if ret._A is not None: sci(ret)
    return ret

# Autogenerated by boilerplate.py.  Do not edit as changes will be lost. 
开发者ID:alvarobartt,项目名称:twitter-stock-recommendation,代码行数:21,代码来源:pyplot.py

示例14: csd

# 需要导入模块: from matplotlib import cbook [as 别名]
# 或者: from matplotlib.cbook import mplDeprecation [as 别名]
def csd(x, y, NFFT=None, Fs=None, Fc=None, detrend=None, window=None,
        noverlap=None, pad_to=None, sides=None, scale_by_freq=None,
        return_line=None, hold=None, data=None, **kwargs):
    ax = gca()
    # Deprecated: allow callers to override the hold state
    # by passing hold=True|False
    washold = ax._hold

    if hold is not None:
        ax._hold = hold
        from matplotlib.cbook import mplDeprecation
        warnings.warn("The 'hold' keyword argument is deprecated since 2.0.",
                      mplDeprecation)
    try:
        ret = ax.csd(x, y, NFFT=NFFT, Fs=Fs, Fc=Fc, detrend=detrend,
                     window=window, noverlap=noverlap, pad_to=pad_to,
                     sides=sides, scale_by_freq=scale_by_freq,
                     return_line=return_line, data=data, **kwargs)
    finally:
        ax._hold = washold

    return ret

# Autogenerated by boilerplate.py.  Do not edit as changes will be lost. 
开发者ID:alvarobartt,项目名称:twitter-stock-recommendation,代码行数:26,代码来源:pyplot.py

示例15: eventplot

# 需要导入模块: from matplotlib import cbook [as 别名]
# 或者: from matplotlib.cbook import mplDeprecation [as 别名]
def eventplot(positions, orientation='horizontal', lineoffsets=1, linelengths=1,
              linewidths=None, colors=None, linestyles='solid', hold=None,
              data=None, **kwargs):
    ax = gca()
    # Deprecated: allow callers to override the hold state
    # by passing hold=True|False
    washold = ax._hold

    if hold is not None:
        ax._hold = hold
        from matplotlib.cbook import mplDeprecation
        warnings.warn("The 'hold' keyword argument is deprecated since 2.0.",
                      mplDeprecation)
    try:
        ret = ax.eventplot(positions, orientation=orientation,
                           lineoffsets=lineoffsets, linelengths=linelengths,
                           linewidths=linewidths, colors=colors,
                           linestyles=linestyles, data=data, **kwargs)
    finally:
        ax._hold = washold

    return ret

# Autogenerated by boilerplate.py.  Do not edit as changes will be lost. 
开发者ID:alvarobartt,项目名称:twitter-stock-recommendation,代码行数:26,代码来源:pyplot.py


注:本文中的matplotlib.cbook.mplDeprecation方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。