當前位置: 首頁>>代碼示例>>Python>>正文


Python QuaternaryPlot.singlelabeltext方法代碼示例

本文整理匯總了Python中myquaternaryutility.QuaternaryPlot.singlelabeltext方法的典型用法代碼示例。如果您正苦於以下問題:Python QuaternaryPlot.singlelabeltext方法的具體用法?Python QuaternaryPlot.singlelabeltext怎麽用?Python QuaternaryPlot.singlelabeltext使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在myquaternaryutility.QuaternaryPlot的用法示例。


在下文中一共展示了QuaternaryPlot.singlelabeltext方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1:

# 需要導入模塊: from myquaternaryutility import QuaternaryPlot [as 別名]
# 或者: from myquaternaryutility.QuaternaryPlot import singlelabeltext [as 別名]
    lp=lined['lineparameter'][code0inds]
#    lp[lp<0.]=0.
#    lp[lp>1.]=1.
    fom=fomall[code0inds]
    argsinds=numpy.argsort(lp)
    pylab.plot(lp[argsinds], fom[argsinds], 'b-')
    pylab.plot(lp[argsinds], fom[argsinds], 'bo')
    if not linedsmoothfcn is None:
        fomsmooth=linedsmoothfcn(lp[argsinds], fom[argsinds])
        pylab.plot(lp[argsinds], fomsmooth, 'k-')
    axlinepar=pylab.gca()
    lineparticks=numpy.linspace(0, 1, 4)
    tl=[]
    for i in lineparticks:
        c=lined['compend1']+(lined['compend2']-lined['compend1'])*i
        tl+=[stpquat.singlelabeltext(c)]
    pylab.xlim(0, 1)
    #pylab.ylim(vmin, vmax)
    axlinepar.xaxis.set_ticks(lineparticks)
    axlinepar.xaxis.set_ticklabels(tl)
    pylab.ylabel(fomlabel)


if SYSTEM==1:
    axbin.set_ylim(.23, .7)
if SYSTEM==6:
    axbin.set_ylim(.38, .5)

if not os.path.exists(savefolder):
    os.mkdir(savefolder)
os.chdir(savefolder)
開發者ID:johnmgregoire,項目名稱:JCAPdatavis,代碼行數:33,代碼來源:echem_stacked_tern4withlinecut.py

示例2: len

# 需要導入模塊: from myquaternaryutility import QuaternaryPlot [as 別名]
# 或者: from myquaternaryutility.QuaternaryPlot import singlelabeltext [as 別名]
q.label(ha='center', va='center', fontsize=16)
q.set_projection(azim=-17, elev=-6)

inds, distfromlin, lineparameter=q2.filterbydistancefromline(comps, compend1, compend2, critdist, betweenpoints=betweenpoints, invlogic=False, returnall=True)
indsnot=q2.filterbydistancefromline(comps, compend1, compend2, critdist, betweenpoints=betweenpoints, invlogic=True)
print len(inds), ' points'
q2.scatter(comps[inds],c=comps[inds,3])
q2.scatter(comps[indsnot],c='grey', marker='.', s=5)
q2.line(compend1, compend2)


q2.label(ha='center', va='center', fontsize=16)
q2.set_projection(azim=-17, elev=-6)

pylab.figure()

lp=lineparameter[inds]
argsinds=numpy.argsort(lp)
pylab.plot(lp[argsinds], comps[inds,3][argsinds], 'b-')
pylab.plot(lp[argsinds], comps[inds,3][argsinds], 'bo')
ax=pylab.gca()
lineparticks=numpy.linspace(0, 1, 4)
tl=[]
for i in lineparticks:
    c=compend1+(compend2-compend1)*i
    tl+=[q.singlelabeltext(c)]
ax.xaxis.set_ticks(lineparticks)
ax.xaxis.set_ticklabels(tl)
pylab.show()
開發者ID:helgestein,項目名稱:PythonCompositionPlots,代碼行數:31,代碼來源:distfromline_demo.py


注:本文中的myquaternaryutility.QuaternaryPlot.singlelabeltext方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。