def generate_plot(self, filename, title='', xlabel='', ylabel=''):
data_keys = list(self.data.keys())
key_num = len(data_keys)
self.plot = plt.figure()
if key_num == 1:
splt = self.plot.add_subplot(1, 1, 1)
im_data = splt.imshow(numpy.flipud(self.data[data_keys[0]][0]), origin='lower')
splt.set_xlabel(xlabel)
splt.set_ylabel(ylabel)
splt.set_title(title)
else: ## still plotting multiple image in one figure still has problem. the visualization is not good
logger.error('no supported yet')
self.plot.colorbar(im_data)
self.plot.savefig(filename) #, bbox_inches='tight'
#class MultipleLinesPlot(PlotWithData):
# def generate_plot(self, filename, title='', xlabel='', ylabel=''):
评论列表
文章目录