0
我想以此爲榜樣,使插曲網格:matplotlib插曲網格創建兩個不同的畫布,而不是一個
http://matplotlib.org/examples/pylab_examples/line_styles.html
,但我的代碼的關係圖的兩排在兩個不同的拉票而不是在一個畫布上(圖像是正確的)。有誰明白爲什麼?
這是我的代碼的摘錄:
alphas = [45, 75]
numalp = len(alphas)
angles = np.linspace(pi/12, pi/2, num=10)
numobs = len(angles)
axisNum = 0
for a in alphas:
#[some operations]
for obsangl in angles:
#[some operations]
axisNum += 1
axii = plt.subplot(numalp, numobs, axisNum)
plt.errorbar(g, Pgamma, yerr = ePgamma, color = 'green', fmt = '.')
axii1 = axii.twinx()
plt.plot(g, lightcurva, 'b-')
axii.set_yticklabels([])
axii.set_xticklabels([])
axii1.set_yticklabels([])
axii1.set_xticklabels([])