本文整理汇总了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