當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。