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


Python QuaternaryPlot.plotfomalonglineparameter方法代碼示例

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

開發者ID:johnmgregoire,項目名稱:JCAPdatavis,代碼行數:31,代碼來源:plot_combinedfom_selectsamples.py

示例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)
開發者ID:johnmgregoire,項目名稱:JCAPdatavis,代碼行數:32,代碼來源:echem_stacked_tern4.py

示例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()
開發者ID:johnmgregoire,項目名稱:JCAPdatavis,代碼行數:70,代碼來源:echem_compslices_ui.py


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