-
-
Notifications
You must be signed in to change notification settings - Fork 404
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added support for tick formatters in bokeh #728
Conversation
Conversely - it supports writing the function in JS or Coffeescript too (without flexx). |
That's true although I'm not sure how or even if we should expose that in HoloViews. The benefit of supplying a Python function is that it should work for both bokeh and matplotlib and will show up correctly in sliders and titles. |
Looks good to me! Not exposing the JS options sounds appropriate; we don't normally expose anything JS in HoloViews, but Bokeh does it throughout, so it's fine that we make a different choice. Happy to have this merged. |
The flexx dependency looks fine to me as it is a bokeh dependency not a holoviews dependency. The only thing I would like to check before merging is whether this same interface could be used for the matplotlib backend? Having one function to support two backends would be far better than having to keep switching function (even with |
Just added a small change so that a single argument function is supported in matplotlib. We now consistently support single argument functions everywhere and you can also supply a function with an optional second argument, which will be passed the matplotlib |
Ok, I reviewed it earlier and it looked fine except for that one issue. Merging. |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
As the title says this adds support for supplying arbitrary Python functions as tick formatters for the axes. A simple example is a formatter that displays seconds as minutes.
Note that this depends on
flexx
being installed because compiling the python function to JS requires pyscript. Currently it will warn if flexx can't be imported or the function cannot be compiled.