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

jslink sometimes ignores key value pairs #603

Closed
johanneselbs opened this issue Aug 17, 2019 · 0 comments · Fixed by #3165
Closed

jslink sometimes ignores key value pairs #603

johanneselbs opened this issue Aug 17, 2019 · 0 comments · Fixed by #3165
Milestone

Comments

@johanneselbs
Copy link

ALL software version info (Panel, bokeh, python, notebook, OS, browser, any other relevant packages)

Tested on 2 of my conda envs:

panel: 0.6.0 / 0.6.2
bokeh: 1.3.4
python: 3.6.6 / 3.7.3
holoviews: 1.12.3
notebook: 6.0.0
IPython: 7.7.0/7.1.1
browser: firefox 68.0.2

Description of expected behavior and the observed behavior

Using jslink with two links in the same command, only the first one has an effect. In this case only the lower color_mapper follows the zooming of distr:

distr.jslink(image, **{'x_range.start': 'color_mapper.low', 'x_range.end': 'color_mapper.high'})

Seperating on two lines, behaviour is as expected:

distr.jslink(image, **{'x_range.start': 'color_mapper.low'})
distr.jslink(image, **{'x_range.end': 'color_mapper.high'})

Complete, minimal, self-contained example code that reproduces the issue

import holoviews as hv
from scipy import stats
import numpy as np
import panel as pn

hv.extension('bokeh')

xvals  = np.linspace(-4, 0, 202)
yvals  = np.linspace(4, 0, 202)
xs, ys = np.meshgrid(xvals, yvals)

alpha = 1
beta = 0
zs = np.sin(((ys/alpha)**alpha+beta)*xs)

image = hv.Image(zs, vdims='values')

xd = zs.flatten()
xd.sort()
yd = stats.norm.ppf(np.arange(1, len(xd)+1) / (len(xd) + 1))

distr = pn.panel(hv.Curve((xd, yd), kdims='values', vdims='sigma'))

# Not working:
distr.jslink(image, **{'x_range.start': 'color_mapper.low', 'x_range.end': 'color_mapper.high'})

# Working example:
# distr.jslink(image, **{'x_range.start': 'color_mapper.low'})
# distr.jslink(image, **{'x_range.end': 'color_mapper.high'})

pn.Row(image, distr)

Stack traceback and/or browser JavaScript console output

No error message, just not working as expected: when zoomin in the distribution window: color coding follows for the lower side, but not on the upper side.

Screenshots or screencasts of the bug in action

Upload does not work :-(

@johanneselbs johanneselbs added the TRIAGE Default label for untriaged issues label Aug 17, 2019
@philippjfr philippjfr added type: bug and removed TRIAGE Default label for untriaged issues labels Nov 8, 2019
@philippjfr philippjfr added this to the v0.13.0 milestone Feb 1, 2022
@philippjfr philippjfr modified the milestones: v0.13.0, next Mar 28, 2022
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

Successfully merging a pull request may close this issue.

2 participants