MCPcopy Index your code
hub / github.com/facebook/prophet / plot_seasonality_plotly

Function plot_seasonality_plotly

python/prophet/plot.py:810–835  ·  view source on GitHub ↗

Plot a custom seasonal component using Plotly. See plot_plotly() for Plotly setup instructions Parameters ---------- m: Prophet model. name: Seasonality name, like 'daily', 'weekly'. uncertainty: Optional boolean to plot uncertainty intervals, which will only be done

(m, name, uncertainty=True, figsize=(900, 300))

Source from the content-addressed store, hash-verified

808
809
810def plot_seasonality_plotly(m, name, uncertainty=True, figsize=(900, 300)):
811 """Plot a custom seasonal component using Plotly.
812 See plot_plotly() for Plotly setup instructions
813
814 Parameters
815 ----------
816 m: Prophet model.
817 name: Seasonality name, like 'daily', 'weekly'.
818 uncertainty: Optional boolean to plot uncertainty intervals, which will
819 only be done if m.uncertainty_samples > 0.
820 figsize: Set the plot's size (in px).
821
822 Returns
823 -------
824 A Plotly Figure.
825 """
826 props = get_seasonality_plotly_props(m, name, uncertainty)
827 layout = go.Layout(
828 width=figsize[0],
829 height=figsize[1],
830 showlegend=False,
831 xaxis=props['xaxis'],
832 yaxis=props['yaxis']
833 )
834 fig = go.Figure(data=props['traces'], layout=layout)
835 return fig
836
837
838def get_forecast_component_plotly_props(m, fcst, name, uncertainty=True, plot_cap=False):

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…