code: def _do_plot(
      x, y, dist=None, line=None, ax=None, fmt="b", step=False, **kwargs
  ):
      """
      Boiler plate plotting function for the `ppplot`, `qqplot`, and
      `probplot` methods of the `ProbPlot` class
  
      Parameters
      ----------
      x : array_like
          X-axis data to be plotted
      y : array_like
          Y-axis data to be plotted
      dist : scipy.stats.distribution
          A scipy.stats distribution, needed if `line` is "q".
      line : {"45", "s", "r", "q", None}, default None
          Options for the reference line to which the data is compared.
      ax : AxesSubplot, optional
          If given, this subplot is used to plot in instead of a new figure being
          created.
      fmt : str, optional
          matplotlib-compatible formatting string for the data markers
      kwargs : keywords
          These are passed to matplotlib.plot
  
      Returns
      -------
      fig : Figure
          The figure containing `ax`.
      ax : AxesSubplot
          The original axes if provided.  Otherwise a new instance.
      """
      plot_style = {
          "marker": "o",
          "markerfacecolor": "C0",
          "markeredgecolor": "C0",
          "linestyle": "none",
      }
  
      plot_style.update(**kwargs)
      where = plot_style.pop("where", "pre")
  
      fig, ax = utils.create_mpl_ax(ax)
      ax.set_xmargin(0.02)
  
      if step:
          ax.step(x, y, fmt, where=where, **plot_style)
      else:
          ax.plot(x, y, fmt, **plot_style)
      if line:
          if line not in ["r", "q", "45", "s"]:
              msg = "%s option for line not understood" % line
              raise ValueError(msg)
  
          qqline(ax, line, x=x, y=y, dist=dist)
  
      return fig, ax
  
imports: from statsmodels.compat.python import lzip
  import numpy
  from scipy import stats
  from statsmodels.distributions import ECDF
  from statsmodels.regression.linear_model import OLS
  from statsmodels.tools.decorators import cache_readonly
  from statsmodels.tools.tools import add_constant
  from .None import utils
label_desc: Use image node_id 6 for calling a global function with example usage: _do_plot(x, y, dist, line, ax, fmt, step) and returns: fig,  ax