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

Commit853312b

Browse files
authored
Merge pull request#22857 from anntzer/tztw
Slightly simplify twin axes detection in MEP22 zoom.
2 parents16f6370 +339c630 commit853312b

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

‎lib/matplotlib/backend_tools.py

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -821,7 +821,7 @@ def _release(self, event):
821821
self._cancel_action()
822822
return
823823

824-
last_a= []
824+
done_ax= []
825825

826826
forcur_xypressinself._xypress:
827827
x,y=event.x,event.y
@@ -832,14 +832,9 @@ def _release(self, event):
832832
return
833833

834834
# detect twinx, twiny axes and avoid double zooming
835-
twinx,twiny=False,False
836-
iflast_a:
837-
forlainlast_a:
838-
ifa.get_shared_x_axes().joined(a,la):
839-
twinx=True
840-
ifa.get_shared_y_axes().joined(a,la):
841-
twiny=True
842-
last_a.append(a)
835+
twinx=any(a.get_shared_x_axes().joined(a,a1)fora1indone_ax)
836+
twiny=any(a.get_shared_y_axes().joined(a,a1)fora1indone_ax)
837+
done_ax.append(a)
843838

844839
ifself._button_pressed==1:
845840
direction='in'

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp