本文整理匯總了Python中matplotlib.transforms.Transform.__init__方法的典型用法代碼示例。如果您正苦於以下問題:Python Transform.__init__方法的具體用法?Python Transform.__init__怎麽用?Python Transform.__init__使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類matplotlib.transforms.Transform
的用法示例。
在下文中一共展示了Transform.__init__方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: __init__
# 需要導入模塊: from matplotlib.transforms import Transform [as 別名]
# 或者: from matplotlib.transforms.Transform import __init__ [as 別名]
def __init__(self, grid_helper, side, nth_coord_ticks=None):
"""
nth_coord = along which coordinate value varies.
nth_coord = 0 -> x axis, nth_coord = 1 -> y axis
"""
super(FixedAxisArtistHelper, self).__init__( \
loc=side,
)
self.grid_helper = grid_helper
if nth_coord_ticks is None:
nth_coord_ticks = self.nth_coord
self.nth_coord_ticks = nth_coord_ticks
self.side = side
self._limits_inverted = False
示例2: __init__
# 需要導入模塊: from matplotlib.transforms import Transform [as 別名]
# 或者: from matplotlib.transforms.Transform import __init__ [as 別名]
def __init__(self, dist, as_pct=True, out_of_bounds='mask'):
Transform.__init__(self)
self.dist = dist
self.as_pct = as_pct
self.out_of_bounds = out_of_bounds
if self.as_pct:
self.factor = 100.0
else:
self.factor = 1.0
if self.out_of_bounds == 'mask':
self._handle_out_of_bounds = _mask_out_of_bounds
elif self.out_of_bounds == 'clip':
self._handle_out_of_bounds = _clip_out_of_bounds
else:
raise ValueError("`out_of_bounds` muse be either 'mask' or 'clip'")
示例3: __init__
# 需要導入模塊: from matplotlib.transforms import Transform [as 別名]
# 或者: from matplotlib.transforms.Transform import __init__ [as 別名]
def __init__(self, axis, **kwargs):
pass
示例4: get_scale_docs
# 需要導入模塊: from matplotlib.transforms import Transform [as 別名]
# 或者: from matplotlib.transforms.Transform import __init__ [as 別名]
def get_scale_docs():
"""
Helper function for generating docstrings related to scales.
"""
docs = []
for name in get_scale_names():
scale_class = _scale_mapping[name]
docs.append(" '%s'" % name)
docs.append("")
class_docs = dedent(scale_class.__init__.__doc__)
class_docs = "".join([" %s\n" %
x for x in class_docs.split("\n")])
docs.append(class_docs)
docs.append("")
return "\n".join(docs)
示例5: __init__
# 需要導入模塊: from matplotlib.transforms import Transform [as 別名]
# 或者: from matplotlib.transforms.Transform import __init__ [as 別名]
def __init__(self, round_to=1.0):
self._round_to = round_to