plotly_plot#
- class predict_backend.page.elements.plotly_plot.PlotlyPlot(fig, title=None)#
Bases:
Plot
Create a plot using the Plotly package.
` import plotly.express as px fig = px.scatter(pandas_df, trendline="ols") plotly_plot = PlotlyPlot(fig) `
- Parameters:
fig (
Figure
) – A Plotly figure objecttitle (
str
) – The title of the PlotlyPlot, if not specified, the title of object Plotly is used.
- save(link, is_ssf=False)#
Save a plot serialization into a Link.
- Parameters:
link (
Link
) – The link to save the element to.
- to_json()#
Convert the element to a JSON.
- Returns:
A JSON dictionary of the element.