本文整理汇总了Python中myquaternaryutility.QuaternaryPlot.plot3D方法的典型用法代码示例。如果您正苦于以下问题:Python QuaternaryPlot.plot3D方法的具体用法?Python QuaternaryPlot.plot3D怎么用?Python QuaternaryPlot.plot3D使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类myquaternaryutility.QuaternaryPlot
的用法示例。
在下文中一共展示了QuaternaryPlot.plot3D方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: quatplot3D
# 需要导入模块: from myquaternaryutility import QuaternaryPlot [as 别名]
# 或者: from myquaternaryutility.QuaternaryPlot import plot3D [as 别名]
def quatplot3D(self, quatcomps, c, skipinds=range(4), azim=-60, elev=30, alphaall=.2, alphashell=1., fontsize=14, outline=True, **kwargs):
numsubs=int(self.nint//4)+1
quatcomps=numpy.int32(numpy.round(quatcomps*self.nint))
for nshell in range(int(self.nint//4)+int(self.nint%4>0)):
ba=((quatcomps==nshell).sum(axis=1, dtype='int32')>0)&((quatcomps>=nshell).prod(axis=1, dtype='int32')>0)
shellcomps=quatcomps[ba]
shellc=c[ba]
q=QuaternaryPlot((1, numsubs, nshell+1), outline=outline)
if alphaall>0:
q.plot3D(quatcomps*1./self.nint,c, alpha=alphaall, **kwargs)
if alphashell>0:
q.plot3D(shellcomps*1./self.nint,shellc, alpha=alphashell, **kwargs)
if fontsize>0:
q.label(ha='center', va='center', fontsize=fontsize)
q.set_projection(azim=azim, elev=elev)
if self.nint%4==0: #single point with no frame
ba=(quatcomps==self.nint//4).prod(axis=1, dtype='int32')>0
if True in ba:
shellcomps=quatcomps[ba]#only 1 comp but might be duplicated
shellc=c[ba]
q=QuaternaryPlot((1, numsubs, numsubs), outline=outline)
q.plot3D(quatcomps*1./self.nint,c, alpha=alphaall, **kwargs)
q.plot3D(shellcomps*1./self.nint,shellc, alpha=alphashell, **kwargs)
if fontsize>0:
q.label(ha='center', va='center', fontsize=fontsize)
q.set_projection(azim=azim, elev=elev)