本文整理汇总了Python中matplotlib.cbook.deprecated方法的典型用法代码示例。如果您正苦于以下问题:Python cbook.deprecated方法的具体用法?Python cbook.deprecated怎么用?Python cbook.deprecated使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类matplotlib.cbook
的用法示例。
在下文中一共展示了cbook.deprecated方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: get_bbox_header
# 需要导入模块: from matplotlib import cbook [as 别名]
# 或者: from matplotlib.cbook import deprecated [as 别名]
def get_bbox_header(lbrt, rotated=False):
"""
return a postscript header stringfor the given bbox lbrt=(l, b, r, t).
Optionally, return rotate command.
"""
l, b, r, t = lbrt
if rotated:
rotate = "%.2f %.2f translate\n90 rotate" % (l+r, 0)
else:
rotate = ""
bbox_info = '%%%%BoundingBox: %d %d %d %d' % (l, b, np.ceil(r), np.ceil(t))
hires_bbox_info = '%%%%HiResBoundingBox: %.6f %.6f %.6f %.6f' % (l, b, r, t)
return '\n'.join([bbox_info, hires_bbox_info]), rotate
# get_bbox is deprecated. I don't see any reason to use ghostscript to
# find the bounding box, as the required bounding box is alread known.
示例2: __init__
# 需要导入模块: from matplotlib import cbook [as 别名]
# 或者: from matplotlib.cbook import deprecated [as 别名]
def __init__(self, bitmap, dpi):
"""
Initialise a wxWindows renderer instance.
"""
warn_deprecated('2.0', message="The WX backend is "
"deprecated. It's untested "
"and will be removed in Matplotlib 3.0. "
"Use the WXAgg backend instead. "
"See Matplotlib usage FAQ for more info on backends.",
alternative='WXAgg')
RendererBase.__init__(self)
DEBUG_MSG("__init__()", 1, self)
self.width = bitmap.GetWidth()
self.height = bitmap.GetHeight()
self.bitmap = bitmap
self.fontd = {}
self.dpi = dpi
self.gc = None
示例3: spy
# 需要导入模块: from matplotlib import cbook [as 别名]
# 或者: from matplotlib.cbook import deprecated [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.
示例4: acorr
# 需要导入模块: from matplotlib import cbook [as 别名]
# 或者: from matplotlib.cbook import deprecated [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.
示例5: angle_spectrum
# 需要导入模块: from matplotlib import cbook [as 别名]
# 或者: from matplotlib.cbook import deprecated [as 别名]
def angle_spectrum(x, Fs=None, Fc=None, window=None, pad_to=None, sides=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.angle_spectrum(x, Fs=Fs, Fc=Fc, window=window, pad_to=pad_to,
sides=sides, data=data, **kwargs)
finally:
ax._hold = washold
return ret
# Autogenerated by boilerplate.py. Do not edit as changes will be lost.
示例6: axhline
# 需要导入模块: from matplotlib import cbook [as 别名]
# 或者: from matplotlib.cbook import deprecated [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.
示例7: axhspan
# 需要导入模块: from matplotlib import cbook [as 别名]
# 或者: from matplotlib.cbook import deprecated [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.
示例8: axvline
# 需要导入模块: from matplotlib import cbook [as 别名]
# 或者: from matplotlib.cbook import deprecated [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.
示例9: axvspan
# 需要导入模块: from matplotlib import cbook [as 别名]
# 或者: from matplotlib.cbook import deprecated [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.
示例10: bar
# 需要导入模块: from matplotlib import cbook [as 别名]
# 或者: from matplotlib.cbook import deprecated [as 别名]
def bar(*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.bar(*args, **kwargs)
finally:
ax._hold = washold
return ret
# Autogenerated by boilerplate.py. Do not edit as changes will be lost.
示例11: broken_barh
# 需要导入模块: from matplotlib import cbook [as 别名]
# 或者: from matplotlib.cbook import deprecated [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.
示例12: cohere
# 需要导入模块: from matplotlib import cbook [as 别名]
# 或者: from matplotlib.cbook import deprecated [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.
示例13: clabel
# 需要导入模块: from matplotlib import cbook [as 别名]
# 或者: from matplotlib.cbook import deprecated [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.
示例14: contour
# 需要导入模块: from matplotlib import cbook [as 别名]
# 或者: from matplotlib.cbook import deprecated [as 别名]
def contour(*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.contour(*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.
示例15: csd
# 需要导入模块: from matplotlib import cbook [as 别名]
# 或者: from matplotlib.cbook import deprecated [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.