本文整理汇总了Python中matplotlib.patches.Ellipse._path2d方法的典型用法代码示例。如果您正苦于以下问题:Python Ellipse._path2d方法的具体用法?Python Ellipse._path2d怎么用?Python Ellipse._path2d使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类matplotlib.patches.Ellipse
的用法示例。
在下文中一共展示了Ellipse._path2d方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: photogeneration
# 需要导入模块: from matplotlib.patches import Ellipse [as 别名]
# 或者: from matplotlib.patches.Ellipse import _path2d [as 别名]
def photogeneration(loc):
arl = 0.10
sep = 0.05
arprop = dict(mutation_scale=10,
lw=1, arrowstyle="-|>",
zorder=20)
x, y, z = loc
#electron
electron, = ax.plot3D([x-sep/2], [y], [z],
c='c', marker='$-$', markersize=7, ls='none')
v = ((x-sep/2,x-sep/2), (y,y), (z+0.02, z+arl))
ar = Arrow3D(*v, color='c', **arprop)
ax.add_artist(ar)
#hole
hole, = ax.plot3D([x+sep/2], [y], [z],
c='r', marker='$+$', markersize=7, ls='none')
v = ((x+sep/2,x+sep/2), (y,y), (z-0.02, z-arl))
ar = Arrow3D(*v, color='r', **arprop)
ax.add_artist(ar)
#photon
draw_photon(ax, (0,0,1), location=(x,y,z-0.35), length=0.3, amplitude=0.02)
#encircle
ell = Ellipse((x,y), 2.5*sep, 2.5*sep, ls=':', ec='y', fc='none', lw=1)
art3d.pathpatch_2d_to_3d(ell, z, 'z')
ell._path2d = ell._path
ax.add_patch(ell)
return electron, hole