本文整理匯總了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)