當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。