Title: Unexpected behaviour of imshow default interpolation · Issue #19838 · matplotlib/matplotlib · GitHub
Open Graph Title: Unexpected behaviour of imshow default interpolation · Issue #19838 · matplotlib/matplotlib
X Title: Unexpected behaviour of imshow default interpolation · Issue #19838 · matplotlib/matplotlib
Description: Bug report Bug summary Artifacts appear when plotting periodic data with discontinuities, i.e. something like x mod 1.0 The bug appears at when render resolution is relatively small comparing to the real resolution of the data (downsampl...
Open Graph Description: Bug report Bug summary Artifacts appear when plotting periodic data with discontinuities, i.e. something like x mod 1.0 The bug appears at when render resolution is relatively small comparing to th...
X Description: Bug report Bug summary Artifacts appear when plotting periodic data with discontinuities, i.e. something like x mod 1.0 The bug appears at when render resolution is relatively small comparing to th...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/19838
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Unexpected behaviour of imshow default interpolation","articleBody":"\u003c!--To help us understand and resolve your issue, please fill out the form to the best of your ability.--\u003e\r\n\u003c!--You can feel free to delete the sections that do not apply.--\u003e\r\n\r\n### Bug report\r\n\r\n**Bug summary**\r\n\r\nArtifacts appear when plotting periodic data with discontinuities, i.e. something like x mod 1.0 \r\nThe bug appears at when render resolution is relatively small comparing to the real resolution of the data (downsampling problem?).\r\n\r\n\r\n**Code for reproduction**\r\n\r\n\u003c!--A minimum code snippet required to reproduce the bug.\r\nPlease make sure to minimize the number of dependencies required, and provide\r\nany necessary plotted data.\r\nAvoid using threads, as Matplotlib is (explicitly) not thread-safe.--\u003e\r\n\r\n```python\r\nimport numpy as np\r\nimport matplotlib.pyplot as plt\r\n\r\nxx, yy = np.meshgrid(np.linspace(-5, 5, 201), np.linspace(-5, 5, 201))\r\npsi = xx % 1.0\r\n\r\nplt.figure()\r\nplt.imshow(psi, cmap=\"twilight\")\r\nplt.savefig(\"small.png\", dpi=100)\r\nplt.savefig(\"large.png\", dpi=200)\r\n```\r\n\r\n**Outcome**\r\n\r\n \r\n\r\n\u003cimg src=\"https://user-images.githubusercontent.com/11896426/113173843-173c6000-924a-11eb-907f-3bb546a0941b.png\" alt=\"alt text\" width=\"40%\"\u003e \u003cimg src=\"https://user-images.githubusercontent.com/11896426/113173851-199eba00-924a-11eb-95b4-97b2b6262ed7.png\" alt=\"alt text\" width=\"40%\"\u003e \r\n\r\n(large.png, small.png)\r\n\r\n**Matplotlib version**\r\n\r\nThe issue is repeatable locally and in CoLab:\r\n\r\n\u003c!--Please specify your platform and versions of the relevant libraries you are using:--\u003e\r\n * Operating system: Linux\r\n * Matplotlib version: 3.3.3, 3.2.2\r\n * Matplotlib backend (): TkAgg, ipykernel.pylab.backend_inline \r\n * Python version: 3.8.5, 3.7\r\n\r\n","author":{"url":"https://github.com/Trel725","@type":"Person","name":"Trel725"},"datePublished":"2021-03-31T16:02:08.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/19838/matplotlib/issues/19838"}
| 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:05136d20-7d0b-5435-d7eb-5ddbd021a938 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D5EC:21BCA4:518F3E:6FB786:6A5343B0 |
| html-safe-nonce | 4faeb436d8a10107f59596a8ae2173b2ee42e598e16f83f9824b2642c6b3599b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENUVDOjIxQkNBNDo1MThGM0U6NkZCNzg2OjZBNTM0M0IwIiwidmlzaXRvcl9pZCI6IjEzMDYyODY3NDcyMjY3NzY4MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | e46c7eb9093c6bcfa93ca0a035c333476fc43cc071f70ae8886aa856c4bdb77f |
| hovercard-subject-tag | issue:846904528 |
| 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/19838/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e70913354d015e807272c574c19065e41133b1e207e2eaf9d4d73a50e3bf42eb/matplotlib/matplotlib/issues/19838 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e70913354d015e807272c574c19065e41133b1e207e2eaf9d4d73a50e3bf42eb/matplotlib/matplotlib/issues/19838 |
| og:image:alt | Bug report Bug summary Artifacts appear when plotting periodic data with discontinuities, i.e. something like x mod 1.0 The bug appears at when render resolution is relatively small comparing to th... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Trel725 |
| 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