Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0eded5c

Browse files
anntzerMeeseeksDev[bot]
authored and
MeeseeksDev[bot]
committed
Backport PR #10951: fix wx rubberband: correctly ensure x0<=x1
1 parent 8d0a342 commit 0eded5c

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
@@ -1664,7 +1664,7 @@ def draw_rubberband(self, event, x0, y0, x1, y1):
16641664

16651665
if y1 < y0:
16661666
y0, y1 = y1, y0
1667-
if x1 < y0:
1667+
if x1 < x0:
16681668
x0, x1 = x1, x0
16691669

16701670
w = x1 - x0
@@ -1799,7 +1799,7 @@ def draw_rubberband(self, x0, y0, x1, y1):
17991799

18001800
if y1 < y0:
18011801
y0, y1 = y1, y0
1802-
if x1 < y0:
1802+
if x1 < x0:
18031803
x0, x1 = x1, x0
18041804

18051805
w = x1 - x0

0 commit comments

Comments
 (0)