Title: Inconsistent inset_axes position between show(), savefig(format='png') and savefig(format='pdf') · Issue #8120 · matplotlib/matplotlib · GitHub
Open Graph Title: Inconsistent inset_axes position between show(), savefig(format='png') and savefig(format='pdf') · Issue #8120 · matplotlib/matplotlib
X Title: Inconsistent inset_axes position between show(), savefig(format='png') and savefig(format='pdf') · Issue #8120 · matplotlib/matplotlib
Description: Bug report Bug summary inset_axes inconsistently positioned between show(), savefig(...,format='png') and savefig(...format='pdf') when the dpi option is set. Code for reproduction import matplotlib.pyplot as plt from mpl_toolkits.axes_g...
Open Graph Description: Bug report Bug summary inset_axes inconsistently positioned between show(), savefig(...,format='png') and savefig(...format='pdf') when the dpi option is set. Code for reproduction import matplotli...
X Description: Bug report Bug summary inset_axes inconsistently positioned between show(), savefig(...,format='png') and savefig(...format='pdf') when the dpi option is set. Code for reproduction ...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/8120
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Inconsistent inset_axes position between show(), savefig(format='png') and savefig(format='pdf')","articleBody":"### Bug report\r\n\r\n**Bug summary**\r\n\r\ninset_axes inconsistently positioned between show(), savefig(...,format='png') and savefig(...format='pdf') when the dpi option is set.\r\n\r\n**Code for reproduction**\r\n\r\n```python\r\nimport matplotlib.pyplot as plt\r\nfrom mpl_toolkits.axes_grid1.inset_locator import inset_axes\r\n\r\nfig = plt.figure(dpi=150);\r\n\r\nax1 = plt.gca()\r\nax1ins1 = inset_axes(ax1, width=.7, height=.7,bbox_to_anchor=(100,100))\r\n\r\nplt.savefig(\"test.pdf\",format='pdf',dpi=300,bbox_inches=\"tight\")\r\nplt.savefig(\"test.png\",format='png',dpi=300,bbox_inches=\"tight\")\r\nplt.show()\r\n```\r\n\r\n**Actual outcome**\r\n\r\nPDF:\r\n\r\nPNG:\r\n\r\nshow():\r\n\r\n\r\n**Expected outcome**\r\n\r\nI would expect all the results to come out the same.\r\n\r\n**Matplotlib version**\r\n\r\n- Matplotlib 2.0.0 (conda)\r\n- Python 2.7.13 (conda)\r\n- Platform: Linux\r\n","author":{"url":"https://github.com/sorenrasmussen","@type":"Person","name":"sorenrasmussen"},"datePublished":"2017-02-21T09:36:37.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":7},"url":"https://github.com/8120/matplotlib/issues/8120"}
| 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:a4b237b0-984c-1ebf-3102-fe36e3cd68b1 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B428:27E2F7:2FD12B:3EF71F:6A52EC04 |
| html-safe-nonce | d6cbc4349f0de31c0c1d98be57d07a9aa49bb4719c841565d91c60dcdfbf18b7 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNDI4OjI3RTJGNzoyRkQxMkI6M0VGNzFGOjZBNTJFQzA0IiwidmlzaXRvcl9pZCI6IjE4MjQzNzUxMzI3MTE0ODAzMjQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 6041f629b0b2d3a0afd5ecf2eaabd7db2e4d7d50043e00440b23a943984b2f4a |
| hovercard-subject-tag | issue:209088542 |
| 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/8120/issue_layout |
| twitter:image | https://opengraph.githubassets.com/07d3f9c7c826650980582a52952f1eab0ccb07c9c851ff3f9f9bff72638f28ff/matplotlib/matplotlib/issues/8120 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/07d3f9c7c826650980582a52952f1eab0ccb07c9c851ff3f9f9bff72638f28ff/matplotlib/matplotlib/issues/8120 |
| og:image:alt | Bug report Bug summary inset_axes inconsistently positioned between show(), savefig(...,format='png') and savefig(...format='pdf') when the dpi option is set. Code for reproduction import matplotli... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | sorenrasmussen |
| 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