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

Datashader image resampling sometimes fails if not contained in viewport #2817

Closed
philippjfr opened this issue Jun 21, 2018 · 4 comments
Closed
Labels
type: bug Something isn't correct or isn't working
Milestone

Comments

@philippjfr
Copy link
Member

There appear to be various issues when datashading image not contained in current view port. A good way to reproduce this is by drawing multiple non-overlapping images:

import numpy as np
import holoviews as hv
hv.extension('bokeh')

from holoviews.operation.datashader import regrid

ls = np.linspace(0, 10, 200)
xx, yy = np.meshgrid(ls, ls)
bounds_list=[(-1,-1,1,1),(0,0,2,2),(0.5,0.5,3,3)]
imgs = [regrid(hv.Image(np.sin(xx)*np.cos(yy), bounds=bounds)) for i,bounds in enumerate(bounds_list)]

hv.Overlay(imgs)

This raises errors originating both in datashader and holoviews.

@jlstevens jlstevens added the type: bug Something isn't correct or isn't working label Jun 25, 2018
@stevievb
Copy link

stevievb commented Jul 10, 2018

If I change the first example a bit I am seeing a similar error. @philippjfr I assume this is related?

import numpy as np
import holoviews as hv
hv.extension('bokeh')

from holoviews.operation.datashader import regrid, datashade

ls = np.linspace(0, 10, 200)
xx, yy = np.meshgrid(ls, ls)
bounds_list=[(-1,-1,1,1),(0,0,2,2),(0.5,0.5,3,3)]
imgs = [hv.Image(np.sin(xx)*np.cos(yy), bounds=bounds) for i,bounds in enumerate(bounds_list)]

datashade(hv.Overlay(imgs))

@philippjfr philippjfr reopened this Jul 11, 2018
@philippjfr
Copy link
Member Author

Yes, I can reproduce it.

@philippjfr
Copy link
Member Author

Something going wrong in the shade operation, seems like the densities aren't being passed through. Thought I'd fixed that but apparently not.

@philippjfr
Copy link
Member Author

This has been fixed in the PR referenced above.

@philippjfr philippjfr added this to the v1.11 milestone Oct 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't correct or isn't working
Projects
None yet
Development

No branches or pull requests

3 participants