Title: Misalignment imshow vs. grid lines · Issue #1441 · matplotlib/matplotlib · GitHub
Open Graph Title: Misalignment imshow vs. grid lines · Issue #1441 · matplotlib/matplotlib
X Title: Misalignment imshow vs. grid lines · Issue #1441 · matplotlib/matplotlib
Description: The following script show a mis-alignment between grid lines and image patterns while they should be aligned: import numpy as np import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt n = 16 fig = plt.figure(figsize=(6,6...
Open Graph Description: The following script show a mis-alignment between grid lines and image patterns while they should be aligned: import numpy as np import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as ...
X Description: The following script show a mis-alignment between grid lines and image patterns while they should be aligned: import numpy as np import matplotlib matplotlib.use('Agg') import matplotlib.py...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/1441
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Misalignment imshow vs. grid lines","articleBody":"The following script show a mis-alignment between grid lines and image patterns while they should be aligned:\n\n``` python\nimport numpy as np\nimport matplotlib\nmatplotlib.use('Agg')\nimport matplotlib.pyplot as plt\n\nn = 16\nfig = plt.figure(figsize=(6,6))\nZ = np.zeros((n,n))\nZ[::2,::2] = Z[1::2,1::2] = 1\nplt.imshow(Z, interpolation='none', cmap=plt.cm.gray, extent=[0,n,0,n], alpha=0.25)\nplt.xticks(np.arange(0,n), []), plt.yticks(np.arange(0,n), [])\nplt.grid(ls='solid')\ndelta = 0.01\nplt.xlim(1-delta,1+delta), plt.ylim(1-delta,1+delta)\nplt.savefig('pylab-grid.png')\nplt.savefig('pylab-grid.pdf')\n```\n","author":{"url":"https://github.com/rougier","@type":"Person","name":"rougier"},"datePublished":"2012-10-31T13:07:35.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":18},"url":"https://github.com/1441/matplotlib/issues/1441"}
| 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:e756a0f4-e7fa-b7b8-e87c-c0d9c386fe8b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | EA16:1B2073:3CA836:51EFE1:6A525F1D |
| html-safe-nonce | 055a2662172c05c4a7628f25dd3f93b20a63dbee4f3dd13d30b2920cdf02d762 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQTE2OjFCMjA3MzozQ0E4MzY6NTFFRkUxOjZBNTI1RjFEIiwidmlzaXRvcl9pZCI6IjcwNDI5NTcxMzI2MjM0MDQ4MjkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | b347b5f96b134d68f302ec9db43f71f9e7eecdec5559201cc15bd918967cd7f7 |
| hovercard-subject-tag | issue:7998558 |
| 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/1441/issue_layout |
| twitter:image | https://opengraph.githubassets.com/0fddccdc375d057f954a81c4afbdc73a1966dba644eb465ebb57372e8de5b2ed/matplotlib/matplotlib/issues/1441 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/0fddccdc375d057f954a81c4afbdc73a1966dba644eb465ebb57372e8de5b2ed/matplotlib/matplotlib/issues/1441 |
| og:image:alt | The following script show a mis-alignment between grid lines and image patterns while they should be aligned: import numpy as np import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | rougier |
| 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 | 7aed05249554b889eb33d002851a973eebcc7e91 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width