code: def plot_yearly(
      m,
      quantile,
      comp_name="yearly",
      yearly_start=0,
      quick=True,
      ax=None,
      figsize=(10, 6),
      df_name="__df__",
  ):
      """Plot the yearly component of the forecast.
  
      Parameters
      ----------
          m : NeuralProphet
              Fitted model
          quantile : float
              The quantile for which the yearly seasonality is plotted
          comp_name : str
              Name of seasonality component
          yearly_start : int
              Specifying the start day of the yearly seasonality plot
  
              Options
                  * (default) ``yearly_start = 0``: starts the year on Jan 1
                  * ``yearly_start = 1``: shifts by 1 day to Jan 2, and so on
          quick : bool
              Use quick low-level call of model
          ax : matplotlib axis
              Matplotlib Axes to plot on
          figsize : tuple
              Width, height in inches, ignored if ax is not None.
  
              Note
              ----
              Default value is set to ``figsize = (10, 6)``
          df_name : str
              Name of dataframe to refer to data params from original keys of train dataframes
  
              Note
              ----
              Only used for local normalization in global modeling
  
      Returns
      -------
          matplotlib.artist.Artist
              List of Artist objects containing yearly forecast component
  
      """
      artists = []
      if not ax:
          fig = plt.figure(facecolor="w", figsize=figsize)
          ax = fig.add_subplot(111)
      # Compute yearly seasonality for a Jan 1 - Dec 31 sequence of dates.
      days = pd.date_range(
          start="2017-01-01", periods=365
      ) + pd.Timedelta(days=yearly_start)
      df_y = pd.DataFrame({"ds": days})
      if not isinstance(df_name, list):
          df_y["ID"] = df_name
      mean_std = False  # Indicates whether mean and std of global df shall be plotted
      if isinstance(df_name, list):
          df_y = pd.DataFrame()
          mean_std = True
          quick = False
          for i in range(m.id_list.__len__()):
              df_i = pd.DataFrame({"ds": days})
              df_i["ID"] = m.id_list[i]
              df_y = pd.concat((df_y, df_i), ignore_index=True)
      if quick:
          predicted = predict_season_from_dates(
              m,
              dates=df_y["ds"],
              name=comp_name,
              quantile=quantile,
              df_name=df_name,
          )
      else:
          predicted = m.predict_seasonal_components(
              df_y, quantile=quantile
          )[["ds", "ID", comp_name]]
  
      if mean_std:
          # If more than on ID has been provided, and no df_name has been specified: plot median and quants across all IDs
          predicted_q90 = predicted.groupby("ds")[[comp_name]].apply(
              lambda x: x.quantile(0.9)
          )
          predicted_q10 = predicted.groupby("ds")[[comp_name]].apply(
              lambda x: x.quantile(0.1)
          )
          predicted = predicted.groupby("ds")[[comp_name]].apply(
              lambda x: x.mean()
          )
          predicted["ID"] = m.id_list[0]
          df_y = df_y[df_y["ID"] == m.id_list[0]]
  
      artists += ax.plot(
          df_y["ds"].dt.to_pydatetime(),
          predicted[comp_name],
          ls="-",
          c="#0072B2",
          label=comp_name + " Mean" if mean_std else None,
      )
      ax.grid(True, which="major", c="gray", ls="-", lw=1, alpha=0.2)
      if mean_std:
          ax.fill_between(
              df_y["ds"],
              predicted_q10[comp_name],
              predicted_q90[comp_name],
              alpha=0.2,
              color="#0072B2",
              label="Quants 10-90%",
          )
          ax.legend()
      months = MonthLocator(range(1, 13), bymonthday=1, interval=2)
      ax.xaxis.set_major_formatter(
          FuncFormatter(
              lambda x, pos=None: f"{num2date(x):%B} {num2date(x).day}"
          )
      )
      ax.xaxis.set_major_locator(months)
      ax.set_xlabel("Day of year")
      ax.set_ylabel(f"Seasonality: {comp_name}")
      return artists
  
file_path: neural_prophet/neuralprophet/plot_model_parameters_matplotlib.py
imports: import datetime
  import logging
  import numpy
  import pandas
  from neuralprophet.plot_utils import predict_one_season, predict_season_from_dates, set_y_as_percent
label_desc: Use image node_id 7 for calling a global function with example usage: plot_yearly(m, quantile, comp_name, yearly_start, quick, ax, figsize, df_name) and returns: artists