-
-
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
datashader on bokeh server #1536
Comments
Thanks for filing this issue! My first suggestion is you update to Bokeh 0.12.6 which just released a few hours ago to see if the problem persists. I think you might also want to try the holoviews dev version that you can get with:
Alternatively, if you are comfortable testing things against the current HoloViews master branch, that might be preferable. |
Upgrading both of those packages as you instructed did not seem to help. |
@stevievb Very simple fix, I'll have a user guide up to explain this stuff soon, simply change this line by passing the doc in:
|
That said the simpler thing to do all around is this: import numpy as np
import holoviews as hv
from holoviews.operation.datashader import datashade
import holoviews.plotting.bokeh # noqa (Activate backend)
y = np.random.standard_normal(size = 2000000)
x = np.arange(len(y)) / 200000.0
curve = hv.Curve((x, y))
datashaded = datashade(curve, cmap=["blue"])
doc = hv.renderer('bokeh').server_doc(datashaded) |
Hey that all worked. Thanks for your help. |
@philippjfr Think you'll be able to add something to the docs about this for 1.8? |
How are you running this along with Bokeh server? If the application is called app.py, are you using: bokeh serve app.py Is this correct? |
@loc1978 That's right. You can try some of our examples here though you'll probably need a dev version of holoviews to run them. |
Thanks for the quick reply. Unfortunately I'm having a lot of trouble getting a simple example to work. When I try to run this one: https://github.com/ioam/holoviews/blob/master/examples/apps/bokeh/selection_stream.py I get: AttributeError: module 'holoviews' has no attribute 'renderer' I'm currently using the latest holoviews version 1.8.dev1 -- Is this the correct version? |
There is currently no release that includes |
EDIT: Nevermind, I got it to work, there were conflicting packages in Anaconda. Here are the module versions that worked for this code: #959 bokeh: 0.12.6 |
Somewhat related - Is it possible to pass plot or style options with this setup? For example, is something like this supported?: curve = hv.Curve((x, y))(plot=dict(yaxis=None)) I see towards the bottom of this page (https://anaconda.org/jbednar/holoviews_datashader/notebook) an example of passing width and height parameters to the datashade function but in my testing it seems to have no effect. What is the correct way to set the width/height? datashaded = datashade(curve, cmap=["blue"], width=800, height=800) |
The arguments to the After the initial rendering, by default the value is set dynamically by the size of the bokeh plot in which the datashader plot is embedded, and so in interactive use you will indeed not notice any effect of those settings. In this case you can use the normal HoloViews mechanisms to set the Bokeh plot size. The |
Something like this should work: datashaded = datashade(curve, cmap=["blue"])
datashaded(plot={'RGB': dict(width=800, height=800)}) |
@philippjfr Thanks that seemed to work with a slight modification.
|
Ah sorry, what I did was for interactive notebook usage, in a script you definitely have to assign it back to the variable. I've also made another mistake, we recently introduced plot_opts = {'RGB': dict(width=800, height=800)}
datashaded = datashade(curve, cmap=["blue"]).opts(plot=plot_opts) |
Hello all again, I'd like the user to be able to filter the data and most Bokeh examples use Something like this?
|
@philippjfr Should this issue be closed or bumped to the next milestone? |
Closing this as it seems to have been addressed. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
I'm trying to using holoviews, bokeh server, and datashader based somewhat on the example in issue #959. I'm getting the following error and I'm not sure how to debug it:
ERROR:bokeh.server.protocol.server_handler:error handling message Message 'PATCH-DOC' (revision 1): AttributeError("'NoneType' object has no attribute '_session_callbacks'",)
The plot shows up and looks correct but the datashading aspect on zoom does not seem to be working and throws that error.
My bokeh application code is ---
conda env ---
The text was updated successfully, but these errors were encountered: