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

Skip to content

Always set device pixel ratio on WebSocket open in WebAgg - #32149

Merged
ianthomas23 merged 1 commit into
matplotlib:mainfrom
johnwduggan:main
Jul 31, 2026
Merged

Always set device pixel ratio on WebSocket open in WebAgg#32149
ianthomas23 merged 1 commit into
matplotlib:mainfrom
johnwduggan:main

Conversation

@johnwduggan

Copy link
Copy Markdown
Contributor

PR summary

@ianthomas23 here is the fix for the issue I opened yesterday. It shouldn't be harmful or expensive to send a message with a device pixel ratio of 1, so I've removed the conditional restricting when the message is sent.

Closes #32144

AI Disclosure

No use of generative AI.

PR quality check

  • Use an expressive title, e.g. "Fix title font property precedence"
  • New and changed code is tested
  • [N/A] Plotting related features are demonstrated in an example
  • [N/A] New features and API changes have release notes
  • [N/A] Documentation complies with general and docstring guidelines

@github-actions

Copy link
Copy Markdown

Thank you for opening your first PR into Matplotlib!

If you have not heard from us in a week or so, please leave a new comment below and that should bring it to our attention. Most of our reviewers are volunteers and sometimes things fall through the cracks. We also ask that you please finish addressing any review comments on this PR and wait for it to be merged (or closed) before opening a new one, as it can be a valuable learning experience to go through the review process.

You can also join us on discourse chat for real-time discussion.

For details on testing, writing docs, and our review process, please see the developer guide.
Please let us know if (and how) you use AI, it will help us give you better feedback on your PR.

We strive to be a welcoming and open project. Please follow our Code of Conduct.

@ianthomas23

Copy link
Copy Markdown
Member

@evilkermit Thanks for finding and fixing this.

@ianthomas23
ianthomas23 merged commit 4f74610 into matplotlib:main Jul 31, 2026
41 checks passed
@QuLogic

QuLogic commented Jul 31, 2026

Copy link
Copy Markdown
Member

@meeseeksdev backport to v3.11.x

@QuLogic QuLogic added this to the v3.11.2 milestone Jul 31, 2026
QuLogic pushed a commit that referenced this pull request Jul 31, 2026
QuLogic added a commit that referenced this pull request Jul 31, 2026
…149-on-v3.11.x

Backport PR #32149 on branch v3.11.x (Always set device pixel ratio on WebSocket open in WebAgg)
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]: WebAgg figures can become permanently broken on displays with device pixel ratio of 1

4 participants