Skip to content
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

Colorbar Axis #1441

Closed
bryevdv opened this issue Nov 20, 2014 · 8 comments · Fixed by #4931
Closed

Colorbar Axis #1441

bryevdv opened this issue Nov 20, 2014 · 8 comments · Fixed by #4931

Comments

@bryevdv
Copy link
Member

bryevdv commented Nov 20, 2014

No description provided.

@bryevdv bryevdv added this to the short-term milestone Nov 20, 2014
@bryevdv bryevdv self-assigned this Nov 20, 2014
@bryevdv bryevdv modified the milestones: 0.8, short-term Jan 9, 2015
@damianavila
Copy link
Contributor

Estimate: 1 day

@bryevdv
Copy link
Member Author

bryevdv commented Feb 13, 2015

OK, giving up the pretense. #1 priority after 0.8...

@bryevdv bryevdv modified the milestones: 0.8.1, 0.8 Feb 13, 2015
@damianavila damianavila modified the milestones: 0.8.1, 0.8.2 Feb 18, 2015
@bryevdv bryevdv modified the milestones: 0.8.2, 0.9 Mar 26, 2015
@timburgess
Copy link

It would be good to get an idea of the structure that you have in mind. Judging by the title, the implementation will be a subclass of Axis in bokeh/models/axes.py?

For reference, matplotlib makes it pretty simple to add a colorbar - but invariably there are specific parms to pass to get exactly what you want.

# matplotlib example
plt.streamplot(X, Y, U, V, color=U, linewidth=2, cmap=plt.cm.autumn)
plt.colorbar()
# bokeh?
plotting.output_file("image.html", title='bokeh colorbar example')
plot = plotting.figure(plot_height=600, plot_width=1200, x_range=[0,10], y_range=[0,10])
plot.image(image=[data], x=[0], y=[0], dw=[10], dh=[10], palette='Spectral11')
plot.colorbar()
plotting.save(obj=plot)

@bryevdv
Copy link
Member Author

bryevdv commented Apr 14, 2015

We use a constraint solver (kiwi.js) to handle the layout of things on the canvas. The issue is not s much the python spelling, or even the actual drawing of a colorbar. I don't expect any of that would take more than a few hours. The issue is that some fairly low level parts of BokehJS dealing with setting up and maintaining layout constraints will need to be extended and pushed beyond where they have been utilized up to this point. Realistically a few new abstractions need to need to be added to keep the complexity and repeated code from spiraling out of hand, and that may take a few days (I'm estimating for me, it would probably be longer for anyone else). If you are potentially interested in working on this, I would be happy to write up an outline of work tasks in more detail.

@timburgess
Copy link

An outline of steps/tasks would be very useful to me and hopefully also help you clarify what you have in mind. I have some time I can dedicate towards this but there is clearly a lot of effort required to get to a solid understanding of the python code and even more so the BokehJS part.

@bryevdv bryevdv modified the milestones: short-term, 0.9 Apr 22, 2015
@SimonBiggs
Copy link

I made an interactive on selection colour bar in combination with a colour wash. It's a bit of a work around, but it doesn't use any callbacks:
http://simonbiggs.github.io/electronfactors

It would be great if something like this functionality was packaged in.

@raivivek
Copy link

@bryevdv Any updates on this?

@bryevdv
Copy link
Member Author

bryevdv commented Dec 31, 2015

This will not be in 0.11 proper, but 0.11 has a new mechanism for extending Bokeh with User Defined Models, so I very much hope to be able to create a custom Colorbar axis model that people can easily use until one gets added to Bokeh core library. To support this feature fully really depends on some refactoring of our canvas layout, which I hope to turn to in the next few weeks. We are prioritizing the best we can with the resources we have.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
6 participants