我正在用PyQt编写一个应用程序,其中我用matplotlib显示一些图形。为此,我使用以下代码:
from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg
import matplotlib.figure as fig
self.IntFig = fig.Figure()
self.IntBeamCanvas = FigureCanvasQTAgg(self.IntFig)
self.AxesIntInit = self.IntFig.add_subplot(111)
self.AxesIntInit.hold(False)
self.AxesIntInit.imshow(self.Int,extent =[-xx/2+xx/N,xx/2,-xx/2+xx/N,xx/2])
self.IntBeamCanvas.draw()
在后面的代码中,我设法保存使用以下代码创建的地物:
^{pr2}$但这只保存了数字(我的意思是用它的轴)。如果我只想保存数据呢
self.Int
显示了什么?我知道pyplot.imsave方法,但不知道如何在这里使用它,因为我不使用pyplot但是图。图. 在
有人有主意吗?在
您可以通过以下方法保存图像:
保存的图像:
相关问题 更多 >
编程相关推荐