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

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

Open
MarcSkovMadsen opened this issue Dec 25, 2023 · 1 comment
Open

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

MarcSkovMadsen opened this issue Dec 25, 2023 · 1 comment

Comments

@MarcSkovMadsen
Copy link
Collaborator

MarcSkovMadsen commented Dec 25, 2023

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

@MarcSkovMadsen MarcSkovMadsen changed the title dynamic=False not work if I set the widget_location dynamic=False not work if I change the widget_location Dec 25, 2023
@maximlt
Copy link
Member

maximlt commented Jan 2, 2024

Hi @MarcSkovMadsen, I can't reproduce this bug.

hvplot_widgetloc_not_dynamic

I believe this issue has nothing to do with quarto.

I guess it has something to do with Quarto :) I'd be inclined to close this issue?

@maximlt maximlt added needs info and removed TRIAGE labels Jan 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants