def draw(self): self.figure.clear() # scatterplot data pmethods.getMethod(self.plot.plotType)(self.plot, self.figure, self.axes) # draw centers try: c = np.asarray(self.centers) self.plot.axes.plot(c[:, self.axes[0]], c[:, self.axes[1]],'o', ms=5, color='red') except IndexError: pass self.canvas.draw()
def drawSubplot(self, row, col, subplot): """ Issue the commands necessary for drawing a subplot on the current figure in the panel. @type row: int @param row: The number of rows in the subplot grid for the figure. @type col: int @param col: The number of columns in the subplot grid for the figure. @type subplot: Subplot @param subplot: The Subplot instance to draw on the figure. """ dims = (self.XAxisColumn, self.YAxisColumn) if subplot.linkedDimensions is not None: dims = subplot.linkedDimensions subplot.mnp = self.mnp(row, col, subplot.n) if subplot.Title == "": subplot.Title = subplot.DisplayName # Plot data using available methods in data.plot pmethods.getMethod(subplot.plotType)(subplot, self.figure, dims) subplot.drawFlag = False