Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit74977a8

Browse files
authored
Merge pull request#21996 from meeseeksmachine/auto-backport-of-pr-21990-on-v3.5.x
Backport PR#21990 on branch v3.5.x (Fix rubberbanding on wx+py3.10.)
2 parentsd912ccc +021e292 commit74977a8

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

‎lib/matplotlib/backends/backend_wx.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -618,7 +618,8 @@ def gui_repaint(self, drawDC=None, origin='WX'):
618618
elseself.bitmap)
619619
drawDC.DrawBitmap(bmp,0,0)
620620
ifself._rubberband_rectisnotNone:
621-
x0,y0,x1,y1=self._rubberband_rect
621+
# Some versions of wx+python don't support numpy.float64 here.
622+
x0,y0,x1,y1=map(int,self._rubberband_rect)
622623
drawDC.DrawLineList(
623624
[(x0,y0,x1,y0), (x1,y0,x1,y1),
624625
(x0,y0,x0,y1), (x0,y1,x1,y1)],

‎lib/matplotlib/tests/test_backends_interactive.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,8 @@ def check_alt_backend(alt_backend):
128128
"matplotlib.backends.backend_{}".format(backend))
129129

130130
ax.plot([0,1], [2,3])
131+
iffig.canvas.toolbar:# i.e toolbar2.
132+
fig.canvas.toolbar.draw_rubberband(None,1.,1,2.,2)
131133

132134
timer=fig.canvas.new_timer(1.)# Test floats casting to int as needed.
133135
timer.add_callback(FigureCanvasBase.key_press_event,fig.canvas,"q")

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp