code: def plot(
      fcst,
      quantiles,
      ax=None,
      xlabel="ds",
      ylabel="y",
      highlight_forecast=None,
      line_per_origin=False,
      figsize=(10, 6),
  ):
      """Plot the NeuralProphet forecast.
  
      Parameters
      ----------
          fcst : pd.DataFrame
              Output of m.predict
          quantiles: list
              Quantiles for which the forecasts are to be plotted
          ax : matplotlib axes
              Axes to plot on
          xlabel : str
              Label name on X-axis
          ylabel : str
              Label name on Y-axis
          highlight_forecast : int
              i-th step ahead forecast to highlight.
          line_per_origin : bool
              Print a line per forecast of one per forecast age
          figsize : tuple
              Width, height in inches.
  
      Returns
      -------
          matplotlib.pyplot.figure
              Figure showing the NeuralProphet forecast
  
      Examples
      --------
          Base usage
  
          >>> from neuralprophet import NeuralProphet
          >>> m = NeuralProphet()
          >>> metrics = m.fit(df, freq="D")
          >>> future = m.make_future_dataframe(df=df, periods=365)
          >>> forecast = m.predict(df=future)
          >>> fig_forecast = m.plot(forecast)
  
          Additional plot specifications
  
          >>> m.plot(forecast,
          >>>    xlabel="ds",
          >>>    ylabel="y",
          >>>    highlight_forecast=None,
          >>>    line_per_origin=False,
          >>>    figsize=(10, 6)
          >>>    )
  
      """
      fcst = fcst.fillna(value=np.nan)
      if ax is None:
          fig = plt.figure(facecolor="w", figsize=figsize)
          ax = fig.add_subplot(111)
      else:
          fig = ax.get_figure()
      ds = fcst["ds"].dt.to_pydatetime()
      colname = "yhat"
      step = 1
      # if plot_latest_forecast(), column names become "origin-x", with origin-0 being the latest forecast
      if line_per_origin:
          colname = "origin-"
          step = 0
      # all yhat column names without quantiles
      yhat_col_names = [
          col_name
          for col_name in fcst.columns
          if col_name.startswith(colname) and "%" not in col_name
      ]
  
      if highlight_forecast is None or line_per_origin:
          for i, name in enumerate(yhat_col_names):
              ax.plot(
                  ds,
                  fcst[f"{colname}{i if line_per_origin else i + 1}"],
                  ls="-",
                  c="#0072B2",
                  alpha=0.2 + 2.0 / (i + 2.5),
                  label=name,
              )
  
          if len(quantiles) > 1:
              for i in range(1, len(quantiles)):
                  ax.fill_between(
                      ds,
                      fcst[f"{colname}{step}"],
                      fcst[
                          f"{colname}{step} {round(quantiles[i] * 100, 1)}%"
                      ],
                      color="#0072B2",
                      alpha=0.2,
                  )
  
      if highlight_forecast is not None:
          if line_per_origin:
              num_forecast_steps = sum(fcst["origin-0"].notna())
              steps_from_last = num_forecast_steps - highlight_forecast
              for i in range(len(yhat_col_names)):
                  x = ds[-(1 + i + steps_from_last)]
                  y = fcst[f"origin-{i}"].values[
                      -(1 + i + steps_from_last)
                  ]
                  ax.plot(x, y, "bx")
          else:
              ax.plot(
                  ds,
                  fcst[f"yhat{highlight_forecast}"],
                  ls="-",
                  c="b",
                  label=f"yhat{highlight_forecast}",
              )
              ax.plot(
                  ds,
                  fcst[f"yhat{highlight_forecast}"],
                  "bx",
                  label=f"yhat{highlight_forecast}",
              )
  
              if len(quantiles) > 1:
                  for i in range(1, len(quantiles)):
                      ax.fill_between(
                          ds,
                          fcst[f"yhat{highlight_forecast}"],
                          fcst[
                              f"yhat{highlight_forecast} {round(quantiles[i] * 100, 1)}%"
                          ],
                          color="#0072B2",
                          alpha=0.2,
                      )
  
      ax.plot(ds, fcst["y"], "k.", label="actual y")
  
      # Specify formatting to workaround matplotlib issue #12925
      locator = AutoDateLocator(interval_multiples=False)
      formatter = AutoDateFormatter(locator)
      ax.xaxis.set_major_locator(locator)
      ax.xaxis.set_major_formatter(formatter)
      ax.grid(True, which="major", c="gray", ls="-", lw=1, alpha=0.2)
      ax.set_xlabel(xlabel)
      ax.set_ylabel(ylabel)
      handles, labels = ax.axes.get_legend_handles_labels()
      if len(labels) > 10:
          ax.legend(
              handles[:10] + [handles[-1]], labels[:10] + [labels[-1]]
          )
          log.warning(
              "Legend is available only for the ten first handles"
          )
      else:
          ax.legend(handles, labels)
      fig = fig.tight_layout()
      return fig
  
file_path: neural_prophet/neuralprophet/plot_forecast_matplotlib.py
imports: import logging
  import numpy
  from neuralprophet.plot_model_parameters_matplotlib import plot_custom_season, plot_daily, plot_weekly, plot_yearly
  from neuralprophet.plot_utils import set_y_as_percent
label_desc: Use image node_id 1 for calling a global function with example usage: plot(fcst, quantiles, ax, xlabel, ylabel, highlight_forecast, line_per_origin, figsize) and returns: fig