-
Notifications
You must be signed in to change notification settings - Fork 54
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
tab-completion for interactivity? #1
Comments
Sorry; I didn't get a notice of this question when it came in! I tried to make all the colormaps available in several different ways to make them convenient to use in different contexts. If you import colorcet, all the colormaps should autocomplete already in the colorcet namespace: (Here the "m_" prefix gives you the matplotlib colormaps, while "b_" (or no prefix at all, for the short names like "fire") will give Bokeh palettes.) But I'd be happy to accept a pull request to define |
(And if someone happens to get that in today :-), it would make it in time for the new release scheduled for tomorrow; otherwise it will be in the subsequent one.) |
ah, cool. is that documented? That totally solves my issue. I just didn't find it. |
Good point; it was not well documented, but hopefully it is now: https://bokeh.github.io/colorcet/#Accessing-the-colormaps |
thanks! |
This is a usability question. It looks to me like all the colormaps are available via the
cc.cm
dictionary. However, there is no auto-complete for dictionaries in jupyter notebook, so I either need to remember the name exactly and type it out, or callcm.keys()
, search for the colormap, and copy and paste the string.Maybe there's an easier way that I don't see?
If I could use jupyters auto-complete to find the right color map, that would be much easier given your naming schemes. One way to achieve that would be to make
cm
be a bunch object, so that the items can be obtained with__get_attr__
. If you define__dir__
right, that allows tab-completion.You could also define a sub-module that has instances of the colormaps with appropriate names (I think that's what matplotlib does?)
Thanks for these great colormaps!
The text was updated successfully, but these errors were encountered: