Title: Collections could check x- and y- transforms separately to decide whether to autoscale each direction · Issue #15518 · matplotlib/matplotlib · GitHub
Open Graph Title: Collections could check x- and y- transforms separately to decide whether to autoscale each direction · Issue #15518 · matplotlib/matplotlib
X Title: Collections could check x- and y- transforms separately to decide whether to autoscale each direction · Issue #15518 · matplotlib/matplotlib
Description: Bug report Consider the following example from pylab import * plt.rcdefaults() fig, ax = plt.subplots() ax.plot([1, 3], [5, 7]) ax.vlines(x=[1, 2, 3], ymin=0, ymax=1, transform=ax.get_xaxis_transform()) plt.show() where I want to use vli...
Open Graph Description: Bug report Consider the following example from pylab import * plt.rcdefaults() fig, ax = plt.subplots() ax.plot([1, 3], [5, 7]) ax.vlines(x=[1, 2, 3], ymin=0, ymax=1, transform=ax.get_xaxis_transfo...
X Description: Bug report Consider the following example from pylab import * plt.rcdefaults() fig, ax = plt.subplots() ax.plot([1, 3], [5, 7]) ax.vlines(x=[1, 2, 3], ymin=0, ymax=1, transform=ax.get_xaxis_transfo...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/15518
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Collections could check x- and y- transforms separately to decide whether to autoscale each direction","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\nConsider the following example\r\n```python\r\n\r\nfrom pylab import *\r\nplt.rcdefaults()\r\nfig, ax = plt.subplots()\r\nax.plot([1, 3], [5, 7])\r\nax.vlines(x=[1, 2, 3], ymin=0, ymax=1, transform=ax.get_xaxis_transform())\r\nplt.show()\r\n```\r\nwhere I want to use vlines in a manner similar to axvline, i.e. lines spanning the full axes height (but more efficiently than with repeated calls to axvline, as vlines will create a single LineCollection.\r\n\r\n\r\n\r\nThe autoscaling in the y axis incorrectly goes all the way down to include (0, 1) (coming from the call to vlines), even though these values are in axes coordinates rather than data coordinates.\r\n\r\nIn effect, I *think* this is equivalent to the suggestion at https://github.com/matplotlib/matplotlib/pull/13642#discussion_r264878170.\r\n\r\n**Matplotlib version**\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: master or 3.1\r\n * Matplotlib backend (`print(matplotlib.get_backend())`): any\r\n * Python version: 37\r\n * Jupyter version (if applicable): no\r\n * Other libraries: \r\n\r\n\u003c!--Please tell us how you installed matplotlib and python e.g., from source, pip, conda--\u003e\r\n\u003c!--If you installed from conda, please specify which channel you used if not the default--\u003e\r\n\r\n","author":{"url":"https://github.com/anntzer","@type":"Person","name":"anntzer"},"datePublished":"2019-10-25T16:52:08.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/15518/matplotlib/issues/15518"}
| 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:31177540-a2bf-586d-68f7-8409aa453aef |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CCE2:2B8FCA:1CC363:2634F2:6A52C47D |
| html-safe-nonce | 43006ac6a312819927f0bbe2b2ada13b3742d44b74e0bb0b719b390a13ddb06b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQ0UyOjJCOEZDQToxQ0MzNjM6MjYzNEYyOjZBNTJDNDdEIiwidmlzaXRvcl9pZCI6IjM3NTUxMzEzODk0NzA3NTM5MTciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 068376aa07b98af51847ed569c871c65a8db94ab006ac1a96d2879627f573151 |
| hovercard-subject-tag | issue:512617632 |
| 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/15518/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b17652cd814ba954082509fa0f74c8a130f041662e1ee2721eec3feda3c18e1e/matplotlib/matplotlib/issues/15518 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b17652cd814ba954082509fa0f74c8a130f041662e1ee2721eec3feda3c18e1e/matplotlib/matplotlib/issues/15518 |
| og:image:alt | Bug report Consider the following example from pylab import * plt.rcdefaults() fig, ax = plt.subplots() ax.plot([1, 3], [5, 7]) ax.vlines(x=[1, 2, 3], ymin=0, ymax=1, transform=ax.get_xaxis_transfo... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | anntzer |
| 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