fig = plt.figure("name") #最好取個名字, 以後可以在多個figure之間分換
ax0 = fig.add_subplot(221)
ax1 = fig.add_subplot(222, sharex=ax0)
ax2 = fig.add_subplot(223, sharex=ax0)
ax2 = fig.add_subplot(224, sharex=ax0, sharey=ax0)
如果有多個figure,只要在plot之前先指定 plot.figure("name") 即可,如下。
plot.figure("a")
plot.plot(x,y,'-')
plot.figure("b")
plot.plot(x,y,'v')
留言
張貼留言