code: def quarter_plot(x, dates=None, ylabel=None, ax=None):
      """
      Seasonal plot of quarterly data
  
      Parameters
      ----------
      x : array_like
          Seasonal data to plot. If dates is None, x must be a pandas object
          with a PeriodIndex or DatetimeIndex with a monthly frequency.
      dates : array_like, optional
          If `x` is not a pandas object, then dates must be supplied.
      ylabel : str, optional
          The label for the y-axis. Will attempt to use the `name` attribute
          of the Series.
      ax : matplotlib.axes, optional
          Existing axes instance.
  
      Returns
      -------
      Figure
         If `ax` is provided, the Figure instance attached to `ax`. Otherwise
         a new Figure instance.
  
      Examples
      --------
      >>> import statsmodels.api as sm
      >>> import pandas as pd
  
      >>> dta = sm.datasets.elnino.load_pandas().data
      >>> dta['YEAR'] = dta.YEAR.astype(int).astype(str)
      >>> dta = dta.set_index('YEAR').T.unstack()
      >>> dates = pd.to_datetime(list(map(lambda x: '-'.join(x) + '-1',
      ...                                 dta.index.values)))
      >>> dta.index = dates.to_period('Q')
      >>> fig = sm.graphics.tsa.quarter_plot(dta)
  
      .. plot:: plots/graphics_tsa_quarter_plot.py
      """
  
      if dates is None:
          from statsmodels.tools.data import _check_period_index
  
          _check_period_index(x, freq="Q")
      else:
          x = pd.Series(x, index=pd.PeriodIndex(dates, freq="Q"))
  
      xticklabels = ["q1", "q2", "q3", "q4"]
      return seasonal_plot(
          x.groupby(lambda y: y.quarter),
          xticklabels,
          ylabel=ylabel,
          ax=ax,
      )
  
file_path: statsmodels/statsmodels/graphics/tsaplots.py
imports: from statsmodels.compat.pandas import deprecate_kwarg
  import calendar
  import numpy
  import pandas
  from statsmodels.graphics import utils
  from statsmodels.tools.validation import array_like
  from statsmodels.tsa.stattools import acf, pacf, ccf
label_desc: Use image node_id 9 for calling a global function with example usage: quarter_plot(x, dates, ylabel, ax) and returns: seasonal_plot