rhod_ef=[1.65, 2.04, 2.80, 3.58, 4.23, 4.78, 4.78, 5.19].reverse() rho_ef=[31.65, 33.14, 36.60, 33.86, 25.20, 20.37, 16.55, 16.74]; sf=6.75/8; ed=[-2.44, -2.60, -2.74, -2.84, -3.00, -3.12, -3.18, -3.16]; dw=[9.11, 9.70, 10.47, 11.10, 12.14, 12.84, 13.21, 13.03]; p=GracePlot() #p.SetView(0.15,0.15,0.9,1.1) #set(gcf,'Units','inches','Position',[1 1 6.75 4],'PaperPositionMode','auto','PaperSize',[6.75 4]) d1=Data(ed,map(lambda x:sqrt(x), dw), symbol=Symbol(symbol=circle,fillcolor=orange,size=1.4), line=Line(linestyle=0), legend='data') fit=Data([-3.2,-2.6],[-1.*-3.2+0.5,-1.*-2.6+0.5], line=Line(linestyle=1,color=black,linewidth=4), legend='y=0.5-x') p.plot(d1,fit) p.xaxis(-3.3,-2.5) p.yaxis(3,3.7) p.xlabel('d-band center (eV)') #p.ylabel("""\\x\\c\\z{1.4}V\\m{1}\\z{0.9}\\v{0.75}>>>>>\\N\\C\\f{}\M{1}d-band width""") p.ylabel("""rms d-band width""") # #p.text(x=-2.6,y=3.65,string='(a.)',charsize=1.4,font=2) p.save('figure2a_talk.png')
p=GracePlot(6,4) #p.SetView(.15,.15,.9,1.1) hdata=Data(ed,dissH_H,symbol=Symbol(symbol=circle,fillcolor=red,size=1.4), line=Line(linestyle=0), legend='H\s2') odata=Data(ed,dissH_O_450,symbol=Symbol(symbol=square,fillcolor=orange,size=1.4), line=Line(linestyle=0), legend='O\s2') zero=Data([-3.2,-2.4],[0,0], symbol=Symbol(symbol=0), line=Line(color=black)) p.plot(hdata,odata,zero) p.xaxis(-3.2,-2.4) p.yaxis(-2,1) p.legend(x=-2.6,y=0.7,font=2,charsize=1.3) p.xlabel('d-band center (eV)') p.ylabel('dissociative adsorption energy (eV)') p._send('xaxis tick place normal') p._send('altxaxis on') p._send('altxaxis ticklabel font 2') p._send('altxaxis ticklabel char size 1.4')
#!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!# ##################################################################### ##################################################################### # Acquisition ##################################################################### # Open a Grace session (leave open) p = GracePlot() # Labels, axes properties, line/symbol properties for Grace plot p.title("All your resonance are belong to us") p.xaxis( label=Label("Frequency (Hz)", font=5, charsize=1.5), tick=Tick( majorgrid=on, majorlinestyle=dashed, majorcolor=blue, minorgrid=off, minorlinestyle=dotted, minorcolor=blue ), ) p.yaxis( label=Label("Power", font=5, charsize=1.5), tick=Tick( majorgrid=on, majorlinestyle=dashed, majorcolor=blue, minorgrid=off, minorlinestyle=dotted, minorcolor=blue ), ) s1 = Symbol(symbol=diamond, size=0.3, fillcolor=red) l1 = Line(type=solid) # Remember, the total frequency sweep range is being divided # into nPieces subranges, we need to calculate the subrange size: freqSubrangeSize = (stopFreq - startFreq) / nPieces