当前位置: 首页>>代码示例>>Python>>正文


Python QuaternaryPlot.plotbycolor方法代码示例

本文整理汇总了Python中myquaternaryutility.QuaternaryPlot.plotbycolor方法的典型用法代码示例。如果您正苦于以下问题:Python QuaternaryPlot.plotbycolor方法的具体用法?Python QuaternaryPlot.plotbycolor怎么用?Python QuaternaryPlot.plotbycolor使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在myquaternaryutility.QuaternaryPlot的用法示例。


在下文中一共展示了QuaternaryPlot.plotbycolor方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1:

# 需要导入模块: from myquaternaryutility import QuaternaryPlot [as 别名]
# 或者: from myquaternaryutility.QuaternaryPlot import plotbycolor [as 别名]
dropd['compositions']=numpy.array([dropd[elkey] for elkey in elkeys]).T

pylab.figure()
#axq=pylab.subplot(111)
stpq=QuaternaryPlot(111, ellabels=ellabels)

comps=numpy.array([dropd[elkey] for elkey in elkeys]).T

selectinds, distfromlin, lineparameter=stpq.filterbydistancefromline(comps, compverts[0], compverts[1], critdist, betweenpoints=betweenbool, invlogic=invertbool, returnall=True)
dropd['lineparameter']=lineparameter
dropd['distfromlin']=distfromlin
lineparameter=lineparameter[selectinds]

cols=stpq.rgb_comp(comps[selectinds])
stpq.plotbycolor(comps[selectinds], cols, marker='o', markersize=5, alpha=.6)

stpq.line(compverts[0], compverts[1], lw=2)
#stpq.scatter(comps[selectinds], pointsize
stpq.set_projection(azim=view_azim, elev=view_elev)
stpq.label(fontsize=20)

pylab.savefig(os.path.join(savefolder, 'QuatPoints.png'))

pylab.figure()

for k, v in dropd.iteritems():
#    if k in elkeys or k in ellabels or k in ['Sample', 'x(mm)', 'y(mm)', 'compositions']:
#        continue
    pylab.clf()
    ax=pylab.subplot(111)
开发者ID:johnmgregoire,项目名称:JCAPdatavis,代码行数:32,代码来源:plot_combinedfom_selectsamples.py

示例2:

# 需要导入模块: from myquaternaryutility import QuaternaryPlot [as 别名]
# 或者: from myquaternaryutility.QuaternaryPlot import plotbycolor [as 别名]
        
fig.subplots_adjust(left=.05, bottom=.03, top=.96, right=.83, hspace=.14)
cax=fig.add_axes((.85, .3, .04, .4))
cb=pylab.colorbar(mapbl, cax=cax, extend=extend)
cb.set_label(fomlabel, fontsize=20)




axl, stpl=make10ternaxes(ellabels=ellabels)
pylab.figure(figsize=(8, 8))
stpquat=QuaternaryPlot(111, ellabels=ellabels)

#stpquat.scatter(compsall[code0inds], c=fomall[code0inds], s=20, edgecolors='none', cmap=cmap, norm=norm)
cols=stpquat.scalarmap(fomall[code0inds], norm, cmap)
stpquat.plotbycolor(compsall[code0inds], cols, marker='o', markersize=5, alpha=.3)#, markeredgecolor=None
scatter_10axes(compsall[code0inds], fomall[code0inds], stpl, s=18, edgecolors='none', cmap=cmap, norm=norm)
if labelquat:
    stpquat.label(fontsize=20)

stpquat.set_projection(azim=view_azim, elev=view_elev)


axl30, stpl30=make30ternaxes(ellabels=ellabels)
scatter_30axes(compsall[code0inds], fomall[code0inds], stpl30, s=18, edgecolors='none', cmap=cmap, norm=norm)


axl_tern, stpl_tern=make4ternaxes(ellabels=ellabels)
scatter_4axes(compsall[code0inds], fomall[code0inds], stpl_tern, s=20, edgecolors='none', cmap=cmap, norm=norm)

axbin, axbininset=plotbinarylines_axandinset(linewidth=2, ellabels=ellabels)
开发者ID:johnmgregoire,项目名称:JCAPdatavis,代码行数:33,代码来源:echem_stacked_tern4withlinecut.py

示例3:

# 需要导入模块: from myquaternaryutility import QuaternaryPlot [as 别名]
# 或者: from myquaternaryutility.QuaternaryPlot import plotbycolor [as 别名]
dropd['compositions']=numpy.array([dropd[elkey] for elkey in elkeys]).T
comps=numpy.array([dropd[elkey] for elkey in elkeys]).T


gridi=30
comps30=[(a*1./gridi, b*1./gridi, c*1./gridi, (gridi-a-b-c)*1./gridi) for a in numpy.arange(0,1+gridi) for b in numpy.arange(0,1+gridi-a) for c in numpy.arange(0,1+gridi-a-b)]


pylab.figure()
#axq=pylab.subplot(111)
stpq=QuaternaryPlot(111, ellabels=ellabels)


cols=stpq.rgb_comp(comps30)
stpq.plotbycolor(comps30, cols, marker='o', markersize=3, alpha=1)

stpq.set_projection(azim=view_azim, elev=view_elev)

pylab.savefig(os.path.join(savefolder, 'QuatPointsAll.png'))
pylab.savefig(os.path.join(savefolder, 'QuatPointsAll.eps'))


pylab.figure()
#axq=pylab.subplot(111)
stpqp=QuaternaryPlot(111, ellabels=ellabels)



selectinds, distfromplane, xyparr, xyp_verts,intriangle=stpqp.filterbydistancefromplane(comps, compvertsp[0], compvertsp[1], compvertsp[2], critdistp, withintriangle=betweenbool, invlogic=invertbool, returnall=True)
xyparr=xyparr[selectinds]
开发者ID:johnmgregoire,项目名称:JCAPdatavis,代码行数:32,代码来源:plot_combinedfom_selectsamples_custom.py


注:本文中的myquaternaryutility.QuaternaryPlot.plotbycolor方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。