本文整理匯總了Python中matplotlib.ticker._Edge_integer方法的典型用法代碼示例。如果您正苦於以下問題:Python ticker._Edge_integer方法的具體用法?Python ticker._Edge_integer怎麽用?Python ticker._Edge_integer使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類matplotlib.ticker
的用法示例。
在下文中一共展示了ticker._Edge_integer方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: __init__
# 需要導入模塊: from matplotlib import ticker [as 別名]
# 或者: from matplotlib.ticker import _Edge_integer [as 別名]
def __init__(self, base=1, month=1, day=1, tz=None):
"""
Mark years that are multiple of base on a given month and day
(default jan 1).
"""
DateLocator.__init__(self, tz)
self.base = ticker._Edge_integer(base, 0)
self.replaced = {'month': month,
'day': day,
'hour': 0,
'minute': 0,
'second': 0,
}
if not hasattr(tz, 'localize'):
# if tz is pytz, we need to do this w/ the localize fcn,
# otherwise datetime.replace works fine...
self.replaced['tzinfo'] = tz
示例2: __init__
# 需要導入模塊: from matplotlib import ticker [as 別名]
# 或者: from matplotlib.ticker import _Edge_integer [as 別名]
def __init__(self, base=1, month=1, day=1, tz=None):
"""
Mark years that are multiple of base on a given month and day
(default jan 1).
"""
DateLocator.__init__(self, tz)
self.base = ticker._Edge_integer(base, 0)
self.replaced = {'month': month,
'day': day,
'hour': 0,
'minute': 0,
'second': 0,
'tzinfo': tz
}
示例3: __init__
# 需要導入模塊: from matplotlib import ticker [as 別名]
# 或者: from matplotlib.ticker import _Edge_integer [as 別名]
def __init__(self, nbins=7, symmetric=True):
if parse_version(matplotlib.__version__) < parse_version('3.1.0'):
self._base = mticker.Base(1.0)
else:
self._base = mticker._Edge_integer(1.0, 0)
self.set_params(nbins, symmetric)