Skip to content

Commit 58d922f

Browse files
committed
Only scroll-to-zoom on rectilinear Axes
1 parent e8c99e5 commit 58d922f

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

doc/release/next_whats_new/scroll_to_zoom.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,5 @@ aspect ratio of the axes.
77

88
There is no effect if no manipulation tool is selected. This is intentional to
99
keep a state in which accidental manipulation of the plot is avoided.
10+
11+
Zooming is currently only supported on rectilinear Axes.

lib/matplotlib/backend_bases.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2578,6 +2578,9 @@ def scroll_handler(event, canvas=None, toolbar=None):
25782578
ax = event.inaxes
25792579
if ax is None:
25802580
return
2581+
if ax.name != "rectilinear":
2582+
# zooming is currently only supported on rectilinear axes
2583+
return
25812584

25822585
if toolbar is None:
25832586
if canvas is None:

0 commit comments

Comments
 (0)