def exportPlot(self):
# Combine to one
self.plot_output_file, filetype = QtWidgets.QFileDialog.getSaveFileName(self, "Export Plots To...", "", "PDF(*.pdf)")
if filetype == "PDF(*.pdf)":
pdf = matplotlib.backends.backend_pdf.PdfPages(self.plot_output_file)
for key in list(self.plot_file.keys()):
for i in range(1, len(self.plot_file[key])):
fig = plt.figure()
img = mpimg.imread(self.plot_file[key][i])
plt.imshow(img)
plt.axis('off')
pdf.savefig(fig)
plt.clf()
plt.close()
pdf.close()
sys.stdout.write("Output plot files to %s"%(self.plot_output_file))
self.exportPlot_flag = 1
BATS.py 文件源码
python
阅读 27
收藏 0
点赞 0
评论 0
评论列表
文章目录