{"action":"created","issue":{"url":"https://api.github.com/repos/bokeh/bokeh/issues/3193","labels_url":"https://api.github.com/repos/bokeh/bokeh/issues/3193/labels{/name}","comments_url":"https://api.github.com/repos/bokeh/bokeh/issues/3193/comments","events_url":"https://api.github.com/repos/bokeh/bokeh/issues/3193/events","html_url":"https://github.com/bokeh/bokeh/issues/3193","id":118840037,"number":3193,"title":"desired_num_ticks not working when using custom x_range","user":{"login":"lbrito1","id":2048939,"avatar_url":"https://avatars.githubusercontent.com/u/2048939?v=3","gravatar_id":"","url":"https://api.github.com/users/lbrito1","html_url":"https://github.com/lbrito1","followers_url":"https://api.github.com/users/lbrito1/followers","following_url":"https://api.github.com/users/lbrito1/following{/other_user}","gists_url":"https://api.github.com/users/lbrito1/gists{/gist_id}","starred_url":"https://api.github.com/users/lbrito1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lbrito1/subscriptions","organizations_url":"https://api.github.com/users/lbrito1/orgs","repos_url":"https://api.github.com/users/lbrito1/repos","events_url":"https://api.github.com/users/lbrito1/events{/privacy}","received_events_url":"https://api.github.com/users/lbrito1/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":9,"created_at":"2015-11-25T13:49:21Z","updated_at":"2015-12-02T16:11:45Z","closed_at":null,"body":"I'm not privy to `desired_num_ticks`' implementation (which seems fairly recent), but apparently it is ignored whenever custom tick labels (x/y_range) are used. Take for instance the example [posted on the discussion topic](https://github.com/bokeh/bokeh/pull/2186), which works fine:\r\n\r\n![working](http://s29.postimg.org/om9ntg9vr/ticks_example_working.png)\r\n\r\nHowever, this is what it looks like when passing a custom x_range (gist [here](https://gist.github.com/lbrito1/690809f54f217e6f6b9f)):\r\n\r\n![not working](http://s29.postimg.org/f0g3d5ipz/ticks_example.png)\r\n\r\nThe reason this is important to me is that I'm working on a financial data, and I'm using custom x tick labels in order to avoid weekend/holiday data gaps (as far as I know, those gaps are unavoidable using `x_axis_type=\"datetime\"`). \r\n\r\nThe standard (at least in matplotlib) way of doing this is indexing data by integers, then setting x ticks to the appropriate datetime strings. It's also necessary to limit the number of x ticks in some way so that they are visible when plotting larger amounts of data.\r\n\r\nI'll be happy to improve the [current example](http://bokeh.pydata.org/en/latest/docs/gallery/candlestick.html) in case we manage to work out this situation. In fact, it would be nice to include a library function that would automate the gap-removal process (and also a specific candlestick function which receives a df and interprets it as ohlc, but that's another topic of discussion)."},"comment":{"url":"https://api.github.com/repos/bokeh/bokeh/issues/comments/161348666","html_url":"https://github.com/bokeh/bokeh/issues/3193#issuecomment-161348666","issue_url":"https://api.github.com/repos/bokeh/bokeh/issues/3193","id":161348666,"user":{"login":"lbrito1","id":2048939,"avatar_url":"https://avatars.githubusercontent.com/u/2048939?v=3","gravatar_id":"","url":"https://api.github.com/users/lbrito1","html_url":"https://github.com/lbrito1","followers_url":"https://api.github.com/users/lbrito1/followers","following_url":"https://api.github.com/users/lbrito1/following{/other_user}","gists_url":"https://api.github.com/users/lbrito1/gists{/gist_id}","starred_url":"https://api.github.com/users/lbrito1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lbrito1/subscriptions","organizations_url":"https://api.github.com/users/lbrito1/orgs","repos_url":"https://api.github.com/users/lbrito1/repos","events_url":"https://api.github.com/users/lbrito1/events{/privacy}","received_events_url":"https://api.github.com/users/lbrito1/received_events","type":"User","site_admin":false},"created_at":"2015-12-02T16:11:45Z","updated_at":"2015-12-02T16:11:45Z","body":"@mattpap Great, thanks! That worked. I believe now I'll be able to finish the custom model. I'll post it here when it's done."}}