Title: Path snapping does not respect quantization scale appropriate for Retina displays · Issue #2697 · matplotlib/matplotlib · GitHub
Open Graph Title: Path snapping does not respect quantization scale appropriate for Retina displays · Issue #2697 · matplotlib/matplotlib
X Title: Path snapping does not respect quantization scale appropriate for Retina displays · Issue #2697 · matplotlib/matplotlib
Description: Here's a toy version of something I'm working on: import numpy as np, pylab as pl N = M = 10 n = 1000 a = (np.random.standard_normal((n,N,M)) + 1j * np.random.standard_normal((n,N,M))) * .5**.5 b = np.linalg.svd(a) pl.clf() for i in xran...
Open Graph Description: Here's a toy version of something I'm working on: import numpy as np, pylab as pl N = M = 10 n = 1000 a = (np.random.standard_normal((n,N,M)) + 1j * np.random.standard_normal((n,N,M))) * .5**.5 b =...
X Description: Here's a toy version of something I'm working on: import numpy as np, pylab as pl N = M = 10 n = 1000 a = (np.random.standard_normal((n,N,M)) + 1j * np.random.standard_normal((n,N,M))) * .5...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/2697
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Path snapping does not respect quantization scale appropriate for Retina displays","articleBody":"Here's a toy version of something I'm working on:\n\n\u003cpre\u003eimport numpy as np, pylab as pl\nN = M = 10\nn = 1000\na = (np.random.standard_normal((n,N,M)) + 1j * np.random.standard_normal((n,N,M))) * .5**.5\nb = np.linalg.svd(a)\npl.clf()\nfor i in xrange(b[1].shape[1]):\n _=pl.hist(b[1][:,i], bins=100, histtype='step', normed=True)\n\u003c/pre\u003e\n\n\nIf you run this with the macosx backend on a Retina display and carefully resize the window, you will find that the path snapping algorithm is snapping to the nearest two-pixel boundary, rather than the intended behavior of snapping to the nearest one-pixel boundary.\n\nI speculate that this is also an issue with marker placement and hatching.\n\nTwo solutions are apparent.\n\nOne is for the macosx backend to do a little dance of rescaling the transform matrices before and after passing paths through the path iterator. This seems like a pain and not very portable. I believe that the other backends will be growing high-DPI flavors soon! [edit: just took a look and it seems like only the macosx backend uses the PathCleanupIterator. Is that correct?]\n\nThe other solution is for the path iterator to take the image magnification factor as an argument, and thread this through the code to the actual path snapper.\n\nIncidentally, we might consider renaming the image magnification factor since it matters for vectors too.\n","author":{"url":"https://github.com/piannucci","@type":"Person","name":"piannucci"},"datePublished":"2013-12-28T00:04:06.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/2697/matplotlib/issues/2697"}
| 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:f60ce6cf-c038-8fad-1422-394eb1e6e89b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DD82:34B0DF:9EDE5:D22B0:6A52EA5D |
| html-safe-nonce | eb03866b4e3353755cee94436bb130d596b4abe827b522b3501414facfd5060e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERDgyOjM0QjBERjo5RURFNTpEMjJCMDo2QTUyRUE1RCIsInZpc2l0b3JfaWQiOiI3MTkwMjYxNzkzNDc4MDc3MDIxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | f6c1f2e573fa486e8d3b5cfce4ade2fb1616a64ed1f4461e06c1e103f3cd19d3 |
| hovercard-subject-tag | issue:24837778 |
| 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/2697/issue_layout |
| twitter:image | https://opengraph.githubassets.com/d71aff6f1f8aa514f3eb77c96b4b11fe9e09beb06621101f35d116798315d55c/matplotlib/matplotlib/issues/2697 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/d71aff6f1f8aa514f3eb77c96b4b11fe9e09beb06621101f35d116798315d55c/matplotlib/matplotlib/issues/2697 |
| og:image:alt | Here's a toy version of something I'm working on: import numpy as np, pylab as pl N = M = 10 n = 1000 a = (np.random.standard_normal((n,N,M)) + 1j * np.random.standard_normal((n,N,M))) * .5**.5 b =... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | piannucci |
| 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