def addFig(self,fid,figdata): newfig=FigurePlot(self) newfig.fid=str(fid) newfig.data_load(figdata) newfig.bar_plot() newfig.setGeometry(130,100,450,250) self.figbox[newfig.fid]=newfig self.activeFig(newfig.fid)
def __init__(self,parent=None): super(FigMana,self).__init__(parent) self.parent=parent self.setGeometry( 0.214*self.parent.width(), 0.214*self.parent.height(), 0.786*self.parent.width(), 0.786*self.parent.height() ) self.figbox={} self.active_fig=FigurePlot(self) self.active_fig.hide()
class FigMana(QtWidgets.QWidget): def __init__(self,parent=None): super(FigMana,self).__init__(parent) self.parent=parent self.setGeometry( 0.214*self.parent.width(), 0.214*self.parent.height(), 0.786*self.parent.width(), 0.786*self.parent.height() ) self.figbox={} self.active_fig=FigurePlot(self) self.active_fig.hide() def addFig(self,fid,figdata): newfig=FigurePlot(self) newfig.fid=str(fid) newfig.data_load(figdata) newfig.bar_plot() newfig.setGeometry(130,100,450,250) self.figbox[newfig.fid]=newfig self.activeFig(newfig.fid) def activeFig(self,actid): try : self.active_fig.hide() except : pass #print('active',self.active_fig.data) self.active_fig=self.figbox[actid] self.active_fig.show() def plotBar(self): self.active_fig.bar_plot() def plotPlot(self): self.active_fig.plot_plot() def plotScar(self): self.active_fig.scartter_plot() '''def displayUpdate(self):