code: def plot_forecast_component(
      m,
      fcst,
      name,
      ax=None,
      uncertainty=True,
      plot_cap=False,
      figsize=(10, 6),
  ):
      """Plot a particular component of the forecast.
  
      Parameters
      ----------
      m: Prophet model.
      fcst: pd.DataFrame output of m.predict.
      name: Name of the component to plot.
      ax: Optional matplotlib Axes to plot on.
      uncertainty: Optional boolean to plot uncertainty intervals, which will
          only be done if m.uncertainty_samples > 0.
      plot_cap: Optional boolean indicating if the capacity should be shown
          in the figure, if available.
      figsize: Optional tuple width, height in inches.
  
      Returns
      -------
      a list of matplotlib artists
      """
      artists = []
      if not ax:
          fig = plt.figure(facecolor="w", figsize=figsize)
          ax = fig.add_subplot(111)
      fcst_t = fcst["ds"].dt.to_pydatetime()
      artists += ax.plot(fcst_t, fcst[name], ls="-", c="#0072B2")
      if "cap" in fcst and plot_cap:
          artists += ax.plot(fcst_t, fcst["cap"], ls="--", c="k")
      if m.logistic_floor and "floor" in fcst and plot_cap:
          ax.plot(fcst_t, fcst["floor"], ls="--", c="k")
      if uncertainty and m.uncertainty_samples:
          artists += [
              ax.fill_between(
                  fcst_t,
                  fcst[name + "_lower"],
                  fcst[name + "_upper"],
                  color="#0072B2",
                  alpha=0.2,
              )
          ]
      # 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("ds")
      ax.set_ylabel(name)
      if name in m.component_modes["multiplicative"]:
          ax = set_y_as_percent(ax)
      return artists
  
imports: from __future__ import absolute_import, division, print_function
  import logging
  import numpy
  import pandas
  from prophet.diagnostics import performance_metrics
label_desc: Use image node_id 3 for calling a global function with example usage: plot_forecast_component(m, fcst, name, ax, uncertainty, plot_cap, figsize) and returns: artists