Title: [Bug]: EPS savefig messed up by 'figure.autolayout' rcParam on 3.5.0 · Issue #21930 · matplotlib/matplotlib · GitHub
Open Graph Title: [Bug]: EPS savefig messed up by 'figure.autolayout' rcParam on 3.5.0 · Issue #21930 · matplotlib/matplotlib
X Title: [Bug]: EPS savefig messed up by 'figure.autolayout' rcParam on 3.5.0 · Issue #21930 · matplotlib/matplotlib
Description: Bug summary Setting 'figure.autolayout' to 'True' removes most of the EPS savefig. Code for reproduction import matplotlib.pyplot as plt plt.rcParams['figure.autolayout'] = 'True' plt.plot([1, 2, 3], [1, 2, 3], 'o-') plt.title(r'$\sum_{i...
Open Graph Description: Bug summary Setting 'figure.autolayout' to 'True' removes most of the EPS savefig. Code for reproduction import matplotlib.pyplot as plt plt.rcParams['figure.autolayout'] = 'True' plt.plot([1, 2, 3...
X Description: Bug summary Setting 'figure.autolayout' to 'True' removes most of the EPS savefig. Code for reproduction import matplotlib.pyplot as plt plt.rcParams['figure.autolayout'] = ...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/21930
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Bug]: EPS savefig messed up by 'figure.autolayout' rcParam on 3.5.0","articleBody":"### Bug summary\n\nSetting 'figure.autolayout' to 'True' removes most of the EPS savefig.\n\n### Code for reproduction\n\n```python\nimport matplotlib.pyplot as plt\r\n\r\nplt.rcParams['figure.autolayout'] = 'True'\r\n\r\nplt.plot([1, 2, 3], [1, 2, 3], 'o-')\r\nplt.title(r'$\\sum_{i=0}^{\\infty} x_i$ just a test')\r\nplt.savefig('test2.eps', format='eps')\n```\n\n\n### Actual outcome\n\nActual image after being exported from gimp (300dpi)\r\n\r\n\r\n\r\nThis is the EPS file:\r\nhttps://we.tl/t-ka6aoUGxKm\n\n### Expected outcome\n\nExpect the image in \".eps\" file like this.\r\n\r\n\r\n\r\nThis is the EPS file:\r\nhttps://we.tl/t-Q7WBPMwDcy\n\n### Additional information\n\nI found this bug by an accident while using a custom \".mplstyle\" on Matplotlib 3.5.0\r\nSeems like this rcParam `['figure.autolayout'] = 'True'` destroys about 2/3 of the eps file.\r\n`plt.tightlayout()` seem to not affect the result, the bug happens only with this rcParam on the latest matplotlib version.\r\n\r\n```py\r\nimport matplotlib.pyplot as plt\r\n\r\nplt.plot([1, 2, 3], [1, 2, 3], 'o-')\r\nplt.title(r'$\\sum_{i=0}^{\\infty} x_i$ just a test')\r\nplt.savefig('test2.eps', format='eps')\r\n```\r\nThis is the code for the expected outcome.\n\n### Operating system\n\nWindows\n\n### Matplotlib Version\n\nBug present only on 3.5.0\n\n### Matplotlib Backend\n\nQt5Agg\n\n### Python version\n\nTested with 3.10 and 3.9\n\n### Jupyter version\n\n_No response_\n\n### Installation\n\nconda","author":{"url":"https://github.com/alex180500","@type":"Person","name":"alex180500"},"datePublished":"2021-12-11T15:16:07.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":8},"url":"https://github.com/21930/matplotlib/issues/21930"}
| 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:134ae0d3-f527-14ca-f38a-be6ee53af3fb |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C5F2:32BAC1:7332B8:9ABDFE:6A52A5B3 |
| html-safe-nonce | 82e440ece5515b44c24d0c3dc3bd7d1e15933de42ad7391ef8be69de1920468c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNUYyOjMyQkFDMTo3MzMyQjg6OUFCREZFOjZBNTJBNUIzIiwidmlzaXRvcl9pZCI6IjUwMjcwMTg3NjM3MTI3Njc0MTEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 80cc58fbb425d10ffdeebc021be30416f14366f7f238223a236694a53f923d43 |
| hovercard-subject-tag | issue:1077564054 |
| 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/21930/issue_layout |
| twitter:image | https://opengraph.githubassets.com/693941553236b3caacdc90350cfa922fcba1932fe4b88d7637c678f42db57af1/matplotlib/matplotlib/issues/21930 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/693941553236b3caacdc90350cfa922fcba1932fe4b88d7637c678f42db57af1/matplotlib/matplotlib/issues/21930 |
| og:image:alt | Bug summary Setting 'figure.autolayout' to 'True' removes most of the EPS savefig. Code for reproduction import matplotlib.pyplot as plt plt.rcParams['figure.autolayout'] = 'True' plt.plot([1, 2, 3... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | alex180500 |
| 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