Title: Add scale(x)(y) parameter(s) to imshow as in plot · Issue #18970 · matplotlib/matplotlib · GitHub
Open Graph Title: Add scale(x)(y) parameter(s) to imshow as in plot · Issue #18970 · matplotlib/matplotlib
X Title: Add scale(x)(y) parameter(s) to imshow as in plot · Issue #18970 · matplotlib/matplotlib
Description: Problem In situations where an Axes has a large background image/map (extent greater than axis limits) and the axis limits are supposed to be controlled by other artists, like paths, it would be very helpful to have toggling parameters l...
Open Graph Description: Problem In situations where an Axes has a large background image/map (extent greater than axis limits) and the axis limits are supposed to be controlled by other artists, like paths, it would be ve...
X Description: Problem In situations where an Axes has a large background image/map (extent greater than axis limits) and the axis limits are supposed to be controlled by other artists, like paths, it would be ve...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/18970
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Add scale(x)(y) parameter(s) to imshow as in plot","articleBody":"### Problem\r\n\r\nIn situations where an `Axes` has a large background image/map (`extent` greater than axis limits) and the axis limits are supposed to be controlled by other artists, like paths, it would be very helpful to have toggling parameters like `scalex` and `scaley` as in `Axes.plot`. Right now, even if you fix the limits after `imshow`, the moment you let autoscale do its thing (which is desired) it rescales to show the whole image.\r\n\r\n### Proposed Solution\r\n\r\nA very simple and probably naive solution would be to wrap the `imshow` line below in an `if` where `scalexy` is `True` by default:\r\n\r\n```python\r\nif scalexy:\r\n im.set_extent(im.get_extent())\r\n```","author":{"url":"https://github.com/alexiscoutinho","@type":"Person","name":"alexiscoutinho"},"datePublished":"2020-11-18T03:25:33.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/18970/matplotlib/issues/18970"}
| 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:35343054-467b-f883-db82-dd1bc9344d5e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 80F2:1F6AEE:FDD80:15AAE1:6A5259D2 |
| html-safe-nonce | 2953049dd720a5964d244d9cda9a83543af40b0d64aea7d097cd9abcc592650a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MEYyOjFGNkFFRTpGREQ4MDoxNUFBRTE6NkE1MjU5RDIiLCJ2aXNpdG9yX2lkIjoiMjYxMzc0MDIwNTYwNjMyODc4NiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | f500d8eb429a8ec9e1860b183b76c3ec09f3f3d94ad47a3eb4817507aeece0fe |
| hovercard-subject-tag | issue:745294997 |
| 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/18970/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ed50fae42b4ae8fd31feb7033031cfeaad731e8cd766e207022888134ed3b576/matplotlib/matplotlib/issues/18970 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ed50fae42b4ae8fd31feb7033031cfeaad731e8cd766e207022888134ed3b576/matplotlib/matplotlib/issues/18970 |
| og:image:alt | Problem In situations where an Axes has a large background image/map (extent greater than axis limits) and the axis limits are supposed to be controlled by other artists, like paths, it would be ve... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | alexiscoutinho |
| 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