当前位置: 首页>>代码示例>>Python>>正文


Python FancyArrowPatch.__init__方法代码示例

本文整理汇总了Python中matplotlib.patches.FancyArrowPatch.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python FancyArrowPatch.__init__方法的具体用法?Python FancyArrowPatch.__init__怎么用?Python FancyArrowPatch.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在matplotlib.patches.FancyArrowPatch的用法示例。


在下文中一共展示了FancyArrowPatch.__init__方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from matplotlib.patches import FancyArrowPatch [as 别名]
# 或者: from matplotlib.patches.FancyArrowPatch import __init__ [as 别名]
def __init__(self, axis_artist, line_path, transform,
                     line_mutation_scale):
            self._axis_artist = axis_artist
            self._line_transform = transform
            self._line_path = line_path
            self._line_mutation_scale = line_mutation_scale

            FancyArrowPatch.__init__(self,
                                     path=self._line_path,
                                     arrowstyle=self._ARROW_STYLE,
                                     arrow_transmuter=None,
                                     patchA=None,
                                     patchB=None,
                                     shrinkA=0.,
                                     shrinkB=0.,
                                     mutation_scale=line_mutation_scale,
                                     mutation_aspect=None,
                                     transform=IdentityTransform(),
                                     ) 
开发者ID:ktraunmueller,项目名称:Computable,代码行数:21,代码来源:axisline_style.py

示例2: __init__

# 需要导入模块: from matplotlib.patches import FancyArrowPatch [as 别名]
# 或者: from matplotlib.patches.FancyArrowPatch import __init__ [as 别名]
def __init__(self, name=None, mean=None, kappa=None):
        # TODO: Add log likelihood to vMF
        """
        Class to generate and/or load orientation data (azimuth and dip or pole vectors) based on the von-Mises-Fisher
        distribution. Contains methods for visualization and parameter estimation.
        Args:
            name (str): Name of the distribution
            mean (list): mean direction of the distribution in cartesian coordinates
            kappa (list): Concentration parameter
        """

        if kappa is not None:
            self.kappa = kappa

        if mean is not None:
            #if mean.shape[1] == 2:
            #self.mean = self._spherical2cartesian(mean)
            #else:
            self.mean = mean

        self.name = name 
开发者ID:cgre-aachen,项目名称:gempy,代码行数:23,代码来源:fishdist.py

示例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 
开发者ID:jiacheng-xu,项目名称:vmf_vae_nlp,代码行数:5,代码来源:draw_gauss_ball.py

示例4: __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 
开发者ID:Qiskit,项目名称:qiskit-terra,代码行数:6,代码来源:state_visualization.py

示例5: __init__

# 需要导入模块: from matplotlib.patches import FancyArrowPatch [as 别名]
# 或者: from matplotlib.patches.FancyArrowPatch import __init__ [as 别名]
def __init__(self, xs, ys, zs):
        FancyArrowPatch.__init__(
                self, (0, 0), (0, 0), mutation_scale=20, lw=1.5,
                arrowstyle='-|>', color='.2', zorder=100)
        self._verts3d = xs, ys, zs 
开发者ID:empymod,项目名称:empymod,代码行数:7,代码来源:coordinate_system.py

示例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 = xs, ys, zs 
开发者ID:ethz-asl,项目名称:hand_eye_calibration,代码行数:5,代码来源:hand_eye_calibration_plotting_tools.py

示例7: __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), (0.0, 0.0), *args, **kwargs)
        self._verts3d = xs, ys, zs 
开发者ID:abelcarreras,项目名称:DynaPhoPy,代码行数:5,代码来源:modes.py

示例8: plot_samples_3D

# 需要导入模块: from matplotlib.patches import FancyArrowPatch [as 别名]
# 或者: from matplotlib.patches.FancyArrowPatch import __init__ [as 别名]
def plot_samples_3D(self):
        """
        Plots the orientations in a sphere.
        Returns: Nothing, it just plots.
        """
        # (this code is partially from stackoverflow)
        fig = plt.figure(figsize=[5, 5])
        ax = fig.gca(projection='3d')
        ax.set_aspect("equal")
        ax.view_init(azim=30)

        # render the sphere mesh
        u, v = np.mgrid[0:2 * np.pi:20j, 0:np.pi:10j]
        # print(u,v)
        x = np.cos(u) * np.sin(v)
        y = np.sin(u) * np.sin(v)
        z = np.cos(v)
        ax.plot_wireframe(x, y, z, color="lightgray")
        plt.axis('on')

        # coordinate system in centre of sphere
        origin = [0, 0, 0]
        X, Y, Z = [1, 0, 0], [0, 1, 0], [0, 0, 1]
        O, O, O = zip(origin, origin, origin)
        X, Y, Z = zip(X, Y, Z)
        ax.quiver(O, O, O, X, Y, Z, arrow_length_ratio=0.1, color='k')

        ax.set_xlabel('X')
        ax.set_ylabel('Y')
        ax.set_zlabel('Z')

        class Arrow3D(FancyArrowPatch):
            def __init__(self, xs, ys, zs, *args, **kwargs):
                FancyArrowPatch.__init__(self, (0, 0), (0, 0), *args, **kwargs)
                self._verts3d = xs, ys, zs

            def draw(self, renderer):
                xs3d, ys3d, zs3d = self._verts3d
                xs, ys, zs = proj3d.proj_transform(xs3d, ys3d, zs3d, renderer.M)
                self.set_positions((xs[0], ys[0]), (xs[1], ys[1]))
                FancyArrowPatch.draw(self, renderer)

        # Plot arrows
        for i in self.samples_xyz:
            ax.add_artist(Arrow3D([0, i[0]], [0, i[1]], [0, i[2]], mutation_scale=20, lw=1, arrowstyle="-|>",
                                  color="darkgreen"))  # samples
        try:
            ax.add_artist(
                Arrow3D([0, self.mean[0]], [0, self.mean[1]], [0, self.mean[2]], mutation_scale=20, lw=1, arrowstyle="-|>",
                        color="darkorange"))  # mean
        except AttributeError:
            pass
        plt.show()
        return fig 
开发者ID:cgre-aachen,项目名称:gempy,代码行数:56,代码来源:fishdist.py


注:本文中的matplotlib.patches.FancyArrowPatch.__init__方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。