本文整理汇总了Python中myquaternaryutility.QuaternaryPlot.plotfomalonglineparameter方法的典型用法代码示例。如果您正苦于以下问题:Python QuaternaryPlot.plotfomalonglineparameter方法的具体用法?Python QuaternaryPlot.plotfomalonglineparameter怎么用?Python QuaternaryPlot.plotfomalonglineparameter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类myquaternaryutility.QuaternaryPlot
的用法示例。
在下文中一共展示了QuaternaryPlot.plotfomalonglineparameter方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: overpotential
# 需要导入模块: from myquaternaryutility import QuaternaryPlot [as 别名]
# 或者: from myquaternaryutility.QuaternaryPlot import plotfomalonglineparameter [as 别名]
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)
fomselect=v[selectinds]
stpq.plotfomalonglineparameter(ax, lineparameter, fomselect, compend1=compverts[0], compend2=compverts[1], lineparticks=numpy.linspace(0, 1, 5), ls='none', marker='.', ticklabelkwargdict=dict([('rotation', -20), ('horizontalalignment', 'left')]))
pylab.ylabel(k)
pylab.subplots_adjust(bottom=.15, left=.15, right=.8)
pylab.savefig(os.path.join(savefolder, k+'.png'))
pylab.clf()
ax=pylab.subplot(111)
for k, c, l, vsh in [('CP5Eave', 'b', '1 mA/cm$^2$', -(.187-.044)), ('CP4Eave', 'g', '10 mA/cm$^2$', -(.187-.044)), ('CP6Eave', 'r', '19 mA/cm$^2$', -(.187-.048))]:
fomselect=(vsh+dropd[k][selectinds])*1000.
stpq.plotfomalonglineparameter(ax, lineparameter, fomselect, compend1=compverts[0], compend2=compverts[1], lineparticks=numpy.linspace(0, 1, 5), ls='none', marker='.', color=c, label=l, ticklabelkwargdict=dict([('rotation', -20), ('horizontalalignment', 'left')]))
pylab.legend(loc=3)
pylab.ylabel('OER overpotential (mV)')
pylab.subplots_adjust(bottom=.15, left=.15, right=.8)
pylab.savefig(os.path.join(savefolder, 'AllCP.png'))
示例2:
# 需要导入模块: from myquaternaryutility import QuaternaryPlot [as 别名]
# 或者: from myquaternaryutility.QuaternaryPlot import plotfomalonglineparameter [as 别名]
if calctype==0:
selectinds, distfromlin, lineparameter=quatx.filterbydistancefromline(compsall[code0inds], compverts[0], compverts[1], critdist, betweenpoints=betweenbool, invlogic=invertbool, returnall=True)
lineparameter=lineparameter[selectinds]
elif calctype==1:
selectinds, distfromplane, xyparr, xyp_verts,intriangle=quatx.filterbydistancefromplane(compsall[code0inds], compverts[0], compverts[1], compverts[2], critdist, withintriangle=betweenbool, invlogic=invertbool, returnall=True)
xyparr=xyparr[selectinds]
fomselectx=fomall[code0inds][selectinds]
compsselectx=compsall[code0inds][selectinds]
xsecfig=pylab.figure()
xsecax=pylab.subplot(111)
if calctype==0:
quatx.line(compverts[0], compverts[1])
quatx.plotfomalonglineparameter(xsecax, lineparameter, fomselectx, compend1=compverts[0], compend2=compverts[1], lineparticks=numpy.linspace(0, 1, 4), ls='none', marker='.')
elif calctype==1:
quatx.plotfominselectedplane(xsecax, xyparr, fomselectx, xyp_verts=xyp_verts, vertcomps_labels=[compverts[0], compverts[1], compverts[2]], s=20, edgecolor='none', cmap=cmap, norm=norm)
quatx.line(compverts[0], compverts[1])
quatx.line(compverts[0], compverts[2])
quatx.line(compverts[2], compverts[1])
quatx.scatter(compsselectx, c=fomselectx, s=20, cmap=cmap, norm=norm, edgecolor='none')#vmin=vmin, vmax=vmax,
cb=quatxfig.colorbar(quatx.mappable, cax=cbax, extend=extend, cmap=cmap, norm=norm)
cb.set_label(fomlabel, fontsize=18)
quatx.set_projection(azim=view_azim, elev=view_elev)
if SYSTEM==1:
axbin.set_ylim(.23, .7)
if SYSTEM==6:
axbin.set_ylim(.38, .5)
示例3: quatsliceDialog
# 需要导入模块: from myquaternaryutility import QuaternaryPlot [as 别名]
# 或者: from myquaternaryutility.QuaternaryPlot import plotfomalonglineparameter [as 别名]
#.........这里部分代码省略.........
)
self.echem30_all.clearandplot(self.stackedternplotdict, cb=True, ellabels=reorderlabels)
print len(fomselect), " samples selected"
if len(fomselect) > 0:
self.stackedternplotdictselect = dict(
[
("comps", reordercompsselect),
("fom", fomselect),
("cmap", cmap),
("norm", norm),
("ellabels", reorderlabels),
("fomlabel", fomlabel),
("extend", extend),
]
)
self.echem30_select.clearandplot(self.stackedternplotdictselect, cb=True, ellabels=reorderlabels)
quat = QuaternaryPlot(self.plotw_quat.axes, ellabels=self.ellabels, offset=0)
quat.label()
quat.scatter(
compsselect, c=fomselect, s=s, cmap=cmap, norm=norm, edgecolor="none"
) # vmin=self.vmin, vmax=self.vmax,
cb = self.plotw_quat.fig.colorbar(
quat.mappable, cax=self.cbax_quat, extend=extend, format=autocolorbarformat((fom.min(), fom.max()))
)
cb.set_label(fomlabel, fontsize=18)
quat.set_projection(azim=azim, elev=elev)
if self.calctype == 0:
quat.line(self.compverts[0], self.compverts[1])
self.quatcalc.plotfomalonglineparameter(
self.plotw_tern.axes,
self.lineparameter,
fomselect,
compend1=self.compverts[0],
compend2=self.compverts[1],
lineparticks=numpy.linspace(0, 1, 4),
ls="none",
marker=".",
)
elif self.calctype == 1:
self.quatcalc.plotfominselectedplane(
self.plotw_tern.axes,
self.xyparr,
fomselect,
xyp_verts=self.xyp_verts,
vertcomps_labels=[self.compverts[0], self.compverts[1], self.compverts[2]],
s=20,
edgecolor="none",
cmap=cmap,
norm=norm,
)
quat.line(self.compverts[0], self.compverts[1])
quat.line(self.compverts[0], self.compverts[2])
quat.line(self.compverts[2], self.compverts[1])
cb = self.plotw_tern.fig.colorbar(
quat.mappable, cax=self.cbax_tern, extend=extend, format=autocolorbarformat((fom.min(), fom.max()))
)
cb.set_label(fomlabel, fontsize=18)
self.plotw_quat.axes.mouse_init()
self.plotw_quat.axes.set_axis_off()