code: def add_stl_plot(fig, res, legend):
      """Add 3 plots from a second STL fit"""
      axs = fig.get_axes()
      comps = ["trend", "seasonal", "resid"]
      for ax, comp in zip(axs[1:], comps):
          series = getattr(res, comp)
          if comp == "resid":
              ax.plot(series, marker="o", linestyle="none")
          else:
              ax.plot(series)
              if comp == "trend":
                  ax.legend(legend, frameon=False)
  
file_path: statsmodels/examples/python/stl_decomposition.py
imports: import matplotlib.pyplot
  import pandas
  import seaborn
  from pandas.plotting import register_matplotlib_converters
  from statsmodels.tsa.seasonal import STL
  from statsmodels.datasets import elec_equip
  import numpy
  from statsmodels.tsa.arima.model import ARIMA
  from statsmodels.tsa.forecasting.stl import STLForecast
label_desc: Use image node_id 1 for calling a global function with example usage: add_stl_plot(fig, res, legend) without return types