pfund-plot still comes in handy if you just want to use its rendering capabilities.
It supports rendering plots in:
jupyter notebook/lab
marimo notebook
browser
desktop window
natively
pfund-plotonly supports inputs created bypanel, but there are ways to handle plots from other libraries such asaltairandplotly
from pfund_plot.renderer import renderRendering panel plots in desktop window¶
import panel as pn
py_code = "import pfund_plot as plt"
editor = pn.widgets.CodeEditor(value=py_code, sizing_mode='stretch_width', language='python', height=300)
# use pfund-plot to render the plot in a desktop window
render(editor, display_mode='desktop')Rendering plotly plots in browser¶
import plotly.graph_objects as go
fig = go.Figure(...)
# convert the plotly figure to a panel figure
fig = pn.pane.Plotly(fig)
render(fig, display_mode='browser')Rendering altair plots in browser¶
import altair as alt
fig = alt.Chart(...)
# similarly, convert the altair figure to a panel figure
fig = pn.pane.Vega(fig)
render(fig, display_mode='browser')