Title: Tick labels containing the digit "1" slightly misaligned in some plot exports · Issue #6847 · matplotlib/matplotlib · GitHub
Open Graph Title: Tick labels containing the digit "1" slightly misaligned in some plot exports · Issue #6847 · matplotlib/matplotlib
X Title: Tick labels containing the digit "1" slightly misaligned in some plot exports · Issue #6847 · matplotlib/matplotlib
Description: Hi, Hopefully, my issue is not too unimportant and this is the right place to ask about it. I experienced a minor problem, when using the plt.savefig function to save my plots to either .png (and also for .jpg) with a high resolution (30...
Open Graph Description: Hi, Hopefully, my issue is not too unimportant and this is the right place to ask about it. I experienced a minor problem, when using the plt.savefig function to save my plots to either .png (and a...
X Description: Hi, Hopefully, my issue is not too unimportant and this is the right place to ask about it. I experienced a minor problem, when using the plt.savefig function to save my plots to either .png (and a...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/6847
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Tick labels containing the digit \"1\" slightly misaligned in some plot exports","articleBody":"Hi,\n\nHopefully, my issue is not too unimportant and this is the right place to ask about it.\nI experienced a minor problem, when using the `plt.savefig` function to save my plots to either `.png` (and also for `.jpg`) with a high resolution (300 dpi). If I specified to not use the standard font but set a font family to serif (`plt.rcParams[\"font.family\"] = \"serif\"`) all x-axis labels containing the digit \"1\", that I tried, namely `0.1` and `1.0` are misaligned in y-direction by 1 pixel. It's not noticeable most of the time, but when one has two subplots next to each other and the `1.0` label of one plot and the `0.0` label of the other are really next to each other, the labels look off.\n\nAs a minimal working example you can run:\n\n```\nimport matplotlib\nimport matplotlib.pyplot as plt\n\nplt.rcParams[\"font.family\"] = \"serif\"\n\nfig, ax = plt.subplots(1, 1)\nplt.savefig(\"minimalExample.png\", dpi=300)\n```\n\nand then zoom in onto `0.8` and `1.0`. You can see the difference best, when you compare the decimal points.\n\nHere is also a picture of the zoom and one of the two subplots, where I saw the problem first:\n\n\n\n\n\nI tried this on a Linux machine with `python` version `2.7.9` and `matplotlib` versions `1.4.2` installed from `debian` repositories and `1.5.1` installed via `pip`.\nGenerally, this is not a big problem, though, as one can use alternate formats like `pdf` or `eps` if one really cares about a one pixel misalignment. Nonetheless, I thought, I might let you know. Feel free to close/delete this issue, if you consider it as too unimportant (or if this is the wrong place to raise it, as it might just be an external libraries fault).\n\nBest (and thanks for this great package),\n\nJonathan\n","author":{"url":"https://github.com/jotasi","@type":"Person","name":"jotasi"},"datePublished":"2016-07-27T15:59:53.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/6847/matplotlib/issues/6847"}
| 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:4500f46c-917c-ade8-24e1-38f117ae2672 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C73A:33B84F:1A434E:237620:6A53D95A |
| html-safe-nonce | db331b17930e64714f086f73df2e572e25831088772bd41f2be897fdee436ff2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNzNBOjMzQjg0RjoxQTQzNEU6MjM3NjIwOjZBNTNEOTVBIiwidmlzaXRvcl9pZCI6IjY2NjkwMTM3OTM4Mjc2MTgxOCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 9be0d66eccdd65dd98c17437b2abbb38739c45ceca9810654a1fa5752bdba708 |
| hovercard-subject-tag | issue:167891196 |
| 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/6847/issue_layout |
| twitter:image | https://opengraph.githubassets.com/643e071a2f6269ca190b819f0d9ef33349fd1d5d9434ee6061f0c7d1c2de01e5/matplotlib/matplotlib/issues/6847 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/643e071a2f6269ca190b819f0d9ef33349fd1d5d9434ee6061f0c7d1c2de01e5/matplotlib/matplotlib/issues/6847 |
| og:image:alt | Hi, Hopefully, my issue is not too unimportant and this is the right place to ask about it. I experienced a minor problem, when using the plt.savefig function to save my plots to either .png (and a... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jotasi |
| 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