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

Title of holoviews HoloMap does not change properly with widget change #1041

Open
Jacob-Barhak opened this issue Jan 29, 2020 · 3 comments
Open
Milestone

Comments

@Jacob-Barhak
Copy link
Contributor

When having multiple widgets the title of a holoviews object does not change properly. Here is an example that was constructed using:
Python version is: 2.7.15 (default, Jul 2 2019, 00:55:11) [MSC v.1500 64 bit (AMD64)]
holoviews version 1.13.0a22
panel version 0.8.0rc2.post8+g4420258
bokeh version 1.4.0

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

VecLength = 21
ParamNames = ['p_'+str(i) for i in range(VecLength)]

MixtureHolomapDict = {}
for CopyEnum in range(7):        
    for IterationToPlot in range(1,6):
        np.random.seed(0)
        ParamValues = list(np.random.random(VecLength) + (np.random.random(VecLength)*IterationToPlot/100))
        BarSources = dict(Param=ParamNames, Value=ParamValues)   
        Title = 'Mixture Iteration %s'%str(IterationToPlot)          
        Bars = hv.Bars(BarSources, kdims=['Param'], vdims = ['Value']).opts(xrotation=90, title = Title )
        MixtureHolomapDict[IterationToPlot, CopyEnum] = Bars

p = hv.HoloMap(MixtureHolomapDict, kdims=['Iteration','Copy'])
hv.save(p,'titlebug.html')
p

The resulting html file does change the image when sliding the first slider, yet does not change the title to correspond with the slider. However, if the second slider is dragged all the way to the right, then the title changes when dragging the top slider.

@philippjfr
Copy link
Member

This is a Panel issue.

@philippjfr philippjfr transferred this issue from holoviz/holoviews Jan 29, 2020
@Jacob-Barhak
Copy link
Contributor Author

This issue is resolve by: #1040 . Here is resolution code:

import holoviews as hv, numpy as np, panel as pn
hv.extension('bokeh') 
pn.extension(safe_embed=True) 

VecLength = 21
ParamNames = ['p_'+str(i) for i in range(VecLength)]

MixtureHolomapDict = {}
for CopyEnum in range(7):        
    for IterationToPlot in range(1,6):
        np.random.seed(0)
        ParamValues = list(np.random.random(VecLength) + (np.random.random(VecLength)*IterationToPlot/100))
        BarSources = dict(Param=ParamNames, Value=ParamValues)   
        Title = 'Mixture Iteration %s'%str(IterationToPlot)          
        Bars = hv.Bars(BarSources, kdims=['Param'], vdims = ['Value']).opts(xrotation=90, title = Title )
        MixtureHolomapDict[IterationToPlot, CopyEnum] = Bars

p = hv.HoloMap(MixtureHolomapDict, kdims=['Iteration','Copy'])
hv.save(p,'titlebug.html')
p

When the https://github.com/holoviz/panel/tree/safe_embed branch is merged into master, this issue can be closed

@philippjfr
Copy link
Member

I'll keep this open until safe_embed is the default.

@philippjfr philippjfr added this to the v0.8.1 milestone Feb 1, 2020
@philippjfr philippjfr modified the milestones: v0.8.1, v0.8.x Feb 10, 2020
@philippjfr philippjfr modified the milestones: v0.8.x, v0.9.0, v0.9.1 Mar 12, 2020
@philippjfr philippjfr modified the milestones: v0.9.2, v0.9.4 Mar 21, 2020
@philippjfr philippjfr modified the milestones: v0.9.4, v0.9.5, v0.9.6 Apr 2, 2020
@philippjfr philippjfr modified the milestones: v0.9.6, v0.10.0 May 19, 2020
@philippjfr philippjfr modified the milestones: v0.10.0, v0.10.x Oct 13, 2020
@philippjfr philippjfr modified the milestones: v0.10.x, v0.11.0 Dec 15, 2020
@philippjfr philippjfr modified the milestones: v0.11.0, v0.11.x Feb 25, 2021
@philippjfr philippjfr modified the milestones: v0.11.x, v0.12.0, v0.12.x Jun 25, 2021
@philippjfr philippjfr modified the milestones: v0.12.x, v0.13.0 Jan 3, 2022
@philippjfr philippjfr modified the milestones: v0.13.0, next Apr 1, 2022
@philippjfr philippjfr modified the milestones: next, v1.6.0 Jan 20, 2025
@philippjfr philippjfr modified the milestones: v1.6.0, v1.6.1 Jan 25, 2025
@philippjfr philippjfr modified the milestones: v1.6.1, v1.6.2 Feb 20, 2025
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

2 participants