Skip to content

Commit 2d80fda

Browse files
committed
Fixed bug from Qwt6: QwtPlotCurve orientation was inverted (horizontal <--> vertical)
1 parent 316bfec commit 2d80fda

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

qwt/plot_curve.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -637,9 +637,9 @@ def drawSticks(self, painter, xMap, yMap, canvasRect, from_, to):
637637
xi = round(xi)
638638
yi = round(yi)
639639
if o == Qt.Horizontal:
640-
QwtPainter.drawLine(painter, x0, yi, xi, yi)
641-
else:
642640
QwtPainter.drawLine(painter, xi, y0, xi, yi)
641+
else:
642+
QwtPainter.drawLine(painter, x0, yi, xi, yi)
643643
painter.restore()
644644

645645
def drawDots(self, painter, xMap, yMap, canvasRect, from_, to):
@@ -814,7 +814,7 @@ def closePolyline(self, painter, xMap, yMap, polygon):
814814
return
815815
doAlign = QwtPainter.roundingAlignment(painter)
816816
baseline = self.__data.baseline
817-
if self.orientation() == Qt.Vertical:
817+
if self.orientation() == Qt.Horizontal:
818818
if yMap.transformation():
819819
baseline = yMap.transformation().bounded(baseline)
820820
refY = yMap.transform(baseline)

0 commit comments

Comments
 (0)