Skip to content

dynamic=False not work if I change the widget_location #1241

Open
@MarcSkovMadsen

Description

@MarcSkovMadsen

I'm playing around with Quarto. I would like to test how I can embed hvPlot plots.

I believe this issue has nothing to do with quarto. I just think that when you change the widget_location the dynamic=False or HoloMap is not working.

Does not work

---
title: hvPlot in Quarto Examples
format: html
---

This is a hvPlot embedded in a Quarto document.

```{python}
import hvplot.pandas
import numpy as np
import pandas as pd

hvplot.extension("bokeh") # Needed for 'quarto preview' to work
frequencies = [0.5, 0.75, 1.0, 1.25]

def sine_curve(phase, freq):
    xvals = np.arange(100)
    yvals = np.sin(phase+freq*xvals)
    return pd.DataFrame({'x': xvals, 'y': yvals, 'phase': phase, 'freq': freq}, columns=['x', 'y', 'phase', 'freq'])

df = pd.concat([sine_curve(0, f) for f in frequencies])

df.hvplot.line('x', 'y', groupby='freq', dynamic=False, responsive=True, height=400, widget_location='top_left')
```
quarto preview script.qmd --port 5008
hvplot-widget-not-working.mp4

Works

Here I don't change the widget_location.

---
title: hvPlot in Quarto Examples
format: html
---

This is a hvPlot embedded in a Quarto document.

```{python}
import hvplot.pandas
import numpy as np
import pandas as pd

hvplot.extension("bokeh") # Needed for 'quarto preview' to work
frequencies = [0.5, 0.75, 1.0, 1.25]

def sine_curve(phase, freq):
    xvals = np.arange(100)
    yvals = np.sin(phase+freq*xvals)
    return pd.DataFrame({'x': xvals, 'y': yvals, 'phase': phase, 'freq': freq}, columns=['x', 'y', 'phase', 'freq'])

df = pd.concat([sine_curve(0, f) for f in frequencies])

df.hvplot.line('x', 'y', groupby='freq', dynamic=False, responsive=True, height=400)
```
holomap.works.mp4

Versions

panel==1.3.5 bokeh==3.3.2 holoviews==1.18.1 hvplot==0.9.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs infoNeed more information

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions