這一篇講的比較詳細.
http://matplotlib.org/examples/pylab_examples/subplots_demo.html
官方文檔給出的subplots用法,
http://matplotlib.org/api/pyplot_api.html
其中設置子圖大小, 參數參見下面代碼
import matplotlib.pyplot as plt tPlot, axes = plt.subplots( nrows=4, ncols=1, sharex=True, sharey=False, gridspec_kw={'height_ratios':[2,2,1,1]} ) tPlot.suptitle('node', fontsize=20) axes[0].plot(range(10),'ro-') axes[1].plot(range(10),'bo-') axes[2].plot(range(10),'go-') axes[3].plot(range(10),'mo-') plt.show()