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

Datashading Error Parameter name clashes #3831

Closed
ariellalgilmore opened this issue Jul 17, 2019 · 4 comments · Fixed by #4021
Closed

Datashading Error Parameter name clashes #3831

ariellalgilmore opened this issue Jul 17, 2019 · 4 comments · Fixed by #4021
Labels
type: bug Something isn't correct or isn't working
Milestone

Comments

@ariellalgilmore
Copy link

When datashading I get an error on a 1D graph when it's rendered and then continuously as the user zooms in and out.

Parameter name clashes for keys {'width', 'scale', 'height'}

@philippjfr philippjfr added the type: bug Something isn't correct or isn't working label Oct 3, 2019
@philippjfr philippjfr added this to the v1.12.6 milestone Oct 3, 2019
@ltalirz
Copy link
Contributor

ltalirz commented Dec 20, 2019

I'm running holoviews 1.12.7 (datashader 0.9.0) and I still get

Parameter name clashes for keys {'y_range', 'x_range'}

while zooming.

For example using the code provided here:

import holoviews as hv
from holoviews.operation.datashader import datashade
import numpy as np

hv.extension('bokeh')  # otherwise defaults to matplotlib

points = hv.Points(np.random.multivariate_normal((0,0), [[0.1, 0.1], [0.1, 1.0]], (500000,)))

def filter_points(points, x_range, y_range):
    """Filter points by x/y range.
    
    To be used with .apply(filter_points, streams=)
    """
    if x_range is None or y_range is None:
        return points
    return points[x_range, y_range]

def hover_points(points, threshold=1000):
    """Filter points by threshold.
    
    Returns empty list if number of input points exceeds threshold.
    """
    if len(points) > threshold:
        return points.iloc[:0]
    return points

filtered = points.apply(filter_points, streams=[hv.streams.RangeXY(source=points)])
shaded = datashade(filtered, width=400, height=400)
hover = filtered.apply(hover_points)

layout = (shaded * hover.opts(tools=['hover'], alpha=0.1, hover_alpha=0.2, size=10))

renderer = hv.renderer('bokeh')
doc = renderer.server_doc(layout)

@philippjfr
Copy link
Member

Thanks yeah, been meaning to look at that again. The warnings are completely inconsequential but still annoying.

@philippjfr
Copy link
Member

This was fixed in #4119

Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug Something isn't correct or isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants