{"database": "github", "table": "issues", "is_view": false, "human_description_en": "where \"closed_at\" is on date 2019-01-30, state_reason = \"completed\" and user = 35968931 sorted by updated_at descending", "rows": [[404383025, "MDU6SXNzdWU0MDQzODMwMjU=", 2725, "Line plot with x=coord putting wrong variables on axes", 35968931, "closed", 0, null, null, 3, "2019-01-29T16:43:18Z", "2019-01-30T02:02:22Z", "2019-01-30T02:02:22Z", "MEMBER", null, null, null, "When I try to plot the values in a 1D DataArray against the values in one of its coordinates, it does not behave at all as expected: \r\n\r\n```python\r\nimport numpy as np\r\nimport matplotlib.pyplot as plt\r\nfrom xarray import DataArray\r\n\r\ncurrent = DataArray(name='current', data=np.array([5, 8, 14, 22, 30]), dims=['time'],\r\n                    coords={'time': (['time'], np.array([0.1, 0.2, 0.3, 0.4, 0.5])),\r\n                            'voltage': (['time'], np.array([100, 200, 300, 400, 500]))})\r\n\r\nprint(current)\r\n\r\n# Try to plot current against voltage\r\ncurrent.plot.line(x='voltage')\r\nplt.show()\r\n```\r\nOutput:\r\n\r\n```\r\n<xarray.DataArray 'current' (time: 5)>\r\narray([ 5,  8, 14, 22, 30])\r\nCoordinates:\r\n  * time     (time) float64 0.1 0.2 0.3 0.4 0.5\r\n    voltage  (time) int64 100 200 300 400 500\r\n```\r\n![incorrect_current_plot](https://user-images.githubusercontent.com/35968931/51924149-683f3800-23e4-11e9-8957-81d32da43117.png)\r\n\r\n#### Problem description\r\n\r\nNot only is `'voltage'` not on the x axis, but `'current'` isn't on the y axis either!\r\n\r\n#### Expected Output\r\n\r\nBased on the documentation (and common sense) I would have expected it to plot voltage on the x axis and current on the y axis.\r\n\r\n(using a branch of xarray which is up-to-date with master)\r\n", "{\"url\": \"https://api.github.com/repos/pydata/xarray/issues/2725/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", null, "completed", 13221727, "issue"]], "truncated": false, "filtered_table_rows_count": 1, "expanded_columns": [], "expandable_columns": [[{"column": "repo", "other_table": "repos", "other_column": "id"}, "name"], [{"column": "milestone", "other_table": "milestones", "other_column": "id"}, "title"], [{"column": "assignee", "other_table": "users", "other_column": "id"}, "login"], [{"column": "user", "other_table": "users", "other_column": "id"}, "login"]], "columns": ["id", "node_id", "number", "title", "user", "state", "locked", "assignee", "milestone", "comments", "created_at", "updated_at", "closed_at", "author_association", "active_lock_reason", "draft", "pull_request", "body", "reactions", "performed_via_github_app", "state_reason", "repo", "type"], "primary_keys": ["id"], "units": {}, "query": {"sql": "select id, node_id, number, title, user, state, locked, assignee, milestone, comments, created_at, updated_at, closed_at, author_association, active_lock_reason, draft, pull_request, body, reactions, performed_via_github_app, state_reason, repo, type from issues where date(\"closed_at\") = :p0 and \"state_reason\" = :p1 and \"user\" = :p2 order by updated_at desc limit 101", "params": {"p0": "2019-01-30", "p1": "completed", "p2": "35968931"}}, "facet_results": {"state": {"name": "state", "type": "column", "hideable": false, "toggle_url": "/github/issues.json?closed_at__date=2019-01-30&state_reason=completed&user=35968931", "results": [{"value": "closed", "label": "closed", "count": 1, "toggle_url": "http://xarray-datasette.fly.dev/github/issues.json?closed_at__date=2019-01-30&state_reason=completed&user=35968931&state=closed", "selected": false}], "truncated": false}, "repo": {"name": "repo", "type": "column", "hideable": false, "toggle_url": "/github/issues.json?closed_at__date=2019-01-30&state_reason=completed&user=35968931", "results": [{"value": 13221727, "label": "xarray", "count": 1, "toggle_url": "http://xarray-datasette.fly.dev/github/issues.json?closed_at__date=2019-01-30&state_reason=completed&user=35968931&repo=13221727", "selected": false}], "truncated": false}, "type": {"name": "type", "type": "column", "hideable": false, "toggle_url": "/github/issues.json?closed_at__date=2019-01-30&state_reason=completed&user=35968931", "results": [{"value": "issue", "label": "issue", "count": 1, "toggle_url": "http://xarray-datasette.fly.dev/github/issues.json?closed_at__date=2019-01-30&state_reason=completed&user=35968931&type=issue", "selected": false}], "truncated": false}}, "suggested_facets": [{"name": "created_at", "type": "date", "toggle_url": "http://xarray-datasette.fly.dev/github/issues.json?closed_at__date=2019-01-30&state_reason=completed&user=35968931&_facet_date=created_at"}, {"name": "updated_at", "type": "date", "toggle_url": "http://xarray-datasette.fly.dev/github/issues.json?closed_at__date=2019-01-30&state_reason=completed&user=35968931&_facet_date=updated_at"}, {"name": "closed_at", "type": "date", "toggle_url": "http://xarray-datasette.fly.dev/github/issues.json?closed_at__date=2019-01-30&state_reason=completed&user=35968931&_facet_date=closed_at"}], "next": null, "next_url": null, "private": false, "allow_execute_sql": true, "query_ms": 71.82004861533642}