{"action":"created","issue":{"url":"https://api.github.com/repos/bokeh/bokeh/issues/2048","labels_url":"https://api.github.com/repos/bokeh/bokeh/issues/2048/labels{/name}","comments_url":"https://api.github.com/repos/bokeh/bokeh/issues/2048/comments","events_url":"https://api.github.com/repos/bokeh/bokeh/issues/2048/events","html_url":"https://github.com/bokeh/bokeh/issues/2048","id":60253878,"number":2048,"title":"cannot seem to make x-values different than default in Line","user":{"login":"chanansh","id":5981644,"avatar_url":"https://avatars.githubusercontent.com/u/5981644?v=3","gravatar_id":"","url":"https://api.github.com/users/chanansh","html_url":"https://github.com/chanansh","followers_url":"https://api.github.com/users/chanansh/followers","following_url":"https://api.github.com/users/chanansh/following{/other_user}","gists_url":"https://api.github.com/users/chanansh/gists{/gist_id}","starred_url":"https://api.github.com/users/chanansh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chanansh/subscriptions","organizations_url":"https://api.github.com/users/chanansh/orgs","repos_url":"https://api.github.com/users/chanansh/repos","events_url":"https://api.github.com/users/chanansh/events{/privacy}","received_events_url":"https://api.github.com/users/chanansh/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/bokeh/bokeh/labels/tag:%20charts","name":"tag: charts","color":"D0CBB8"},{"url":"https://api.github.com/repos/bokeh/bokeh/labels/type:%20bug","name":"type: bug","color":"C02942"}],"state":"open","locked":false,"assignee":{"login":"fpliger","id":1084690,"avatar_url":"https://avatars.githubusercontent.com/u/1084690?v=3","gravatar_id":"","url":"https://api.github.com/users/fpliger","html_url":"https://github.com/fpliger","followers_url":"https://api.github.com/users/fpliger/followers","following_url":"https://api.github.com/users/fpliger/following{/other_user}","gists_url":"https://api.github.com/users/fpliger/gists{/gist_id}","starred_url":"https://api.github.com/users/fpliger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fpliger/subscriptions","organizations_url":"https://api.github.com/users/fpliger/orgs","repos_url":"https://api.github.com/users/fpliger/repos","events_url":"https://api.github.com/users/fpliger/events{/privacy}","received_events_url":"https://api.github.com/users/fpliger/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/bokeh/bokeh/milestones/17","html_url":"https://github.com/bokeh/bokeh/milestones/0.8.2","labels_url":"https://api.github.com/repos/bokeh/bokeh/milestones/17/labels","id":984730,"number":17,"title":"0.8.2","description":"","creator":{"login":"damianavila","id":1640669,"avatar_url":"https://avatars.githubusercontent.com/u/1640669?v=3","gravatar_id":"","url":"https://api.github.com/users/damianavila","html_url":"https://github.com/damianavila","followers_url":"https://api.github.com/users/damianavila/followers","following_url":"https://api.github.com/users/damianavila/following{/other_user}","gists_url":"https://api.github.com/users/damianavila/gists{/gist_id}","starred_url":"https://api.github.com/users/damianavila/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/damianavila/subscriptions","organizations_url":"https://api.github.com/users/damianavila/orgs","repos_url":"https://api.github.com/users/damianavila/repos","events_url":"https://api.github.com/users/damianavila/events{/privacy}","received_events_url":"https://api.github.com/users/damianavila/received_events","type":"User","site_admin":false},"open_issues":40,"closed_issues":28,"state":"open","created_at":"2015-02-18T15:57:36Z","updated_at":"2015-03-08T19:54:52Z","due_on":"2015-03-23T23:00:00Z","closed_at":null},"comments":3,"created_at":"2015-03-08T12:09:52Z","updated_at":"2015-03-08T20:32:42Z","closed_at":null,"body":"I am trying to alter the example in https://github.com/bokeh/bokeh/blob/master/examples/charts/lines.py\r\nto have my custom x-values through the \"index\" argument. But it seems to fail...\r\nWhat do you recommend to do?\r\n\r\n\r\n```\r\nimport numpy as np\r\nfrom bokeh.charts import Line\r\nfrom bokeh.plotting import output_file, show\r\noutput_file('line.html')\r\nxyvalues = np.array([[2, 3, 7, 5, 26], [12, 33, 47, 15, 126], [22, 43, 10, 25, 26]])\r\nline = Line(xyvalues, index=np.array([5, 6, 7, 8, 9]), title=\"line\", legend=\"top_left\", ylabel='Languages')\r\nshow(line)\r\n```\r\n```  \r\nFile \"C:\\Anaconda3\\lib\\site-packages\\bokeh\\charts\\builder\\line_builder.py\", line 110, in <listcomp>\r\n    values = [self._values[col][x] for x in xs]\r\nIndexError: index 5 is out of bounds for axis 0 with size 5\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/bokeh/bokeh/issues/comments/77772464","html_url":"https://github.com/bokeh/bokeh/issues/2048#issuecomment-77772464","issue_url":"https://api.github.com/repos/bokeh/bokeh/issues/2048","id":77772464,"user":{"login":"fpliger","id":1084690,"avatar_url":"https://avatars.githubusercontent.com/u/1084690?v=3","gravatar_id":"","url":"https://api.github.com/users/fpliger","html_url":"https://github.com/fpliger","followers_url":"https://api.github.com/users/fpliger/followers","following_url":"https://api.github.com/users/fpliger/following{/other_user}","gists_url":"https://api.github.com/users/fpliger/gists{/gist_id}","starred_url":"https://api.github.com/users/fpliger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fpliger/subscriptions","organizations_url":"https://api.github.com/users/fpliger/orgs","repos_url":"https://api.github.com/users/fpliger/repos","events_url":"https://api.github.com/users/fpliger/events{/privacy}","received_events_url":"https://api.github.com/users/fpliger/received_events","type":"User","site_admin":false},"created_at":"2015-03-08T20:32:41Z","updated_at":"2015-03-08T20:32:41Z","body":"As you've mentioned `charts.Line` belongs to the higher level `charts` interface while `line` expose access to the lower glyph interface which basically displays a single line that connects several points. In the case of Line the difference is not that obvious like with other type of charts, but you can notice that `Charts` just requires one line to take your input and return the `chart` object with the line rendered, while you need at least 2 lines of code to do the same with the lower glyph interface.\r\n\r\nThe main functionality of the `charts` interface is to provide a set pre-built `Charts` that already take care of calculations and automations, so you can call create those with just one line of code instead of having to write several lines of code using the lower level interfaces. A central role in that scenario is played by `Builder` classes, which task is to consume inputs, create sources, ranges, glyphs, rendered and pass everything to the new chart where they are being drawn into. If you look at the BoxPlot or Donut chart you can see that there is no glyph that does similar things (like with the `Line` chart and the `line` glyph), so the different should be more clear. `BoxPlot` charts, for instance, use rect, circle and segment glyphs to draw the geometries after having calculated all the equations to distribute the received input data. \r\n\r\nDoes this make sense? O hope this clarifies your doubts.."}}