Title: [Bug]: Figure size change on macos in matplotlib 3.11.0 macosx backend · Issue #31936 · matplotlib/matplotlib · GitHub
Open Graph Title: [Bug]: Figure size change on macos in matplotlib 3.11.0 macosx backend · Issue #31936 · matplotlib/matplotlib
X Title: [Bug]: Figure size change on macos in matplotlib 3.11.0 macosx backend · Issue #31936 · matplotlib/matplotlib
Description: Bug summary Two ways of generating a matplotlib plot in our package started producing images with slightly different dimensions since the 3.11.0 release, using the macosx backend. Switching to the agg backend makes the problem disappear....
Open Graph Description: Bug summary Two ways of generating a matplotlib plot in our package started producing images with slightly different dimensions since the 3.11.0 release, using the macosx backend. Switching to the ...
X Description: Bug summary Two ways of generating a matplotlib plot in our package started producing images with slightly different dimensions since the 3.11.0 release, using the macosx backend. Switching to the ...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/31936
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Bug]: Figure size change on macos in matplotlib 3.11.0 macosx backend","articleBody":"### Bug summary\n\nTwo ways of generating a matplotlib plot in our package started producing images with slightly different dimensions since the 3.11.0 release, using the macosx backend. Switching to the agg backend makes the problem disappear.\n\nI know I can't provide an actual MWE since I don't own a mac device, but maybe someone has an idea what is happening based on the diff image?\n\n\n\n### Code for reproduction\n\n```Python\nN/A\n```\n\n### Actual outcome\n\n\u003cimg width=\"1620\" height=\"1014\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/0125a769-5270-42ac-91f6-7061d31066e2\" /\u003e\n\n\u003cimg width=\"1620\" height=\"1016\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/9eb7f65d-4254-4b63-88e9-ed36c7d294e1\" /\u003e\n\n\u003cimg width=\"1620\" height=\"1014\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/33c339c0-f747-463d-9536-8502cf4c5a8f\" /\u003e\n\n### Expected outcome\n\nWe expect the two images to be the same.\n\n### Additional information\n\nSince the 3.11 release, the CI pipelines for our scientific python package have been failing for the macos builds only. Our testsuite fails on some image comparison tests, that checks if two different ways to create a plot result in the same outcome. These tests used to pass for a long time, across multiple matplotlib versions. They still pass in our linux pipelines. But after the 3.11 release, they started failing on macos, because the vertical image dimensions differ by 2 pixels. I also compared the resulting images and there are also tiny differences in the rendering.\n\nYou can see the output log here at the bottom: https://gitlab.com/ifosim/finesse/finesse3/-/jobs/14970136713\n\n### Operating system\n\nOS/X\n\n### Matplotlib Version\n\n3.11.0\n\n### Matplotlib Backend\n\nmacosx\n\n### Python version\n\n3.11 till 3.14\n\n### Jupyter version\n\n_No response_\n\n### Installation\n\nconda","author":{"url":"https://github.com/mironleon","@type":"Person","name":"mironleon"},"datePublished":"2026-06-22T13:03:11.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":6},"url":"https://github.com/31936/matplotlib/issues/31936"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:cc352dae-d956-4543-0db0-df95aeae37b3 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8352:3A69D:1350560:1A1D72A:6A557AA7 |
| html-safe-nonce | 53c11ee1ecd50bfc80b6ffe14fb133fe5f32edcff60fe4f0bb52357928eb3dca |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MzUyOjNBNjlEOjEzNTA1NjA6MUExRDcyQTo2QTU1N0FBNyIsInZpc2l0b3JfaWQiOiIyMTg0Mjg4MzAyNTgwMjAyMTUxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | db3f3f9dc421ba39898e248751d1044da05b83c8d97c133b83ab38277841e8ef |
| hovercard-subject-tag | issue:4716857002 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/matplotlib/matplotlib/31936/issue_layout |
| twitter:image | https://opengraph.githubassets.com/9df9540b5acf9f0ede36f58ef489f18103bf3a3f491cc7ecc0580df68fa3e406/matplotlib/matplotlib/issues/31936 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/9df9540b5acf9f0ede36f58ef489f18103bf3a3f491cc7ecc0580df68fa3e406/matplotlib/matplotlib/issues/31936 |
| og:image:alt | Bug summary Two ways of generating a matplotlib plot in our package started producing images with slightly different dimensions since the 3.11.0 release, using the macosx backend. Switching to the ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mironleon |
| hostname | github.com |
| expected-hostname | github.com |
| None | b5665c84831ed9ac4fb79519c16c9c5580ba8092fb8bb6e3e72972ec7197348e |
| turbo-cache-control | no-preview |
| go-import | github.com/matplotlib/matplotlib git https://github.com/matplotlib/matplotlib.git |
| octolytics-dimension-user_id | 215947 |
| octolytics-dimension-user_login | matplotlib |
| octolytics-dimension-repository_id | 1385122 |
| octolytics-dimension-repository_nwo | matplotlib/matplotlib |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1385122 |
| octolytics-dimension-repository_network_root_nwo | matplotlib/matplotlib |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 617ea94e2807dc3052601c560530bb3f8259bc9a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width