Title: tight_layout is incorrect for certain title sizes · Issue #8201 · matplotlib/matplotlib · GitHub
Open Graph Title: tight_layout is incorrect for certain title sizes · Issue #8201 · matplotlib/matplotlib
X Title: tight_layout is incorrect for certain title sizes · Issue #8201 · matplotlib/matplotlib
Description: I am using Python 3.4.4 |Anaconda 2.3.0 (64-bit) on win64 bits, with latest matplotlib and pyqt updated by conda install xx for the following code, if I use unicode title in the for-loop, the images are too small. However, if I use Engli...
Open Graph Description: I am using Python 3.4.4 |Anaconda 2.3.0 (64-bit) on win64 bits, with latest matplotlib and pyqt updated by conda install xx for the following code, if I use unicode title in the for-loop, the image...
X Description: I am using Python 3.4.4 |Anaconda 2.3.0 (64-bit) on win64 bits, with latest matplotlib and pyqt updated by conda install xx for the following code, if I use unicode title in the for-loop, the image...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/8201
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"tight_layout is incorrect for certain title sizes","articleBody":"I am using `Python 3.4.4 |Anaconda 2.3.0 (64-bit)` on win64 bits, with latest `matplotlib` and `pyqt` updated by `conda install xx`\r\nfor the following code, if I use unicode title in the for-loop, the images are too small. However, if I use English title, the images' size are expected\r\n\r\nThis can be observed for both `TkAgg` and `Qt5Agg`\r\n\r\n```python\r\n#coding=utf-8\r\nimport matplotlib\r\nmatplotlib.rcParams['backend'] = 'TkAgg'\r\n#~ matplotlib.rcParams['backend'] = 'Qt5Agg'\r\n\r\nfrom pylab import *\r\nimport PIL.Image as Image\r\n\r\nim=Image.open('Mario cosplay.jpg').convert('L')\r\n\r\norgsize=im.size\r\nnewsize=[int(i/4) for i in orgsize]\r\n\r\nsubplot(2,3,1)\r\nimshow(im, cmap='gray', vmin=0, vmax=255)\r\ntitle('original pic', fontsize=20);\r\n\r\nfilters=[Image.NEAREST, Image.BILINEAR, Image.BICUBIC, Image.ANTIALIAS]\r\nfiltersName=['NEAREST', 'BILINEAR', 'BICUBIC', 'ANTIALIAS']\r\nfor k in range(len(filters)):\r\n subplot(2,3,k+2)\r\n im1=im.resize(newsize, filters[k])\r\n imshow(im1, cmap='gray', vmin=0, vmax=255)\r\n #~ title('原图的1/%i,插值法:%s' % (4, filtersName[k]), fontsize=20) # bug here\r\n title('size: 1/%i,interpolation: %s' % (4, filtersName[k]), fontsize=20) # no bug\r\n\r\ngcf().tight_layout()\r\n\r\nshow()\r\n```\r\n\r\n\r\n\r\n","author":{"url":"https://github.com/retsyo","@type":"Person","name":"retsyo"},"datePublished":"2017-03-06T03:54:10.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/8201/matplotlib/issues/8201"}
| 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:573930fc-929c-ec6d-7fcf-e5b51c0528d6 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A862:25C205:8E2B9B:C251F6:6A5552CB |
| html-safe-nonce | d18c26a4d3578949166a5e944a296790a01023c0b36ec0f7fd3da2877da47817 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBODYyOjI1QzIwNTo4RTJCOUI6QzI1MUY2OjZBNTU1MkNCIiwidmlzaXRvcl9pZCI6IjcwMjg0MzE5MjI1OTU3MTM3MzkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 248903b5e805bb719db64f8157ae40215a785aac0e43d33b8f2bc1ef420183d3 |
| hovercard-subject-tag | issue:212018228 |
| 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/8201/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e4b843df4591d8235bcd9387c909c0e9a6d58f0f8d5c599ac9c7ad9a7c0dcad9/matplotlib/matplotlib/issues/8201 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e4b843df4591d8235bcd9387c909c0e9a6d58f0f8d5c599ac9c7ad9a7c0dcad9/matplotlib/matplotlib/issues/8201 |
| og:image:alt | I am using Python 3.4.4 |Anaconda 2.3.0 (64-bit) on win64 bits, with latest matplotlib and pyqt updated by conda install xx for the following code, if I use unicode title in the for-loop, the image... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | retsyo |
| hostname | github.com |
| expected-hostname | github.com |
| None | cd9eea424140838b22e9eabd53d92b5702617ddd6d76efcd3a37f08d44309ca5 |
| 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 | 3084b9f587e8f1e19803bbe0c77ac77ce3c99c5c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width