Title: Autoscale does not work for ax.arrow() · Issue #12712 · matplotlib/matplotlib · GitHub
Open Graph Title: Autoscale does not work for ax.arrow() · Issue #12712 · matplotlib/matplotlib
X Title: Autoscale does not work for ax.arrow() · Issue #12712 · matplotlib/matplotlib
Description: Bug report As already stated in this stack overflow thread, when drawing arrows with the arrow()-method, the scale of the plot is not adjusted as expected. A workaround is to set the limits of the plot manually or to plot additional, inv...
Open Graph Description: Bug report As already stated in this stack overflow thread, when drawing arrows with the arrow()-method, the scale of the plot is not adjusted as expected. A workaround is to set the limits of the ...
X Description: Bug report As already stated in this stack overflow thread, when drawing arrows with the arrow()-method, the scale of the plot is not adjusted as expected. A workaround is to set the limits of the ...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/12712
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Autoscale does not work for ax.arrow()","articleBody":"### Bug report\r\nAs already stated in this [stack overflow thread](https://stackoverflow.com/questions/37899364/autoscaling-not-working-on-drawing-arrow), when drawing arrows with the arrow()-method, the scale of the plot is not adjusted as expected. A workaround is to set the limits of the plot manually or to plot additional, invisible points near the arrows. \r\n\r\n## Code for Reproducing the bug\r\n```python\r\nimport matplotlib.pyplot as plt\r\nimport matplotlib\r\nimport sys\r\n\r\nprint(matplotlib.__version__)\r\nprint(sys.version)\r\nfig, ax = plt.subplots()\r\n#ax.set_xlim(0, 5)\r\n#ax.set_ylim(0, 5)\r\nax.arrow(1, 1, 1, 1)\r\nplt.show()\r\n```\r\n\r\nOutput: \r\n```\r\n3.0.1\r\n3.7.0 (default, Oct 9 2018, 10:31:47) \r\n[GCC 7.3.0]\r\n```\r\n\r\n\r\n\r\n\r\n**Outcome with setting limits manually**\r\n\r\n\r\n\r\n\r\n\u003c!--A description of the expected outcome from the code snippet--\u003e\r\n\u003c!--If this used to work in an earlier version of Matplotlib, please note the version it used to work on--\u003e\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: Xubuntu 18.04\r\n * Matplotlib version: 3.0.1\r\n * Matplotlib backend (`print(matplotlib.get_backend())`): Qt5Agg\r\n * Python version: 3.7.0\r\n * Jupyter version (if applicable):\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\nI installed matplotlib by using anaconda. \r\n\u003c!--If you installed from conda, please specify which channel you used if not the default--\u003e\r\nI didn't specify a channel, so I guess it was the main channel.\r\n","author":{"url":"https://github.com/CakeUser321","@type":"Person","name":"CakeUser321"},"datePublished":"2018-11-02T13:20:39.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/12712/matplotlib/issues/12712"}
| 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:46f4384e-3cd9-b4e9-cc92-702297efafee |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C1EC:2C9FC7:199FF70:2243422:6A535E32 |
| html-safe-nonce | 753e79cb8d2e0dff52e2027f060234c56f44fe06a179028a31cb3b8c9c0d2c7c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMUVDOjJDOUZDNzoxOTlGRjcwOjIyNDM0MjI6NkE1MzVFMzIiLCJ2aXNpdG9yX2lkIjoiNjMxOTYyMzI4MjA3NDI3OTQ3NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 4195db8fd615d62d4ed3b924ad6e9ce345259a150892cc90da3e7afc9138f238 |
| hovercard-subject-tag | issue:376807334 |
| 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/12712/issue_layout |
| twitter:image | https://opengraph.githubassets.com/4280f45841198cd6365ee0460742913454d10d8a3c0f8ba42d56823fbb723729/matplotlib/matplotlib/issues/12712 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/4280f45841198cd6365ee0460742913454d10d8a3c0f8ba42d56823fbb723729/matplotlib/matplotlib/issues/12712 |
| og:image:alt | Bug report As already stated in this stack overflow thread, when drawing arrows with the arrow()-method, the scale of the plot is not adjusted as expected. A workaround is to set the limits of the ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | CakeUser321 |
| 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