{"action":"created","issue":{"url":"https://api.github.com/repos/matplotlib/matplotlib/issues/4984","labels_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/4984/labels{/name}","comments_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/4984/comments","events_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/4984/events","html_url":"https://github.com/matplotlib/matplotlib/issues/4984","id":102851814,"number":4984,"title":"errorbar incorrectly accepts and plots Nx2 shaped yerr","user":{"login":"wackywendell","id":245071,"avatar_url":"https://avatars.githubusercontent.com/u/245071?v=3","gravatar_id":"","url":"https://api.github.com/users/wackywendell","html_url":"https://github.com/wackywendell","followers_url":"https://api.github.com/users/wackywendell/followers","following_url":"https://api.github.com/users/wackywendell/following{/other_user}","gists_url":"https://api.github.com/users/wackywendell/gists{/gist_id}","starred_url":"https://api.github.com/users/wackywendell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wackywendell/subscriptions","organizations_url":"https://api.github.com/users/wackywendell/orgs","repos_url":"https://api.github.com/users/wackywendell/repos","events_url":"https://api.github.com/users/wackywendell/events{/privacy}","received_events_url":"https://api.github.com/users/wackywendell/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-08-24T17:44:58Z","updated_at":"2015-08-24T20:09:43Z","closed_at":null,"body":"The docs for `errorbar` state:\r\n\r\n> *xerr*/*yerr*: [ scalar | N, Nx1, or 2xN array-like ] If a scalar number, len(N) array-like object, or an Nx1 array-like object, errorbars are drawn at +/-value relative to the data.\r\n\r\n> If a sequence of shape 2xN, errorbars are drawn at -row1 and +row2 relative to the data.\r\n\r\nHowever, if you pass a N×2 shaped array, the data still plots - but incorrectly. \r\n\r\nHere's an example:\r\n\r\n```python\r\nx = np.arange(5) + .5\r\ny = np.array([1,2,1.5, 2.5, 2.])\r\nyerr = np.array([\r\n        (.1,.2),\r\n        (.1,.2),\r\n        (.1,.2),\r\n        (.1,.2),\r\n        (.1,.2)\r\n    ])\r\n\r\n# correct behavior\r\nplt.figure()\r\nerr = yerr.T\r\nprint(np.shape(err)) # (2, 5)\r\nplt.errorbar(x, y, err)\r\nplt.xlim(0, 5)\r\n\r\n# incorrect behavior\r\nplt.figure()\r\nerr = yerr\r\nprint(np.shape(err))\r\nplt.errorbar(x, y, err) (5, 2)\r\nplt.xlim(0, 5)\r\n```\r\n\r\nAnd here are the two plots:\r\n\r\n![errorbar-correct](https://cloud.githubusercontent.com/assets/245071/9447356/eaa50976-4a64-11e5-90a1-488bbf136d56.png)\r\n![errorbar-incorrect](https://cloud.githubusercontent.com/assets/245071/9447355/ea986ebe-4a64-11e5-89f0-91be1ec9d426.png)"},"comment":{"url":"https://api.github.com/repos/matplotlib/matplotlib/issues/comments/134362461","html_url":"https://github.com/matplotlib/matplotlib/issues/4984#issuecomment-134362461","issue_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/4984","id":134362461,"user":{"login":"WeatherGod","id":291576,"avatar_url":"https://avatars.githubusercontent.com/u/291576?v=3","gravatar_id":"","url":"https://api.github.com/users/WeatherGod","html_url":"https://github.com/WeatherGod","followers_url":"https://api.github.com/users/WeatherGod/followers","following_url":"https://api.github.com/users/WeatherGod/following{/other_user}","gists_url":"https://api.github.com/users/WeatherGod/gists{/gist_id}","starred_url":"https://api.github.com/users/WeatherGod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WeatherGod/subscriptions","organizations_url":"https://api.github.com/users/WeatherGod/orgs","repos_url":"https://api.github.com/users/WeatherGod/repos","events_url":"https://api.github.com/users/WeatherGod/events{/privacy}","received_events_url":"https://api.github.com/users/WeatherGod/received_events","type":"User","site_admin":false},"created_at":"2015-08-24T20:09:43Z","updated_at":"2015-08-24T20:09:43Z","body":"Whoops, you are right, I misread a comma for a period.\n\nOn Mon, Aug 24, 2015 at 4:05 PM, Wendell Smith <notifications@github.com>\nwrote:\n\n> Your code example has *4* points for y, and *5* for yerr. That's a\n> different problem, that is correctly addressed... but not when y is\n> length 5 and yerr is 5×2.\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/matplotlib/matplotlib/issues/4984#issuecomment-134360606>\n> .\n>\n"}}