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

InteractiveImage does not work? #208

Closed
bill10 opened this issue Jul 31, 2016 · 6 comments
Closed

InteractiveImage does not work? #208

bill10 opened this issue Jul 31, 2016 · 6 comments

Comments

@bill10
Copy link

bill10 commented Jul 31, 2016

Thanks to the developers for this awesome package, which is exactly what I need. However, it does not work as I thought, and any help is appreciated.

I downloaded the "tseries" notebook, and had it run locally. When I zoomed in the bokeh plot, I think it is expected to reveal more fine-grained data points, i.e., adaptive sampling, but what I got is the same plot with magnified pixels (see below). Is the function InteractiveImage() not working?

python:2.7
bokeh: 0.12.1
datashader: 0.3.2

UPDATE: so I looked at the browser console, and when I zoom in, the following error pops up:
VM309:18 Uncaught TypeError: Cannot read property 'get' of undefined

And that line in the JS is

var ranges = {xmin: x_range.attributes.start,
ymin: y_range.attributes.start,
xmax: x_range.attributes.end,
ymax: y_range.attributes.end,
w: Math.floor(plot.frame.get('width')),
h: Math.floor(plot.frame.get('height'))}

screen shot 2016-07-31 at 10 40 11 pm

@dfeich
Copy link

dfeich commented Aug 1, 2016

I am experiencing the same problems in all examples using InteractiveImage

  • python 2.7.11
  • datashader 0.3.0
  • bokeh 0.12.0

E.g. trying to wheel-zoom into the bokeh plot under the "Embedding" heading, I get this error in the Firefox console:

TypeError: plot.frame is undefined:
update_plot()
 bokeh-0.12.0.min.js%20line%206%20%3E%20Function:16
j.throttle/c()

In Chromium the Console shows:

VM113:18 Uncaught TypeError: Cannot read property 'get' of undefined
update_plot @ VM113:18
c @ underscore-min.js:5

@birdsarah
Copy link

plot.frame changed to plot.plot_canvas.frame in bokeh 0.12

@bill10
Copy link
Author

bill10 commented Aug 2, 2016

It turned out that I made a common mistake by being left behind. The tseries notebook on anaconda cloud is outdated. I cloned the master branch and everything there I tried works well for me. The key change that made me all the trouble in this post is the "relocation" of InteractiveImage. It is
from datashader.bokeh_ext import InteractiveImage
instead of
from datashader.callbacks import InteractiveImage

@bill10 bill10 closed this as completed Aug 2, 2016
@deto
Copy link

deto commented Sep 26, 2016

I'm getting this same error with
bokeh: 0.12.2
datashader: 0.3.0

But I am using the correct "from datashader.bokeh_ext import InteractiveImage"

If the issue is a changing of the bokeh API in version 0.12, then is this a bug? Is the solution to clone and install the development version of datashader?

@jbednar
Copy link
Member

jbednar commented Sep 26, 2016

The current version of datashader is 0.4.0, available from the bokeh channel: conda install -c bokeh datashader, and it should work with bokeh 0.12.2. We're preparing a new datashader release 0.4.1, which will be on the main channel as well.

@deto
Copy link

deto commented Sep 26, 2016

Confirmed, updating to the version in the bokeh channel fixes the issue. Thanks! This is a great tool!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants