docs: def diagonal_line(xi=None, yi=None, *, ax=None, c=None, ls=None, lw=None, zorder=3):
      """Plot a diagonal line.
  
      Parameters
      ----------
      xi : 1D array-like (optional)
          The x axis points. If None, taken from axis limits. Default is None.
      yi : 1D array-like
          The y axis points. If None, taken from axis limits. Default is None.
      ax : axis (optional)
          Axis to plot on. If none is supplied, the current axis is used.
      c : string (optional)
          Line color. Default derives from rcParams grid color.
      ls : string (optional)
          Line style. Default derives from rcParams linestyle.
      lw : float (optional)
          Line width. Default derives from rcParams linewidth.
      zorder : number (optional)
          Matplotlib zorder. Default is 3.
  
      Returns
      -------
      matplotlib.lines.Line2D object
          The plotted line.
      """
      if ax is None:
          ax = plt.gca()
      # parse xi, yi
      if xi is None:
          xi = ax.get_xlim()
      if yi is None:
          yi = ax.get_ylim()
      # parse style
      if c is None:
          c = matplotlib.rcParams["grid.color"]
      if ls is None:
          ls = matplotlib.rcParams["grid.linestyle"]
      if lw is None:
          lw = matplotlib.rcParams["grid.linewidth"]
      # get axis
      if ax is None:
          ax = plt.gca()
      # make plot
      diag_min = max(min(xi), min(yi))
      diag_max = min(max(xi), max(yi))
      line = ax.plot([diag_min, diag_max], [diag_min, diag_max], c=c, ls=ls, lw=lw, zorder=zorder)
      return line