{"action":"created","issue":{"url":"https://api.github.com/repos/matplotlib/matplotlib/issues/10810","repository_url":"https://api.github.com/repos/matplotlib/matplotlib","labels_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/10810/labels{/name}","comments_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/10810/comments","events_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/10810/events","html_url":"https://github.com/matplotlib/matplotlib/pull/10810","id":305828626,"number":10810,"title":"Fix for plt.plot() does not support structured arrays as data= kwarg","user":{"login":"zhangeugenia","id":14364756,"avatar_url":"https://avatars3.githubusercontent.com/u/14364756?v=4","gravatar_id":"","url":"https://api.github.com/users/zhangeugenia","html_url":"https://github.com/zhangeugenia","followers_url":"https://api.github.com/users/zhangeugenia/followers","following_url":"https://api.github.com/users/zhangeugenia/following{/other_user}","gists_url":"https://api.github.com/users/zhangeugenia/gists{/gist_id}","starred_url":"https://api.github.com/users/zhangeugenia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhangeugenia/subscriptions","organizations_url":"https://api.github.com/users/zhangeugenia/orgs","repos_url":"https://api.github.com/users/zhangeugenia/repos","events_url":"https://api.github.com/users/zhangeugenia/events{/privacy}","received_events_url":"https://api.github.com/users/zhangeugenia/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/matplotlib/matplotlib/milestones/23","html_url":"https://github.com/matplotlib/matplotlib/milestone/23","labels_url":"https://api.github.com/repos/matplotlib/matplotlib/milestones/23/labels","id":1542657,"number":23,"title":"v3.0","description":"Big ticket items:\r\n\r\n - drop support for python 2","creator":{"login":"tacaswell","id":199813,"avatar_url":"https://avatars3.githubusercontent.com/u/199813?v=4","gravatar_id":"","url":"https://api.github.com/users/tacaswell","html_url":"https://github.com/tacaswell","followers_url":"https://api.github.com/users/tacaswell/followers","following_url":"https://api.github.com/users/tacaswell/following{/other_user}","gists_url":"https://api.github.com/users/tacaswell/gists{/gist_id}","starred_url":"https://api.github.com/users/tacaswell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tacaswell/subscriptions","organizations_url":"https://api.github.com/users/tacaswell/orgs","repos_url":"https://api.github.com/users/tacaswell/repos","events_url":"https://api.github.com/users/tacaswell/events{/privacy}","received_events_url":"https://api.github.com/users/tacaswell/received_events","type":"User","site_admin":false},"open_issues":176,"closed_issues":99,"state":"open","created_at":"2016-01-25T21:06:49Z","updated_at":"2018-03-16T18:59:38Z","due_on":"2018-07-01T07:00:00Z","closed_at":null},"comments":1,"created_at":"2018-03-16T07:35:00Z","updated_at":"2018-03-16T19:08:44Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/matplotlib/matplotlib/pulls/10810","html_url":"https://github.com/matplotlib/matplotlib/pull/10810","diff_url":"https://github.com/matplotlib/matplotlib/pull/10810.diff","patch_url":"https://github.com/matplotlib/matplotlib/pull/10810.patch"},"body":"## PR Summary\r\nFix for issue #8818 - plot() is now be able to plot structured arrays passed in as data=... kwarg without incorrectly interpreting the data as a format string. \r\n\r\nA small simple test case is included with this PR to check that plotting a structured array will not cause and exception (without the use of image comparison since it felt unneeded). \r\n\r\nIf any changes/modifications are needed, please let me know. Thank you!\r\n"},"comment":{"url":"https://api.github.com/repos/matplotlib/matplotlib/issues/comments/373815710","html_url":"https://github.com/matplotlib/matplotlib/pull/10810#issuecomment-373815710","issue_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/10810","id":373815710,"user":{"login":"tacaswell","id":199813,"avatar_url":"https://avatars3.githubusercontent.com/u/199813?v=4","gravatar_id":"","url":"https://api.github.com/users/tacaswell","html_url":"https://github.com/tacaswell","followers_url":"https://api.github.com/users/tacaswell/followers","following_url":"https://api.github.com/users/tacaswell/following{/other_user}","gists_url":"https://api.github.com/users/tacaswell/gists{/gist_id}","starred_url":"https://api.github.com/users/tacaswell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tacaswell/subscriptions","organizations_url":"https://api.github.com/users/tacaswell/orgs","repos_url":"https://api.github.com/users/tacaswell/repos","events_url":"https://api.github.com/users/tacaswell/events{/privacy}","received_events_url":"https://api.github.com/users/tacaswell/received_events","type":"User","site_admin":false},"created_at":"2018-03-16T19:08:44Z","updated_at":"2018-03-16T19:08:44Z","author_association":"OWNER","body":"Inclined to not backport, this never worked (so not fixing a regression), is not a failure to import / segfault, and the user has a clear work around (just don't use the data kwarg with structured arrays).\r\n\r\nThe issue here is that structured arrays support `__getitem__` but not `__contains__` so this only checks `in` if the key is in the data if it also parses as a color?  There will still be a slight behavior difference between structure arrays and other containers in that structured arrays will not get the warning in the case of a conflict and (I think) the color behaviour will win!\r\n\r\nDoes this change how things fail if you pass in keys that are not a color _or_ in the container?"}}
{"actor":{"display_login":"tacaswell"}}