panel icon indicating copy to clipboard operation
panel copied to clipboard

Doc failed https://panel.holoviz.org/getting_started/core_concepts.html#

Open hengaini2055 opened this issue 1 year ago • 0 comments

ALL software version info

OS: windows 11 python: 3.10.11 Panel: 1.36 bokeh: 3.3.2 matplotlib: 3.7.2

Description of expected behavior and the observed behavior

When I read the doc core concept, the pn.column.servable(target='main) code such as doc, using command:

panel serve --show panel_learning_20231220.ipynb

In web main url, there is no content; and some errors as follows: image image

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

import numpy as np
import matplotlib.pyplot as plt
import panel as pn

pn.extension(template='fast')

freq = pn.widgets.FloatSlider(
    name='Frequency', start=0, end=10, value=5
).servable(target='sidebar')

ampl = pn.widgets.FloatSlider(
    name='Amplitude', start=0, end=1, value=0.5
).servable(target='sidebar')

def plot(freq, ampl):
    fig = plt.figure()
    ax = fig.add_subplot(111)
    xs = np.linspace(0, 1)
    ys = np.sin(xs*freq)*ampl
    ax.plot(xs, ys)
    return fig

mpl = pn.pane.Matplotlib(
    pn.bind(plot, freq, ampl)
)

pn.Column(
    '# Sine curve', mpl
).servable(target='main')

Stack traceback and/or browser JavaScript console output

Screenshots or screencasts of the bug in action

hengaini2055 avatar Dec 21 '23 03:12 hengaini2055