Move logx, logy, logc, color-autoscale buttons from toolbar to axes#572
Draft
nvaytet wants to merge 18 commits into
Draft
Move logx, logy, logc, color-autoscale buttons from toolbar to axes#572nvaytet wants to merge 18 commits into
nvaytet wants to merge 18 commits into
Conversation
…g-buttons-per-axis
nvaytet
commented
Jun 11, 2026
| xlabel: str | None = None, | ||
| ylabel: str | None = None, | ||
| norm: Literal['linear', 'log'] | None = None, | ||
| autoscale_axes: Callable | None = None, |
Member
Author
There was a problem hiding this comment.
The View is the one who knows how to properly autoscale the axes because it holds the references to the plotted artists. But the canvas need to call autoscale when the log buttons are clicked. So we pass the callback to the canvas here.
Not the most elegant design but it was the least invasive I could come up with.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The logx, logy, log and color-autoscale buttons in the toolbar are designed to act on one axes.
The Home, Pan, Zoom, and Save buttons act on all axes in a subplot.
It was ambiguous what to do with the toolbar buttons when subplots/user-supplied axes/tiled were used.
We now move them to being on the axes themselves, appearing upon hover.
1d plot:

2d plot:


3d plot:

Note: for 3d plots we replaced the
ipywidgets.Imagewidget with a customAnywidgetbecause the former does not handle hover or click events.