没关系,有办法做到这一点。
def plotGraph(X,Y): fignum = random.randint(0,sys.maxint) fig = plt.figure(fignum) ### Plotting arrangements ### return fig
------绘图模块------
----- mainModule ----
import matplotlib.pyplot as plt ### tempDLStats, tempDLlabels are the argument plot1 = plotGraph(tempDLstats, tempDLlabels) plot2 = plotGraph(tempDLstats_1, tempDLlabels_1) plot3 = plotGraph(tempDLstats_2, tempDLlabels_2) plt.show() plot1.savefig('plot1.png') plot2.savefig('plot2.png') plot3.savefig('plot3.png')
----- mainModule -----
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)