Thanks to visit codestin.com
Credit goes to github.com

Skip to content

FIX: use process_event in dpi changes on macosx backend #23925

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

Merged
merged 1 commit into from
Sep 18, 2022

Conversation

greglucas
Copy link
Contributor

PR Summary

Avoids resize_event() deprecation notices that stem from switching dpis or starting with HiDPI. Likely missed while rebasing PR #16931, I tried looking for other potentially deprecated *_event()s hidden in the macos code and I didn't find any at a cursory glance.

closes #23921

PR Checklist

Tests and Styling

  • [N/A] Has pytest style unit tests (and pytest passes).
  • [N/A] Is Flake 8 compliant (install flake8-docstrings and run flake8 --docstring-convention=all).

Documentation

  • [N/A] New features are documented, with examples if plot related.
  • [N/A] New features have an entry in doc/users/next_whats_new/ (follow instructions in README.rst there).
  • [N/A] API changes documented in doc/api/next_api_changes/ (follow instructions in README.rst there).
  • [N/A] Documentation is sphinx and numpydoc compliant (the docs should build without error).

Avoids resize_event deprecation notices.
@greglucas greglucas added this to the v3.6.1 milestone Sep 17, 2022
Copy link
Member

@jklymak jklymak left a comment

Choose a reason for hiding this comment

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

This works on my machine. Thanks!

Note I didn't test on alternate dpi displays...

@greglucas
Copy link
Contributor Author

I did swap the figure between different DPI monitors and it worked as expected without deprecation warnings.

@tacaswell tacaswell merged commit 21493c5 into matplotlib:main Sep 18, 2022
@tacaswell
Copy link
Member

Also verified it worked locally.

Thank you for the very fast turn around @greglucas !

meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Sep 18, 2022
oscargus added a commit that referenced this pull request Sep 18, 2022
…925-on-v3.6.x

Backport PR #23925 on branch v3.6.x (FIX: use process_event in dpi changes on macosx backend)
@Emir-ATPC
Copy link

Hello I don't understand how to use this fix to avoid the error

@greglucas greglucas deleted the macosx-resize-event branch March 21, 2024 01:31
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.

[Bug]: resize_event deprecation warnings when creating figure on macOS with version 3.6.0
4 participants