1
嗨我用下面的代碼來繪製我的圖。用戶可以選擇陣列文件。但問題是我的圖形標籤很難看清楚。圖matplot標籤重疊
fig = pl.figure(figsize=(8,5))
fig.canvas.set_window_title('Moment vs Field')
pl.xlabel('H (Oe)')
pl.ylabel('Normalized M (M/Ms)')
ax1 = fig.add_subplot(111) #Plot 1.1
p1,= ax1.plot(x2IP, ynewIP, '-', color='red', label = "1234")
ax1.set_xlim((getXNegIP*1.05),(getXPosIP*1.05)) #bottom for inplane
ax4 = ax1.twiny()
ax4.plot(x2IP2, ynewIP2,'-', color='red', label = "1234")
ax4.set_xlim((getXNegIP*1.05),(getXPosIP*1.05)) # top for oop
ax2 = ax1.twiny() #Plot 2.1
p2, = ax2.plot(x2OP, ynewOP,'-', color='black', label = "1234")
ax2.set_xlim((getXNegOP*1.05),(getXPosOP*1.05)) # top for oop
ax2 = ax1.twinx()
ax3 = ax1.twiny() # Plot 2.2
ax3.plot(x2OP2, ynewOP2,'-', color='black', label = "1234")
ax3.set_xlim((getXNegOP*1.05),(getXPosOP*1.05)) # top for oop
ax4.set_ylim(-1.2,1.2)
ax3.set_ylim(-1.2,1.2) #right for out plane
ax2.set_ylim(-1.2,1.2) #right for out plane
ax1.set_ylim(-1.2,1.2) # left for in plane
pl.legend((p1, p2), [FieldNameOnlyIP, FieldNameOnlyOP], loc='lower right', prop={'size':8})
titleName = "Interpolate " + WaferNameIP + ' ' + WaferNameOP + '\n\n'
font = { 'fontname':'Calibri', 'fontsize':14 }
matplotlib.pylab.title(titleName, **font)
saveFilename = interpolateRH
saveFilename += "/Int_" + WaferNameIP + ".png"
pl.savefig(saveFilename,bbox_inches="tight")
該標籤相互重疊,使其很難看到。我怎樣才能使它不會超過圈?