pfund-plot
allows you to quickly arrange multiple plots in a grid layout, which is convenient when you want to display multiple plots in one place.
import pfeed as pe
import pfund_plot as plt
feed = pe.YahooFinanceFeed()
df = feed.get_historical_data(product='AAPL_USD_STK', resolution='1d', rollback_period='1y')
# This will create a layout with 3 plots using panel's GridStack.
with plt.layout(streaming=True, display_mode="browser") as layout:
layout.add(
plt.ohlc(df),
plt.df(df, backend='tabulator'),
plt.df(df, backend='perspective')
)
Loading...
Customized layout¶
Since pfund-plot
is built on top of panel, you can customize the layout in the same way you would with panel.
import panel as pn
fig1 = plt.df(df, backend='tabulator', streaming=True)
fig2 = plt.df(df, backend='perspective', streaming=True)
fig3 = plt.ohlc(df, streaming=True)
# use pn.Row, Column, or GridStack to customize the layout, e.g.
fig = pn.Row(fig1, fig2, fig3)
pn.serve(fig, show=True)