The Wayback Machine - https://web.archive.org/web/20210831184341/https://github.com/matplotlib/matplotlib/issues/20797
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

macosx cursors break with images #20797

Open
QuLogic opened this issue Aug 5, 2021 · 5 comments
Open

macosx cursors break with images #20797

QuLogic opened this issue Aug 5, 2021 · 5 comments
Labels

Comments

@QuLogic
Copy link
Member

@QuLogic QuLogic commented Aug 5, 2021

@QuLogic, I just tested the macosx cursors a bit. It didn't have anything to do with this PR. Master is the same behavior as 3.4.2.

Somehow it has to do with the plotted mappable on the axes...

import matplotlib.pyplot as plt

fig, ax = plt.subplots()

ax.contourf([[0, 1], [2, 3]])  # cursor changes to the grab/zoom image
# ax.imshow([[0, 1], [2, 3]])  # cursor does not change

plt.show()

It works properly for contourf, but not for imshow/pcolormesh. The cursor works as expected for all mappables with qt5agg.

Originally posted by @greglucas in #20620 (comment)

@QuLogic QuLogic added the GUI/osx label Aug 5, 2021
@greglucas
Copy link
Contributor

@greglucas greglucas commented Aug 5, 2021

This works on v3.2.2, but not 3.3.0 and later. I'm not able to build 3.2.2 locally, so can't do a bisect to figure it out exactly. A quick diff of the _macosx.m file between those versions didn't yield anything immediately obvious to me either... Hopefully that helps someone else narrow down the issue.

@QuLogic
Copy link
Member Author

@QuLogic QuLogic commented Aug 6, 2021

Could it be related to the mouse tracking changes in #16992?

@dstansby
Copy link
Member

@dstansby dstansby commented Aug 25, 2021

This bisects to 1857fca from #17092 by @anntzer

@anntzer
Copy link
Contributor

@anntzer anntzer commented Aug 25, 2021

I guess trying to display a 2-line status message may make macosx unhappy? No other idea for now...

@dstansby
Copy link
Member

@dstansby dstansby commented Aug 26, 2021

I guess trying to display a 2-line status message may make macosx unhappy? No other idea for now...

Yep, this seems to be correct. Removing the newline here fixes the issue:

s = s + '\n' + data_str

I'm not sure what that means for fixing this though - I guess there's a bug somewhere in the macosx backend that needs fixing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants