GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||
GeezerVison is showing github.com — Fix twin axes ignoring navigation opt-outs (#32528) by NaumanRafay · Pull Request #32544 · matplotlib/matplotlib ConversationSummaryFixes #32528 Twin axes (created via Root causeIn axes_to_trigger.extend(ax._twinned_axes.get_siblings(ax)) This meant a twin could still be triggered even if it had FixPass twin siblings through the existing axes_to_trigger.extend( filter(_ax_filter, ax._twinned_axes.get_siblings(ax))) This is a minimal, single-line change, no other logic in the function Testing
Reproduction (from the original issue)import matplotlib.pyplot as plt import numpy as np t = np.linspace(0.0, 10.0, 600) y = np.linspace(0.0, 1.0, 200) z = np.exp(-(y[:, None] - 0.5 - 0.3 * np.sin(t)) ** 2 / (2 * 0.04 ** 2)) fig, ax = plt.subplots() ax2 = ax.twinx() ax2.imshow(z, extent=[t[0], t[-1], 0.0, 1.0], aspect="auto") ax2.patch.set_visible(False) ax.set_zorder(ax2.get_zorder() + 1) ax.patch.set_visible(False) ax.plot(t, np.exp(-t / 6.0) - np.exp(-t), color="C0") ax2.set_navigate(False) ax.set_forward_navigation_events(False) plt.show() Before this fix, dragging a zoom rectangle would zoom both the image
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsTwin-axes siblings were added to the navigation trigger list via get_siblings() without being checked against the same predicate (_ax_filter) already applied to the primary axes. This caused twins with set_navigate(False), an unsupported can_<method>(), or an out-of-bounds event to still be triggered during pan/zoom. Fixes matplotlib#32528
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Contributor
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. This branch has not been deployedNo deployments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ReviewersNo reviewsUh oh!
There was an error while loading. Please reload this page. AssigneesNo one assignedProjectsMilestoneNo milestoneDevelopmentSuccessfully merging this pull request may close these issues. [Bug]: twin axes ignore the navigation opt-outsUh oh!
There was an error while loading. Please reload this page. Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later. | ||||
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |