Title: PGF backend does not clip image with specific bounding box · Issue #2586 · matplotlib/matplotlib · GitHub
Open Graph Title: PGF backend does not clip image with specific bounding box · Issue #2586 · matplotlib/matplotlib
X Title: PGF backend does not clip image with specific bounding box · Issue #2586 · matplotlib/matplotlib
Description: When setting the bbox_inches in savefig() to a specific size the resulting pgf file sets the bounding box to the appropriate dimensions but the image is not clipped. It seems that clip option should be added to the \pgfusepath command. C...
Open Graph Description: When setting the bbox_inches in savefig() to a specific size the resulting pgf file sets the bounding box to the appropriate dimensions but the image is not clipped. It seems that clip option shoul...
X Description: When setting the bbox_inches in savefig() to a specific size the resulting pgf file sets the bounding box to the appropriate dimensions but the image is not clipped. It seems that clip option shoul...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/2586
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"PGF backend does not clip image with specific bounding box","articleBody":"When setting the bbox_inches in savefig() to a specific size the resulting pgf file sets the bounding box to the appropriate dimensions but the image is not clipped. It seems that clip option should be added to the \\pgfusepath command.\n\nCurrent commands cut from top of pgf file:\n\\begingroup%\n\\makeatletter%\n\\begin{pgfpicture}%\n\\pgfpathrectangle{\\pgfpointorigin}{\\pgfqpoint{2.281265in}{2.224689in}}%\n\\pgfusepath{use as bounding box}%\n\nCorrect \\pgfusepath command?:\n\\pgfusepath{use as bounding box,clip}%\n\nI looked at the pgf file and see the use of \\pgfusepath{clip} throughout deeper in the file however it doesn't clip the image. Adding clip as I did above gives the correct behavior in my latex document.\n\ni created the pgf with a python command like:\nextent = ax.get_window_extent().transformed(fig.dpi_scale_trans.inverted())\nfig.savefig('test.pgf', bbox_inches=extent)\n","author":{"url":"https://github.com/gibbycu","@type":"Person","name":"gibbycu"},"datePublished":"2013-11-08T19:38:43.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":8},"url":"https://github.com/2586/matplotlib/issues/2586"}
| 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:d93acab3-8c83-0c5e-2db3-fb1fb85c6308 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B8D2:2C65A3:3059998:41CFD83:6A53D953 |
| html-safe-nonce | f2960110dd7fcd5d421fb580842ab791f57ec6b1e70482ce8f5298c8720c4dc7 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCOEQyOjJDNjVBMzozMDU5OTk4OjQxQ0ZEODM6NkE1M0Q5NTMiLCJ2aXNpdG9yX2lkIjoiMjYxNzg5MzczNTMzNDQwMjM4NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 6f75b11ba7bb0c38937233f8b4377e432f6ad57b9c428b6b6704c11ac187a531 |
| hovercard-subject-tag | issue:22358836 |
| 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/2586/issue_layout |
| twitter:image | https://opengraph.githubassets.com/af556087d0d1b836fc9557414a9707f8734730ac82c5bbb76f023294c3d80fe9/matplotlib/matplotlib/issues/2586 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/af556087d0d1b836fc9557414a9707f8734730ac82c5bbb76f023294c3d80fe9/matplotlib/matplotlib/issues/2586 |
| og:image:alt | When setting the bbox_inches in savefig() to a specific size the resulting pgf file sets the bounding box to the appropriate dimensions but the image is not clipped. It seems that clip option shoul... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | gibbycu |
| 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