def onPlot(self, event): frame = Plot(self, 'Plot time series or histogram data.', self.application.state, self.figureNumber) frame.Show() # Add to the dictionary. self.children[frame.GetId()] = frame