当前位置: 首页>>代码示例>>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;未经允许,请勿转载。