def draw(self, clear=False, update=True): if clear: gr.clearws() gr.setwsviewport(0, self.mwidth, 0, self.mheight) gr.setwswindow(0, self.sizex, 0, self.sizey) for plot in self._lstPlot: plot.sizex, plot.sizey = self.sizex, self.sizey plot.drawGR() # logDomainCheck logXinDomain = plot.logXinDomain() logYinDomain = plot.logYinDomain() if logXinDomain != self._logXinDomain: self._logXinDomain = logXinDomain self.logXinDomain.emit(self._logXinDomain) if logYinDomain != self._logYinDomain: self._logYinDomain = logYinDomain self.logYinDomain.emit(self._logYinDomain) if self._pickEvent: event = self._pickEvent wcPoint = event.getWC(event.viewport) window = gr.inqwindow() gr.setwindow(*event.getWindow()) gr.setmarkertype(gr.MARKERTYPE_PLUS) gr.polymarker([wcPoint.x], [wcPoint.y]) gr.setwindow(*window)
def draw(self, clear=None, update=None): # obsolete kwargs clear, update (unused) just kept for compatibility GRWidget.draw(self, clear, update) gr.setwsviewport(0, self.mwidth, 0, self.mheight) gr.setwswindow(0, self.sizex, 0, self.sizey) for plot in self._lstPlot: plot.sizex, plot.sizey = self.sizex, self.sizey plot.drawGR() # logDomainCheck logXinDomain = plot.logXinDomain() logYinDomain = plot.logYinDomain() if logXinDomain != self._logXinDomain: self._logXinDomain = logXinDomain self.logXinDomain.emit(self._logXinDomain) if logYinDomain != self._logYinDomain: self._logYinDomain = logYinDomain self.logYinDomain.emit(self._logYinDomain) if self._pickEvent: event = self._pickEvent gr.setviewport(*event.viewportscaled) wcPoint = event.getWC(event.viewport) window = gr.inqwindow() gr.setwindow(*event.getWindow()) gr.setmarkertype(gr.MARKERTYPE_PLUS) gr.polymarker([wcPoint.x], [wcPoint.y]) gr.setwindow(*window)
def draw(self, clear=None, update=None): # obsolete kwargs clear, update (unused) just kept for compatibility GRWidget.draw(self, clear, update) gr.setwsviewport(0, self.mwidth, 0, self.mheight) gr.setwswindow(0, self.sizex, 0, self.sizey) for plot in self._lstPlot: plot.sizex, plot.sizey = self.sizex, self.sizey plot.drawGR() # logDomainCheck logXinDomain = plot.logXinDomain() logYinDomain = plot.logYinDomain() if logXinDomain != self._logXinDomain: self._logXinDomain = logXinDomain self.logXinDomain.emit(self._logXinDomain) if logYinDomain != self._logYinDomain: self._logYinDomain = logYinDomain self.logYinDomain.emit(self._logYinDomain) if self._pickEvent: event = self._pickEvent gr.setviewport(*event.viewport) wcPoint = event.getWC(event.viewport) window = gr.inqwindow() gr.setwindow(*event.getWindow()) gr.setmarkertype(gr.MARKERTYPE_PLUS) gr.polymarker([wcPoint.x], [wcPoint.y]) gr.setwindow(*window)
def draw(self, clear=False, update=True): if clear: gr.clearws() gr.setwsviewport(0, self.mwidth, 0, self.mheight) gr.setwswindow(0, self.sizex, 0, self.sizey) for plot in self._lstPlot: plot.sizex, plot.sizey = self.sizex, self.sizey plot.drawGR() # logDomainCheck logXinDomain = plot.logXinDomain() logYinDomain = plot.logYinDomain() if logXinDomain != self._logXinDomain: self._logXinDomain = logXinDomain self.logXinDomain.emit(self._logXinDomain) if logYinDomain != self._logYinDomain: self._logYinDomain = logYinDomain self.logYinDomain.emit(self._logYinDomain) if self._pickEvent: event = self._pickEvent gr.setviewport(*event.viewport) wcPoint = event.getWC(event.viewport) window = gr.inqwindow() gr.setwindow(*event.getWindow()) gr.setmarkertype(gr.MARKERTYPE_PLUS) gr.polymarker([wcPoint.x], [wcPoint.y]) gr.setwindow(*window)