本文整理汇总了Python中matplotlib.patches.FancyArrowPatch.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python FancyArrowPatch.__init__方法的具体用法?Python FancyArrowPatch.__init__怎么用?Python FancyArrowPatch.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类matplotlib.patches.FancyArrowPatch
的用法示例。
在下文中一共展示了FancyArrowPatch.__init__方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from matplotlib.patches import FancyArrowPatch [as 别名]
# 或者: from matplotlib.patches.FancyArrowPatch import __init__ [as 别名]
def __init__(self,xs,ys,zs,*args,**kwargs):
'''
arguments:
xs: the x coordinates of both sides of the arrow
ys: the y coordinates of both sides of the arrow
zs: the z coordinates of both sides of the arrow
'''
FancyArrowPatch.__init__(self,(0,0),(0,0),*args,**kwargs)
self.verts = xs,ys,zs
示例2: __init__
# 需要导入模块: from matplotlib.patches import FancyArrowPatch [as 别名]
# 或者: from matplotlib.patches.FancyArrowPatch import __init__ [as 别名]
def __init__(self, base, xs, ys, zs, colors, *args, **kwargs):
"""
Init
:Params xs: [[x0, x0+dx0], [x1, x1+dx1], ...]
:Params ys: [[y0, y0+dy0], [y1, y1+dy1], ...]
:Params zs: [[z0, z0+dz0], [z1, z1+dz1], ...]
:Params colors: [[R0, G0, B0], [R1, G1, B1], ...]
where R, G, B ranges (0,1)
"""
FancyArrowPatch.__init__(self, (0, 0), (0, 0), *args, **kwargs)
self.leftdown = False
self.t_click = 0
self._verts3d = xs, ys, zs
self.colors = colors
self.base = base
if base != None:
# To turn the updating off during dragging
base.canvas.mpl_connect('button_press_event', self.on_left_down)
base.canvas.mpl_connect('button_release_event', self.on_left_up)
示例3: __init__
# 需要导入模块: from matplotlib.patches import FancyArrowPatch [as 别名]
# 或者: from matplotlib.patches.FancyArrowPatch import __init__ [as 别名]
def __init__(self, xs, ys, zs, *args, **kwargs):
FancyArrowPatch.__init__(self, (0,0), (0,0), *args, **kwargs)
self._verts3d = xs, ys, zs
示例4: __init__
# 需要导入模块: from matplotlib.patches import FancyArrowPatch [as 别名]
# 或者: from matplotlib.patches.FancyArrowPatch import __init__ [as 别名]
def __init__(self, xs, ys, zs, *args, **kwargs):
kwargs.update(dict(mutation_scale=20, lw=1, arrowstyle='-|>'))
FancyArrowPatch.__init__(self, (0,0), (0,0), *args, **kwargs)
self._verts3d = xs, ys, zs
示例5: __init__
# 需要导入模块: from matplotlib.patches import FancyArrowPatch [as 别名]
# 或者: from matplotlib.patches.FancyArrowPatch import __init__ [as 别名]
def __init__(self, xs, ys, zs, *args, **kwargs):
"""Create arrow."""
FancyArrowPatch.__init__(self, (0, 0), (0, 0), *args, **kwargs)
self._verts3d = xs, ys, zs
示例6: __init__
# 需要导入模块: from matplotlib.patches import FancyArrowPatch [as 别名]
# 或者: from matplotlib.patches.FancyArrowPatch import __init__ [as 别名]
def __init__(self, xs, ys, zs, *args, **kwargs):
FancyArrowPatch.__init__(self, (0, 0), (0, 0), *args, **kwargs)
self._verts3d = []
for x, y, z in zip(xs, ys, zs):
self._verts3d.append([[0, x], [0, y], [0, z]])
示例7: __init__
# 需要导入模块: from matplotlib.patches import FancyArrowPatch [as 别名]
# 或者: from matplotlib.patches.FancyArrowPatch import __init__ [as 别名]
def __init__(self, pt1, pt2, *args, **kwargs):
FancyArrowPatch.__init__(self, (0, 0), (0, 0), *args, **kwargs)
x = [pt1[0, 0], pt2[0, 0]]
y = [pt1[1, 0], pt2[1, 0]]
z = [pt1[2, 0], pt2[2, 0]]
self._verts3d = x, y, z