I made a time series model using prophet and I want to find the exact date of the maximum of the yearly trend revealed by the plot made by the m.plot_components(forecast)
function.
However I'm not sure how to extract it from the plot. from prophets examples page:
import pandas as pd
from fbprophet import Prophet
df = pd.read_csv('../examples/example_wp_log_peyton_manning.csv')
m = Prophet()
m.fit(df)
future = m.make_future_dataframe(periods=365)
forecast = m.predict(future)
fig2 = m.plot_components(forecast)
fig2.axis[2] is an 'AxesSubplot' object and it comes from a 'matplotlib.figure.Figure' (fig2). How do I get out the arrays that make up the line inside that subplot object?