Skip to content

Commit adc0b93

Browse files
authored
Merge pull request #10951 from DietmarSchwertberger/wx-fix-rubberband
fix wx rubberband: correctly ensure x0<=x1
2 parents 7b30275 + 92537a1 commit adc0b93

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/matplotlib/backends/backend_wx.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1639,7 +1639,7 @@ def draw_rubberband(self, event, x0, y0, x1, y1):
16391639

16401640
if y1 < y0:
16411641
y0, y1 = y1, y0
1642-
if x1 < y0:
1642+
if x1 < x0:
16431643
x0, x1 = x1, x0
16441644

16451645
w = x1 - x0
@@ -1771,7 +1771,7 @@ def draw_rubberband(self, x0, y0, x1, y1):
17711771

17721772
if y1 < y0:
17731773
y0, y1 = y1, y0
1774-
if x1 < y0:
1774+
if x1 < x0:
17751775
x0, x1 = x1, x0
17761776

17771777
w = x1 - x0

0 commit comments

Comments
 (0)