Title: [Bug]: dpi='figure' option no longer working in ``savefig`` · Issue #26252 · matplotlib/matplotlib · GitHub
Open Graph Title: [Bug]: dpi='figure' option no longer working in ``savefig`` · Issue #26252 · matplotlib/matplotlib
X Title: [Bug]: dpi='figure' option no longer working in ``savefig`` · Issue #26252 · matplotlib/matplotlib
Description: Bug summary The default dpi='figure' option in savefig no longer appears to work correctly - instead the DPI is a fixed value. Code for reproduction import matplotlib.pyplot as plt fig = plt.figure() fig.set_dpi(10) ax = fig.add_subplot(...
Open Graph Description: Bug summary The default dpi='figure' option in savefig no longer appears to work correctly - instead the DPI is a fixed value. Code for reproduction import matplotlib.pyplot as plt fig = plt.figure...
X Description: Bug summary The default dpi='figure' option in savefig no longer appears to work correctly - instead the DPI is a fixed value. Code for reproduction import matplotlib.pyplot as plt fig = pl...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/26252
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Bug]: dpi='figure' option no longer working in ``savefig``","articleBody":"### Bug summary\n\nThe default ``dpi='figure'`` option in ``savefig`` no longer appears to work correctly - instead the DPI is a fixed value.\n\n### Code for reproduction\n\n```python\nimport matplotlib.pyplot as plt\r\n\r\nfig = plt.figure()\r\nfig.set_dpi(10)\r\nax = fig.add_subplot(1, 1, 1)\r\nfig.savefig(\"test_dpi.png\", dpi=\"figure\")\n```\n\n\n### Actual outcome\n\nA 100 DPI figure:\r\n\r\n\r\n\n\n### Expected outcome\n\nA 10 DPI figure:\r\n\r\n\r\n\n\n### Additional information\n\nI bisected this and it appears to have been introduced in https://github.com/matplotlib/matplotlib/pull/19126 - prior to this, it worked fine.\n\n### Operating system\n\nAll platforms\n\n### Matplotlib Version\n\nBug first appeared in Matplotlib 3.5\n\n### Matplotlib Backend\n\nMacOS X and Agg\n\n### Python version\n\n3.11 but seen in other Python versions\n\n### Jupyter version\n\n_No response_\n\n### Installation\n\npip","author":{"url":"https://github.com/astrofrog","@type":"Person","name":"astrofrog"},"datePublished":"2023-07-04T09:37:57.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/26252/matplotlib/issues/26252"}
| 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:0acc8dab-9b45-0ab4-8076-3732fd8775c1 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D90C:1461B5:2CFEA:3E497:6A532838 |
| html-safe-nonce | 57fce6341a1283ef22948afca7ccff4aae3903c54828f8b9e51de9892a0b3634 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEOTBDOjE0NjFCNToyQ0ZFQTozRTQ5Nzo2QTUzMjgzOCIsInZpc2l0b3JfaWQiOiI3NjYwMzkyNjg4OTc0NTA2MDQwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | b8fb6eb54e1c09ee80cd3844c86f3e1748a4ecc36e513f410736324df92477d4 |
| hovercard-subject-tag | issue:1787556122 |
| 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/26252/issue_layout |
| twitter:image | https://opengraph.githubassets.com/124553f57630d7be2b007048507a87613b1e45e77ecfb4e01f41d5e900a324d3/matplotlib/matplotlib/issues/26252 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/124553f57630d7be2b007048507a87613b1e45e77ecfb4e01f41d5e900a324d3/matplotlib/matplotlib/issues/26252 |
| og:image:alt | Bug summary The default dpi='figure' option in savefig no longer appears to work correctly - instead the DPI is a fixed value. Code for reproduction import matplotlib.pyplot as plt fig = plt.figure... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | astrofrog |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| 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 | 07a982c1d40157c619b364352b704c3ce66bb332 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width