FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Mention keyboard modifiers in toolbar tooltip texts. by anntzer · Pull Request #17687 · matplotlib/matplotlib · GitHub

Repository navigation

Mention keyboard modifiers in toolbar tooltip texts. - #17687

Merged
jklymak merged 2 commits into
matplotlib:masterfrom
anntzer:tooltipkey
Jun 20, 2020
Merged

jklymak merged 2 commits into
matplotlib:masterfrom
anntzer:tooltipkey

Conversation

anntzer commented Jun 19, 2020 •
edited
Loading

Copy link
Copy Markdown
Contributor

Otherwise the feature is a bit obscure... Closes #17658.
(The newline in the tooltip works at least with qt/wx/tk/gtk (but wx needs #17686 too), can't test macos locally.)

PR Summary

PR Checklist

  • Has Pytest style unit tests
  • Code is Flake 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

Otherwise the feature is a bit obscure...

jklymak commented Jun 19, 2020

Copy link
Copy Markdown
Member

I love this feature, and didn't know it existed. But, ugh, you sure don't want to use those modifiers in a Jupiter notebook. x cuts the current cell, even clearly using the plot GUI. Not even sure where to report that or what to do about it, other than change my rcParam...

jklymak left a comment •
edited
Loading

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

tooltip doesn't change for macosx... I think it also has to change in _macosx.m (line 1161)

anntzer commented Jun 19, 2020

Copy link
Copy Markdown
Contributor Author

Let's see whether I can manage to make the osx backend also use the tooltips from the base class...

jklymak commented Jun 19, 2020

Copy link
Copy Markdown
Member

I don't think so:

  File "testSimple.py", line 5, in <module>
    fig, ax = plt.subplots()
  File "/Users/jklymak/matplotlib/lib/matplotlib/cbook/deprecation.py", line 450, in wrapper
    return func(*args, **kwargs)
  File "/Users/jklymak/matplotlib/lib/matplotlib/pyplot.py", line 1270, in subplots
    fig = figure(**fig_kw)
  File "/Users/jklymak/matplotlib/lib/matplotlib/pyplot.py", line 670, in figure
    figManager = new_figure_manager(num, figsize=figsize,
  File "/Users/jklymak/matplotlib/lib/matplotlib/pyplot.py", line 298, in new_figure_manager
    return _backend_mod.new_figure_manager(*args, **kwargs)
  File "/Users/jklymak/matplotlib/lib/matplotlib/backend_bases.py", line 3483, in new_figure_manager
    return cls.new_figure_manager_given_figure(num, fig)
  File "/Users/jklymak/matplotlib/lib/matplotlib/backend_bases.py", line 3489, in new_figure_manager_given_figure
    manager = cls.FigureManager(canvas, num)
  File "/Users/jklymak/matplotlib/lib/matplotlib/backends/backend_macosx.py", line 98, in __init__
    self.toolbar = NavigationToolbar2Mac(canvas)
  File "/Users/jklymak/matplotlib/lib/matplotlib/backends/backend_macosx.py", line 120, in __init__
    tuple(str(data_path / image_name) + ".pdf"
  File "/Users/jklymak/matplotlib/lib/matplotlib/backends/backend_macosx.py", line 120, in <genexpr>
    tuple(str(data_path / image_name) + ".pdf"
TypeError: unsupported operand type(s) for /: 'PosixPath' and 'NoneType'

anntzer commented Jun 19, 2020

Copy link
Copy Markdown
Contributor Author

Well I can't actually test macosx code locally, I was just going to abuse CI (which does test instantiating a macosx window) to iterate until either it works or I give up...

jklymak commented Jun 19, 2020

Copy link
Copy Markdown
Member

ha ha. New version segfaults.

anntzer commented Jun 19, 2020

Copy link
Copy Markdown
Contributor Author

Did you recompile? CI seems happy. (I would be amazed to have been able to write the extension code right on the first try, though...)

jklymak commented Jun 19, 2020

Copy link
Copy Markdown
Member

Yes, I did recompile after cleaning out the build directory. Not sure what is wrong.

jklymak commented Jun 19, 2020

Copy link
Copy Markdown
Member

Travis seg faults as well...

anntzer commented Jun 20, 2020 •
edited
Loading

Copy link
Copy Markdown
Contributor Author

Yup, missed a change... looks like travis is happy now (for real).

jklymak commented Jun 20, 2020

Copy link
Copy Markdown
Member

Works!

jklymak merged commit 193b8f6 into matplotlib:master Jun 20, 2020
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Jun 20, 2020
anntzer deleted the tooltipkey branch June 20, 2020 16:04
jklymak added a commit that referenced this pull request Jun 20, 2020
…687-on-v3.3.x

Backport PR #17687 on branch v3.3.x (Mention keyboard modifiers in toolbar tooltip texts.)
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature request: Add advanced zoom and inspect feature to GUI for more productivity

3 participants


Back | FazBrowse Home | New Git URL