def METHOD_NAME(self, qp: QtGui.QPainter):
    if not (self.data or self.reference):
        return
    self.draw_data(qp, Chart.color.sweep, self.data)
    fstart = self.data[0].freq if self.data else 0
    fstop = self.data[-1].freq if self.data else 0
    self.draw_data(qp, Chart.color.reference, self.reference, fstart, fstop)
    for m in self.markers:
        if m.location != -1 and m.location < len(self.data):
            x = self.getXPosition(self.data[m.location])
            y = int(
                self.height() // 2
                - self.data[m.location].im * self.dim.height // 2
            )
            self.drawMarker(x, y, qp, m.color, self.markers.index(m) + 1)