Python - Organisation von 3 Geschichten mit matplotlib

Ich versuche zu generieren, die 3 subplots für meine Figur. Es scheint Arbeit, aber es ist nicht perfekt ausgerichtet. Wie haben die gleiche Breite zwischen der Abbildung auf der Unterseite et Figuren unten?

plt.close()
fig = plt.figure()

ax1 = plt.subplot(211)
ax1.plot(cycles,np.asarray(df_int),'wo',label='')
ax1.plot(cycles,np.asarray(df_proj),'k+',label='')
ax1.legend(loc=2)
#ax1.subplots_adjust(left=0.15)
ax1.set_ylim(0.001,0.004)

ax2 = plt.subplot(223)
i2=ax2.imshow(c,cmap=plt.cm.hot, vmin=-5, vmax=5);#plt.colorbar();plt.clim(-5,5)
cb2=plt.colorbar(i2,ax=ax2,ticks=[-5,0,5],fraction=0.046, pad=0.04,format='%.2f')
cb2.ax.tick_params(labelsize=12)



ax3 = plt.subplot(224)
i3=ax3.imshow(residue_proj,cmap=plt.cm.hot, vmin=-5, vmax=5);#plt.colorbar();plt.clim(-5,5);
cb3=plt.colorbar(i3,ax=ax3,ticks=[-5,0,5],fraction=0.046, pad=0.04,format='%.2f')
cb3.ax.tick_params(labelsize=12)

plt.savefig('test.png', dpi=500,  bbox_inches='tight', pad_inches=0.1)
#plt.show()

Python - Organisation von 3 Geschichten mit matplotlib

InformationsquelleAutor user3601754 | 2016-05-21
Schreibe einen Kommentar