{"action":"created","issue":{"url":"https://api.github.com/repos/bokeh/bokeh/issues/2592","labels_url":"https://api.github.com/repos/bokeh/bokeh/issues/2592/labels{/name}","comments_url":"https://api.github.com/repos/bokeh/bokeh/issues/2592/comments","events_url":"https://api.github.com/repos/bokeh/bokeh/issues/2592/events","html_url":"https://github.com/bokeh/bokeh/issues/2592","id":96038232,"number":2592,"title":"charts.Scatter doesn't handle unequal-length input","user":{"login":"TorbjornT","id":3189311,"avatar_url":"https://avatars.githubusercontent.com/u/3189311?v=3","gravatar_id":"","url":"https://api.github.com/users/TorbjornT","html_url":"https://github.com/TorbjornT","followers_url":"https://api.github.com/users/TorbjornT/followers","following_url":"https://api.github.com/users/TorbjornT/following{/other_user}","gists_url":"https://api.github.com/users/TorbjornT/gists{/gist_id}","starred_url":"https://api.github.com/users/TorbjornT/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TorbjornT/subscriptions","organizations_url":"https://api.github.com/users/TorbjornT/orgs","repos_url":"https://api.github.com/users/TorbjornT/repos","events_url":"https://api.github.com/users/TorbjornT/events{/privacy}","received_events_url":"https://api.github.com/users/TorbjornT/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/bokeh/bokeh/labels/type:%20discussion","name":"type: discussion","color":"2659A0"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-07-20T10:46:47Z","updated_at":"2015-07-21T07:52:28Z","closed_at":null,"body":"An example illustrates this:\r\n\r\n    from collections import OrderedDict\r\n    from bokeh.charts import Scatter\r\n    from bokeh.plotting import show, output_file\r\n\r\n    output_file('demo.html')\r\n    data = OrderedDict([\r\n        ('a',[[1,1]]),\r\n        ('b',[[2,2], [3,3]]),\r\n        ('c',[[4,4], [5,5], [6,6]])\r\n        ])\r\n    scatter = Scatter(data,xlabel='x',ylabel='y',legend='top_left')\r\n    show(scatter)\r\n\r\nThe resulting scatter plot will only show the first point of `b` and `c`. Hence the plot shows three points, (1,1), (2,2) and (4,4) instead of six points, as one might expect:\r\n\r\n![image](https://cloud.githubusercontent.com/assets/3189311/8774186/bcec90b6-2edb-11e5-928f-ba0683328d29.png)\r\n \r\n\r\n\r\nThe same thing occurs when passing a pandas `DataFrame().groupby()` object as input.  I can work around it easily enough by adding NaN entries at the end of the shorter vectors, but it would be nice if it just worked.\r\n\r\nI'm running `bokeh` 0.9.1.  \r\n\r\n"},"comment":{"url":"https://api.github.com/repos/bokeh/bokeh/issues/comments/123203923","html_url":"https://github.com/bokeh/bokeh/issues/2592#issuecomment-123203923","issue_url":"https://api.github.com/repos/bokeh/bokeh/issues/2592","id":123203923,"user":{"login":"TorbjornT","id":3189311,"avatar_url":"https://avatars.githubusercontent.com/u/3189311?v=3","gravatar_id":"","url":"https://api.github.com/users/TorbjornT","html_url":"https://github.com/TorbjornT","followers_url":"https://api.github.com/users/TorbjornT/followers","following_url":"https://api.github.com/users/TorbjornT/following{/other_user}","gists_url":"https://api.github.com/users/TorbjornT/gists{/gist_id}","starred_url":"https://api.github.com/users/TorbjornT/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TorbjornT/subscriptions","organizations_url":"https://api.github.com/users/TorbjornT/orgs","repos_url":"https://api.github.com/users/TorbjornT/repos","events_url":"https://api.github.com/users/TorbjornT/events{/privacy}","received_events_url":"https://api.github.com/users/TorbjornT/received_events","type":"User","site_admin":false},"created_at":"2015-07-21T07:52:28Z","updated_at":"2015-07-21T07:52:28Z","body":"@rothnic Basically something like this:\r\n\r\n    import pandas as pd\r\n    from collections import OrderedDict\r\n    from bokeh.charts import Scatter\r\n    from bokeh.plotting import show, output_file\r\n\r\n    output_file('demo.html')\r\n    x = [1,2,3,4,5,6]\r\n    y = [1,2,3,4,5,6]\r\n    z = ['a','b','b','c','c','c']\r\n    df = pd.DataFrame(dict(x=x,y=y,z=z))\r\n    sc = Scatter(df.groupby(z))\r\n    bp.show(sc)\r\n\r\nWhich gives the same result as the above."}}