Title: A · Issue #9178 · matplotlib/matplotlib · GitHub
Open Graph Title: A · Issue #9178 · matplotlib/matplotlib
X Title: A · Issue #9178 · matplotlib/matplotlib
Description: Bug report Bug summary The method matplotlib.axes._subplots.AxesSubplot.bar has argument left which is actually the center of the bar. The name of the argument leads to unexpected results. Code for reproduction import matplotlib.pyplot a...
Open Graph Description: Bug report Bug summary The method matplotlib.axes._subplots.AxesSubplot.bar has argument left which is actually the center of the bar. The name of the argument leads to unexpected results. Code for...
X Description: Bug report Bug summary The method matplotlib.axes._subplots.AxesSubplot.bar has argument left which is actually the center of the bar. The name of the argument leads to unexpected results. Code for...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/9178
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"A","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\nThe method `matplotlib.axes._subplots.AxesSubplot.bar` has argument `left` which is actually the center of the bar. The name of the argument leads to unexpected results.\r\n\r\n**Code for reproduction**\r\n\r\n```python\r\nimport matplotlib.pyplot as plt\r\n\r\nleft = [0, 1, 3]\r\nwidth = [1, 2, 1]\r\nheight = [1, 1, 1]\r\nbottoms = [0, 1, 2]\r\n\r\n# Actual\r\nfig, ax = plt.subplots()\r\nfor l, w, h, b in zip(left, width, height, bottoms):\r\n ax.bar(left=l, width=w, height=h, bottom=b, color='blue')\r\nplt.show() \r\n \r\n# Expected\r\nfig, ax = plt.subplots()\r\nfor l, w, h, b in zip(left, width, height, bottoms):\r\n ax.bar(left=l + w/2, width=w, height=h, bottom=b, color='blue')\r\nplt.show()\r\n```\r\n\r\n**Actual outcome**\r\n\r\nThe following is an text representation of the figure produced:\r\n\r\n```\r\n 3\r\n | [------------------]\r\n 2\r\n | [--------------------------------]\r\n 1 \r\n | [-------------]\r\n-0.5-----0.0-----0.5-----1.0-----1.5-----2.0-----2.5-----3.0-----3.5-----4.0**\r\n\r\n```\r\n\r\n**Expected outcome**\r\n\r\nThe following is an text representation of the figure produced:\r\n\r\n```\r\n 3\r\n | [------------------]\r\n 2\r\n | [--------------------------------]\r\n 1 \r\n | [-------------]\r\n-0.5-----0.0-----0.5-----1.0-----1.5-----2.0-----2.5-----3.0-----3.5-----4.0**\r\n\r\n```\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: Windows 10.0.15063\r\n * Matplotlib Version: 2.0.2\r\n * Python Version: Python 3.6.1 |Anaconda custom (64-bit)| (default, May 11 2017, 13:25:24) [MSC v.1900 64 bit (AMD64)] on win32\r\n * Jupyter Version (if applicable):\r\n * Other Libraries: \r\n\r\nconda install matplotlib\r\n\r\nUsing default channel.","author":{"url":"https://github.com/venuur","@type":"Person","name":"venuur"},"datePublished":"2017-09-10T17:24:31.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/9178/matplotlib/issues/9178"}
| 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:80643670-86c6-5505-2615-35022ddf617b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8BAA:1D923B:18071E9:20A45F6:6A546D5C |
| html-safe-nonce | e2c44add309e7b2581778be6964c4d70bc6698d351d2b693bbe302ea5f021bf7 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4QkFBOjFEOTIzQjoxODA3MUU5OjIwQTQ1RjY6NkE1NDZENUMiLCJ2aXNpdG9yX2lkIjoiNzEzNTk1Nzc3MzY4OTk5MzIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 4ffc326ecee30a2260e1b1c625097dc459fd37244b59ef8f0265d6c4017e00f6 |
| hovercard-subject-tag | issue:256525336 |
| 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/9178/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b36388f0488334fc1ed92d42afaf708d094022f960d39983c81310660672030d/matplotlib/matplotlib/issues/9178 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b36388f0488334fc1ed92d42afaf708d094022f960d39983c81310660672030d/matplotlib/matplotlib/issues/9178 |
| og:image:alt | Bug report Bug summary The method matplotlib.axes._subplots.AxesSubplot.bar has argument left which is actually the center of the bar. The name of the argument leads to unexpected results. Code for... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | venuur |
| 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 | 6d28624802c2f7d9500239dd6870ed7031b7353b |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width