Plot a particular component of the forecast using Plotly. See plot_plotly() for Plotly setup instructions Parameters ---------- m: Prophet model. fcst: pd.DataFrame output of m.predict. name: Name of the component to plot. uncertainty: Optional boolean to plot uncertaint
(m, fcst, name, uncertainty=True, plot_cap=False, figsize=(900, 300))
| 777 | |
| 778 | |
| 779 | def plot_forecast_component_plotly(m, fcst, name, uncertainty=True, plot_cap=False, figsize=(900, 300)): |
| 780 | """Plot a particular component of the forecast using Plotly. |
| 781 | See plot_plotly() for Plotly setup instructions |
| 782 | |
| 783 | Parameters |
| 784 | ---------- |
| 785 | m: Prophet model. |
| 786 | fcst: pd.DataFrame output of m.predict. |
| 787 | name: Name of the component to plot. |
| 788 | uncertainty: Optional boolean to plot uncertainty intervals, which will |
| 789 | only be done if m.uncertainty_samples > 0. |
| 790 | plot_cap: Optional boolean indicating if the capacity should be shown |
| 791 | in the figure, if available. |
| 792 | figsize: The plot's size (in px). |
| 793 | |
| 794 | Returns |
| 795 | ------- |
| 796 | A Plotly Figure. |
| 797 | """ |
| 798 | props = get_forecast_component_plotly_props(m, fcst, name, uncertainty, plot_cap) |
| 799 | layout = go.Layout( |
| 800 | width=figsize[0], |
| 801 | height=figsize[1], |
| 802 | showlegend=False, |
| 803 | xaxis=props['xaxis'], |
| 804 | yaxis=props['yaxis'] |
| 805 | ) |
| 806 | fig = go.Figure(data=props['traces'], layout=layout) |
| 807 | return fig |
| 808 | |
| 809 | |
| 810 | def plot_seasonality_plotly(m, name, uncertainty=True, figsize=(900, 300)): |
nothing calls this directly
no test coverage detected
searching dependent graphs…